From 04c0b9f47628d74d1cda062daadd49de332908d3 Mon Sep 17 00:00:00 2001 From: YannGarcia Date: Tue, 24 Jan 2023 10:08:32 +0100 Subject: [PATCH 01/58] Add typing for MEC033 and MEC040 --- titan-test-system-framework | 2 +- ...mApplicationEnablementAPI_TestControl.ttcn | 126 ------------ .../module.mk | 48 ----- ...ormApplicationEnablementAPI_TestCases.ttcn | 0 ...mApplicationEnablementAPI_TestControl.ttcn | 19 ++ .../module.mk | 36 ++++ ...plicationEnablementAPI_TypesAndValues.ttcn | 12 ++ ttcn/LibMec/FederationEnablementAPI/module.mk | 5 + ...ederationEnablementAPI_TypesAndValues.ttcn | 39 ++++ ttcn/LibMec/IotAPI/module.mk | 6 + .../IotAPI/ttcn/IotAPI_TypesAndValues.ttcn | 185 ++++++++++++++++++ 11 files changed, 303 insertions(+), 175 deletions(-) delete mode 100644 ttcn/AtsMec/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn delete mode 100644 ttcn/AtsMec/AtsMec_EdgePlatformApplicationEnablement/module.mk rename ttcn/{AtsMec => }/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn (100%) create mode 100644 ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn create mode 100644 ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk create mode 100644 ttcn/LibMec/FederationEnablementAPI/module.mk create mode 100644 ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_TypesAndValues.ttcn create mode 100644 ttcn/LibMec/IotAPI/module.mk create mode 100644 ttcn/LibMec/IotAPI/ttcn/IotAPI_TypesAndValues.ttcn diff --git a/titan-test-system-framework b/titan-test-system-framework index 07e483b..b3e32ae 160000 --- a/titan-test-system-framework +++ b/titan-test-system-framework @@ -1 +1 @@ -Subproject commit 07e483b6f5f83ea55de07fe84eaa924c7f401724 +Subproject commit b3e32ae45e559819ba3eab8ba748a03ff6fdd284 diff --git a/ttcn/AtsMec/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn b/ttcn/AtsMec/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn deleted file mode 100644 index 4c74736..0000000 --- a/ttcn/AtsMec/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn +++ /dev/null @@ -1,126 +0,0 @@ -module AtsMec_TestControl { - - // LibMec/LocationAPI - import from LocationAPI_Pics all; - // LibMec/UEidentityAPI - import from UEidentityAPI_Pics all; - // LibMec/RnisAPI - import from RnisAPI_Pics all; - // LibMec/TrafficManagementAPI - import from TrafficManagementAPI_Pics all; - // LibMec/AppEnablementAPI - import from EdgePlatformApplicationEnablementAPI_Pics all; - // LibMec/UEAppInterfaceAPI - import from UEAppInterfaceAPI_Pics all; - - // LibMec - import from LibMec_Pics all; - - // AtsMec - import from AtsMec_LocationAPI_TestCases all; - import from AtsMec_UEidentityAPI_TestCases all; -// import from AtsMec_RadioNodeLocationAPI_TestCases all; - import from AtsMec_RnisAPI_TestCases all; - import from AtsMec_TrafficManagementAPI_TestCases all; - import from AtsMec_EdgePlatformApplicationEnablementAPI_TestCases all; - import from AtsMec_UEAppInterfaceAPI_TestCases all; - - control { - - if (PICS_MEC_PLAT and PICS_SERVICES) { - if (PICS_UE_IDENTITY_API_SUPPORTED) { - execute(TC_MEC_MEC014_SRV_UETAG_001_OK()); - execute(TC_MEC_MEC014_SRV_UETAG_001_BR()); - execute(TC_MEC_MEC014_SRV_UETAG_001_NF()); - execute(TC_MEC_MEC014_SRV_UETAG_002_OK()); - execute(TC_MEC_MEC014_SRV_UETAG_002_BR()); - execute(TC_MEC_MEC014_SRV_UETAG_002_PF()); - } - if (PICS_LOCATION_API_SUPPORTED) { - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_OK()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_BR()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_NF()); - - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_002_NF()); - - execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_NF()); - - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK()); - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_BR()); - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_NF()); - - execute(TC_MEC_MEC013_SRV_UEINFSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_002_NF()); - -// execute(TC_MEC_PLAT_RLOC_001_OK()); -// execute(TC_MEC_PLAT_RLOC_001_NF()); - } - - if (PICS_APP_ENABLEMENT_API_SUPPORTED) { - /*execute(TC_MEC_SRV_TRANS_001_OK()); - execute(TC_MEC_SRV_TRAF_001_OK()); - execute(TC_MEC_SRV_TRAF_002_OK()); - execute(TC_MEC_SRV_TRAF_003_OK()); - execute(TC_MEC_SRV_TRAF_001_NF());*/ - } - - if (PICS_ENABLE_UE_APP_CTX) { - execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_NF()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_NF()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_NF()); - } - } - - /*if (PICS_RNIS) { - if (PICS_RNIS_NOTIFICATIONS) { - execute(TC_MEC_MEC012_SRV_RNIS_001_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_002_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_003_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_004_OK()); - } - if (PICS_RNIS_ALL_SUBSCRIPTIONS) { - execute(TC_MEC_MEC012_SRV_RNIS_011_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_012_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_011_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_012_BR()); - } - if (PICS_RNIS_QUERY) { - execute(TC_MEC_MEC012_SRV_RNIS_016_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_016_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_016_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_017_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_017_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_017_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_018_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_018_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_018_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_019_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_019_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_019_NF()); - } - }*/ - - if (PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED) { - execute(TC_MEC_MEC015_SRV_TM_001_OK()); - execute(TC_MEC_MEC015_SRV_TM_002_OK()); - execute(TC_MEC_MEC015_SRV_TM_002_BR()); - execute(TC_MEC_MEC015_SRV_TM_002_NF()); - } - } // End of 'control' statement - -} // End of module AtsMec_TestControl diff --git a/ttcn/AtsMec/AtsMec_EdgePlatformApplicationEnablement/module.mk b/ttcn/AtsMec/AtsMec_EdgePlatformApplicationEnablement/module.mk deleted file mode 100644 index 449db40..0000000 --- a/ttcn/AtsMec/AtsMec_EdgePlatformApplicationEnablement/module.mk +++ /dev/null @@ -1,48 +0,0 @@ -suite := AtsMec - -sources := \ - AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn \ - AtsMec_TrafficManagementAPI_TestCases.ttcn \ - AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn \ - AtsMec_LocationAPI_TestCases.ttcn \ - AtsMec_RnisAPI_TestCases.ttcn \ - AtsMec_TestControl.ttcn \ - AtsMec_UEAppInterfaceAPI_TestCases.ttcn \ - AtsMec_UEidentityAPI_TestCases.ttcn \ - AtsMec_V2XInformationServiceAPI_TestCases.ttcn \ - AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn \ - AtsMec_WlanInformationAPI_TestCases.ttcn \ - AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn \ -# AtsMec_Ams_TestCases.ttcn \ -# AtsMec_FixedAccessInfoAPI_TestCases.ttcn \ -# AtsMec_RadioNodeLocationAPI_TestCases.ttcn \ - -modules := ../LibCommon \ - ../LibIts \ - ../LibIts/ttcn/Http \ - ../LibMec \ - ../LibMec/EdgePlatformApplicationEnablementAPI \ - ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ - ../LibMec/TrafficManagementAPI \ - ../LibMec/LocationAPI \ - ../LibMec/RnisAPI \ - ../LibMec/UEAppInterfaceAPI \ - ../LibMec/UEidentityAPI \ - ../LibMec/V2XInformationServiceAPI \ - ../LibMec/DeviceApplicationInterfaceAPI \ - ../LibMec/WlanInformationAPI \ - ../LibMec/ApplicationMobilityServiceAPI \ - ../LibMec/FixedAccessInformationAPI \ - ../../ccsrc/Ports/LibHttp \ - ../../ccsrc/EncDec/LibHttp \ - ../../ccsrc/EncDec/LibMec \ - ../../ccsrc/Framework \ - ../../ccsrc/externals \ - ../../ccsrc/loggers \ - ../../ccsrc/Protocols/ETH \ - ../../ccsrc/Protocols/Http \ - ../../ccsrc/Protocols/Json \ - ../../ccsrc/Protocols/Pcap \ - ../../ccsrc/Protocols/Tcp \ - ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ - diff --git a/ttcn/AtsMec/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn similarity index 100% rename from ttcn/AtsMec/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn rename to ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn diff --git a/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn new file mode 100644 index 0000000..0f71a6c --- /dev/null +++ b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn @@ -0,0 +1,19 @@ +module AtsMec_EdgePlatformApplicationEnablementAPI_TestControl { + + // LibMec/AppEnablementAPI + import from EdgePlatformApplicationEnablementAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec_EdgePlatformApplicationEnablementAPI + import from AtsMec_EdgePlatformApplicationEnablementAPI_TestCases all; + + control { + + if (PICS_MEC_PLAT and PICS_SERVICES) { + } + + } // End of 'control' statement + +} // End of module AtsMec_EdgePlatformApplicationEnablementAPI_TestControl diff --git a/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk b/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk new file mode 100644 index 0000000..a9e6d00 --- /dev/null +++ b/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk @@ -0,0 +1,36 @@ +suite := AtsMec_EdgePlatformApplicationEnablement + +sources := \ + AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn \ + AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/LocationAPI \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/RnisAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ + diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn index 30b0b36..ede77b5 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn @@ -291,6 +291,8 @@ running /** * @desc This type represents a type of link and may be referenced from data structures. + * @member href URI referring to a resource + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 6.3.2-1: Attributes of the LinkType */ type record LinkType { Href href @@ -337,6 +339,12 @@ running variant (links) "name as '_links'"; } + /** + * @desc This type represents a list of links related to currently existing subscriptions for a MEC application instance. + * @member self_ Self-referring URI + * @member subscriptions The MEC application instance's subscriptions + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 6.2.2-1: Attributes of the SubscriptionLinkList + */ type record Links { LinkType self_, Subscriptions subscriptions @@ -346,6 +354,8 @@ running /** * @desc This type represents a list of links related to currently existing subscriptions for a MEC application instance. + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 6.2.2-1: Attributes of the SubscriptionLinkList */ type record SubscriptionLinkList { Links links @@ -357,6 +367,7 @@ running * @desc The MEC application instance's subscriptions * @member href URI referring to the subscription * @member subscriptionType Type of the subscription + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 6.2.2-1: Attributes of the SubscriptionLinkList */ type record Subscription_ { Json.AnyURI href, @@ -752,6 +763,7 @@ running /** * @desc This type represents the general information of a traffic rule. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.2.2-1: Attributes of TrafficRule */ type record TrafficRule { TrafficRule_Id trafficRuleId, diff --git a/ttcn/LibMec/FederationEnablementAPI/module.mk b/ttcn/LibMec/FederationEnablementAPI/module.mk new file mode 100644 index 0000000..a7bdf52 --- /dev/null +++ b/ttcn/LibMec/FederationEnablementAPI/module.mk @@ -0,0 +1,5 @@ +sources := \ + ttcn/FederationEnablementAPI_Pics.ttcn \ + ttcn/FederationEnablementAPI_Pixits.ttcn \ + ttcn/FederationEnablementAPI_Templates.ttcn \ + ttcn/FederationEnablementAPI_TypesAndValues.ttcn diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_TypesAndValues.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_TypesAndValues.ttcn new file mode 100644 index 0000000..d32ddd7 --- /dev/null +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_TypesAndValues.ttcn @@ -0,0 +1,39 @@ +/** + * @desc The ETSI MEC ISG MEC040 Radio Network Information API described using OpenAPI + * @see TODO + */ +module FederationEnablementAPI_TypesAndValues { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + /** + * @desc Information provided by the MEC orchestrator as a part of the "Registration of MEC system to the federation" + * @member systemId Identifier of the MEC system + * @member systemName The name of the MEC system + * @member systemProvider Provider of the MEC system + * @see Draft ETSI GS MEC 040 V3.1.3 (2022-12) Table 6.2.2-1: Attributes of SystemInfo + */ + type record SystemInfo { + Json.String systemId optional, // Shall be absent in POST request + Json.String systemName, + Json.String systemProvider + } // End of type SystemInfo + + /** + * @desc information provided by MEC orchestrator as a part of the "Update of MEC system(s) to the federation" + * @member systemName The name of the MEC system + * @member endpoint Endpoint information (e.g. URI, FQDN, IP address) of MEC federator + * @see Draft ETSI GS MEC 040 V3.1.3 (2022-12) Table 6.2.3-1: Attributes of SystemInfoUpdate + */ + type record SystemInfoUpdate { + Json.String systemName optional, + EndPointInfo endpoint optional + } // End of type SystemInfoUpdate + +} with { + encode "JSON" +} // End of module FederationEnablementAPI_TypesAndValues \ No newline at end of file diff --git a/ttcn/LibMec/IotAPI/module.mk b/ttcn/LibMec/IotAPI/module.mk new file mode 100644 index 0000000..1d3e297 --- /dev/null +++ b/ttcn/LibMec/IotAPI/module.mk @@ -0,0 +1,6 @@ +sources := \ + ttcn/IotAPI_Pics.ttcn \ + ttcn/IotAPI_Pixits.ttcn \ + ttcn/IotAPI_Templates.ttcn \ + ttcn/IotAPI_TypesAndValues.ttcn \ + ../EdgePlatformApplicationEnablementAPI\/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn diff --git a/ttcn/LibMec/IotAPI/ttcn/IotAPI_TypesAndValues.ttcn b/ttcn/LibMec/IotAPI/ttcn/IotAPI_TypesAndValues.ttcn new file mode 100644 index 0000000..48d34be --- /dev/null +++ b/ttcn/LibMec/IotAPI/ttcn/IotAPI_TypesAndValues.ttcn @@ -0,0 +1,185 @@ +/** + * @desc The ETSI MEC ISG MEC033 Radio Network Information API described using OpenAPI + * @see https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_MEC033v030101p.pdf + */ +module IotAPI_TypesAndValues { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // MEC-011 + import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; + + /** + * @desc Information associated to an IoT device + * @member deviceAuthenticationInfo Information needed for secondary authentication of the IoT device to the data network + * @member deviceMetadata Additional information about the IoT device + * @member gpsi GPSI of the IoT device if 5G-enabled + * @member pei PEI of the IoT device if 5G-enabled + * @member supi SUPI of the IoT device if 5G-enabled + * @member msisdn MSISDN of the IoT device if LTE-enabled + * @member imei IMEI of the IoT device if LTE-enabled + * @member imsi IMSI of the IoT device if LTE-enabled + * @member iccid ICCID of the IoT device + * @member deviceId Human-readable identifier of the IoT device + * @member requestedMecTrafficRule MEC traffic rules the IoT device is requested to be associated to + * @member requestedIotPlatformId IoT platform to which the IoT device is requested to be associated to + * @member deviceSpecificMessageFormats Format of the messages to be published by the MEC IoTS on the user transport provided by the associated IoT platform in case the MEC IoTS acts on behalf of the IoT device + * @member downlinkInfo Downlink communication configuration of the user transport provided by the associated IoT platform in case the MEC IoTS acts on behalf of the IoT device + * @member clientCertificate Client-side SSL/TLS certificate to be used by the MEC IoTS to interact with the user transport provided by the associated IoT platform in case the MEC IoTS acts on behalf of the IoT device + * @member enabled Indication whether the IoT device has a valid associated traffic rule (TRUE) or not (FALSE) + * @see ETSI GS MEC 033 V3.1.1 (2022-12) Table 6.2.2-1: Definition of type DeviceInfo + */ + type record DeviceInfo { + Json.String deviceAuthenticationInfo, + record of Json.String deviceMetadata optional, + Json.String gpsi optional, + Json.String pei optional, + Json.String supi optional, + Json.String msisdn optional, + Json.String imei optional, + Json.String imsi optional, + Json.String iccid optional, + Json.String deviceId, + TrafficRuleDescriptorList requestedMecTrafficRule optional, + Json.String requestedIotPlatformId optional, + DeviceSpecificMessageFormats deviceSpecificMessageFormats optional, + DownlinkInfo downlinkInfo optional, + Json.String clientCertificate optional, + Json.Bool + } // End of type DeviceInfo + + /** + * @desc + * @member eventMsgFormat Event message format configuration + * @member uplinkMsgFormat Uplink message format configuration + */ + type record DeviceSpecificMessageFormats { + EventMsg eventMsgFormat optional, + UplinkMsg uplinkMsgFormat optional + } // End of type DeviceSpecificMessageFormats + + /** + * @desc Downlink communication configuration of the user transport provided by the associated IoT platform in case the MEC IoTS acts on behalf of the IoT device + * @member downlinkTopic Topic associated to the IoT device + * @member devicePort UDP port to be used by the MEC IoTS for the outgoing downlink packets towards the IoT device + */ + type record DownlinkInfo { + Json.String downlinkTopic optional, + Json.Number devicePort optional + } // End of type DownlinkInfo + + /** + * @desc Information associated to a IoT platform + * @member iotPlatformId Identifier of the IoT platform + * @member userTransportInfoInformation about the user transport(s) provided by the IoT platform + * @member customServicesTransportInfo Transport enabling access to vendor-specific services provided by the IoT platform. The data + * @member enabled Indication whether the IoT platform is capable of providing user transports and vendor-specific services (TRUE) or not (FALSE) + * @see ETSI GS MEC 033 V3.1.1 (2022-12) Table 6.2.3-1: Definition of type IotPlatformInfo + */ + type record IotPlatformInfo { + Json.String iotPlatformId, + MBTransportInfoList userTransportInfo, + TransportInfoList customServicesTransportInfo optional, + Json.Bool enabled + } // End of IotPlatformInfo + + /** + * @desc User transport based on a message bus + * @member id The identifier of this transport as per ETSI GS MEC 011 [i.2] + * @member name The name of this transport as per ETSI GS MEC 011 [i.2] + * @member description Human-readable description of this transport as per ETSI GS MEC 011 [i.2] + * @member type_ Type of the transport + * @member protocol The name of the protocol used + * @member version The version of the protocol used as per ETSI GS MEC 011 [i.2] + * @member endpoint Information about the endpoint to access the transport as per ETSI GS MEC 011 [i.2] + * @member security Information about the security used by the transport as per ETSI GS MEC 011 [i.2] + * @member implSpecificInfo Additional implementation specific details of the transport + * @see ETSI GS MEC 033 V3.1.1 (2022-12) Table 6.3.2-1: Definition of type MBTransportInfo + */ + type record MBTransportInfo { + Json.String id String, + Json.String name, + Json.String description optional, + TransportType type_, + Json.String protocol, + Json.String version , + EndPointInfo endpoint, + SecurityInfo security, + ImplSpecificInfo implSpecificInfo Structure (inlined) 1 Additional implementation specific details of the transport. + } // End of type MBTransportInfo + type record of MBTransportInfo MBTransportInfoList; + + /** + * @desc + * @member eventTopics Topics used to publish events related to the established session between the IoT device(s) and the end IoT application(s) on the user transport + * @member uplinkTopics Topics used to publish data generated by the IoT device(s) on the user transport, in order to be consumed by the end IoT application(s) + * @member downlinkTopics Topics used to publish data generated by the IoT applications(s) on the user transport, in order to be consumed by the end IoT device(s) + * @see ETSI GS MEC 033 V3.1.1 (2022-12) Table 6.3.2-1: Definition of type MBTransportInfo + */ + type record ImplSpecificInfo { + EventTopics eventTopics optional, + UplinkTopics uplinkTopics optional, + DownlinkTopics downlinkTopics optional + } // End of type ImplSpecificInfo + type record of Json.String EventTopics; + type record of Json.String UplinkTopics; + type record of Json.String DownlinkTopics; + + type record of TrafficRuleDescriptor TrafficRuleDescriptorList; + type record of TransportInfo TransportInfoList; + + /** + * @desc Defines the format of the messages to be published on the user transport in order to provide application-specific information about events related to the established session between the IoT device and the end IoT application(s) + * @member eventTopic Topic where the message containing application-specific information should be published + * @member selectedSerializer Type of serializer to be used for the topic as per ETSI GS MEC 011 [i.2] + * @member includeDeviceAddr Indication whether to include the IP address of the IoT device (TRUE) or not (FALSE) + * @member includeDeviceMetadata Indication whether to include the metadata about the IoT device (TRUE) or not (FALSE) + * @member includeSupi Indication whether to include the SUPI of the IoT device (TRUE) or not (FALSE) + * @member includeImsi Indication whether to include the IMSI of the IoT device (TRUE) or not (FALSE) + * @member inclueIccid Indication whether to include the ICCID of the IoT device (TRUE) or not (FALSE) + * @member includeDeviceId Indication whether to include the humanreadable identified of the IoT device (TRUE) or not (FALSE) + * @member + * @see ETSI GS MEC 033 V3.1.1 (2022-12) Table 6.3.3-1: Definition of type EventMsg + */ + type record EventMsg { + Json.String eventTopic, + SerializerType selectedSerializer SerializerType, + Json.Bool includeDeviceAddr optional, + Json.Bool includeDeviceMetadata optional, + Json.Bool includeSupi optional, + Json.Bool includeImsi optional, + Json.Bool includeIccid optional, + Json.Bool includeDeviceId optional + } // End ot type EventMsg + + /** + * @desc Defines the format of the messages containing uplink data generated by the IoT device to be published on the user transport + * @member uplinkTopic Topic where the message containing the data generated by the IoT device(s) should be published, in order to be consumed by the end IoT application(s). + * @member selectedSerializer Type of serializer to be used for the topic as per ETSI GS MEC 011 [i.2] + * @member includeDeviceAddr Indication whether to include the IP address of the IoT device (TRUE) or not (FALSE) + * @member includeDeviceMetadata Indication whether to include the metadata about the IoT device (TRUE) or not (FALSE) + * @member includeSupi Indication whether to include the SUPI of the IoT device (TRUE) or not (FALSE) + * @member includeImsi Indication whether to include the IMSI of the IoT device (TRUE) or not (FALSE) + * @member inclueIccid Indication whether to include the ICCID of the IoT device (TRUE) or not (FALSE) + * @member includeDeviceId Indication whether to include the humanreadable identified of the IoT device (TRUE) or not (FALSE) + * @member + * @see ETSI GS MEC 033 V3.1.1 (2022-12) Table 6.3.4-1: Definition of type UplinkMsg + */ + type record UplinkMsg { + Json.String uplinkTopic, + SerializerType selectedSerializer SerializerType, + Json.Bool includeDeviceAddr optional, + Json.Bool includeDeviceMetadata optional, + Json.Bool includeSupi optional, + Json.Bool includeImsi optional, + Json.Bool includeIccid optional, + Json.Bool includeDeviceId optional + } // End ot type UplinkMsg + +} with { + encode "JSON" +} // End of module IotAPI_TypesAndValues \ No newline at end of file -- GitLab From 1fbd9beaab219c95a0faeb3c27304b5c461fbfda Mon Sep 17 00:00:00 2001 From: YannGarcia Date: Mon, 30 Jan 2023 15:02:30 +0100 Subject: [PATCH 02/58] Add skeleton for MEC040 and MEC033. Review typing for MEC011 --- gs032p3-ttcn-test-suite.code-workspace | 3 + ...Mec_FederationEnablementAPI_TestCases.ttcn | 0 ...c_FederationEnablementAPI_TestControl.ttcn | 0 ttcn/AtsMec_FederationEnablement/module.mk | 38 ++++ ttcn/AtsMec_Iot/AtsMec_IoTAPI_TestCases.ttcn | 0 .../AtsMec_Iot/AtsMec_IoTAPI_TestControl.ttcn | 0 ttcn/AtsMec_Iot/module.mk | 38 ++++ ...ycleAndOperationGrantingAPI_Templates.ttcn | 4 +- ...ndOperationGrantingAPI_TypesAndValues.ttcn | 119 +++++++++-- ...ormApplicationEnablementAPI_Templates.ttcn | 20 +- ...plicationEnablementAPI_TypesAndValues.ttcn | 185 ++++++++++++++++-- ttcn/LibMec/IotAPI/module.mk | 2 +- .../ttcn/LibHttp_JsonMessageBodyTypes.ttcn | 2 +- .../ttcn/LibHttp_JsonTemplates.ttcn | 8 +- 14 files changed, 374 insertions(+), 45 deletions(-) create mode 100644 ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn create mode 100644 ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn create mode 100644 ttcn/AtsMec_FederationEnablement/module.mk create mode 100644 ttcn/AtsMec_Iot/AtsMec_IoTAPI_TestCases.ttcn create mode 100644 ttcn/AtsMec_Iot/AtsMec_IoTAPI_TestControl.ttcn create mode 100644 ttcn/AtsMec_Iot/module.mk diff --git a/gs032p3-ttcn-test-suite.code-workspace b/gs032p3-ttcn-test-suite.code-workspace index 90c9d36..6894bd4 100644 --- a/gs032p3-ttcn-test-suite.code-workspace +++ b/gs032p3-ttcn-test-suite.code-workspace @@ -2,6 +2,9 @@ "folders": [ { "path": "." + }, + { + "path": "../gs032p2-test-purposes" } ], "settings": { diff --git a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn new file mode 100644 index 0000000..e69de29 diff --git a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn new file mode 100644 index 0000000..e69de29 diff --git a/ttcn/AtsMec_FederationEnablement/module.mk b/ttcn/AtsMec_FederationEnablement/module.mk new file mode 100644 index 0000000..dc03f6d --- /dev/null +++ b/ttcn/AtsMec_FederationEnablement/module.mk @@ -0,0 +1,38 @@ +suite := AtsMec_FederationEnablement + +sources := \ + AtsMec_FederationEnablementAPI_TestCases.ttcn \ + AtsMec_FederationEnablementAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/LocationAPI \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/RnisAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/IoTAPI \ + ../LibMec/FederationEnablementAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ + diff --git a/ttcn/AtsMec_Iot/AtsMec_IoTAPI_TestCases.ttcn b/ttcn/AtsMec_Iot/AtsMec_IoTAPI_TestCases.ttcn new file mode 100644 index 0000000..e69de29 diff --git a/ttcn/AtsMec_Iot/AtsMec_IoTAPI_TestControl.ttcn b/ttcn/AtsMec_Iot/AtsMec_IoTAPI_TestControl.ttcn new file mode 100644 index 0000000..e69de29 diff --git a/ttcn/AtsMec_Iot/module.mk b/ttcn/AtsMec_Iot/module.mk new file mode 100644 index 0000000..e7966c8 --- /dev/null +++ b/ttcn/AtsMec_Iot/module.mk @@ -0,0 +1,38 @@ +suite := AtsMec_IoT + +sources := \ + AtsMec_IoTAPI_TestCases.ttcn \ + AtsMec_IoTAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/LocationAPI \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/RnisAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/IoTAPI \ + ../LibMec/FederationEnablementAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ + diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn index f2bd971..4e19cc4 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn @@ -319,7 +319,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { template (omit) ServiceDependency m_service_dependency( in Json.String p_serName, in Json.String p_version, - in template (omit) CategoryRef p_serCategory := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.CategoryRef p_serCategory := omit, in template (omit) TransportDependency p_serTransportDependencies := omit, in template (omit) Json.String p_requestedPermissions := omit ) := { @@ -333,7 +333,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { template (present) ServiceDependency mw_service_dependency( template (present) Json.String p_serName := ?, template (present) Json.String p_version := ?, - template CategoryRef p_serCategory := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.CategoryRef p_serCategory := *, template TransportDependency p_serTransportDependencies := *, template Json.String p_requestedPermissions := * ) := { diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn index 97e8675..83abeee 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn @@ -9,12 +9,103 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { // LibMec import from LibMec_TypesAndValues all; - // LibMec_EdgePlatformApplicationEnablementAPI - import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; - // LibMec_ApplicationMobilityServiceAPI import from ApplicationMobilityServiceAPI_TypesAndValues all; + group edge_platform_application_enablement { + + /** + * @desc The enumeration TransportType represents types of transports. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.4-1: Enumeration TransportType + */ + type enumerated TransportType { + REST_HTTP, + MB_TOPIC_BASED, + MB_ROUTING, + MB_PUBSUB, + RPC, + RPC_STREAMING, + WEBSOCKET + } + + /** + * @desc List of supported OAuth 2.0 grant types. + */ + type enumerated GrantTypes { + OAUTH2_AUTHORIZATION_CODE, + OAUTH2_IMPLICIT_GRANT, + OAUTH2_RESOURCE_OWNER, + OAUTH2_CLIENT_CREDENTIALS + } + type record length(1..4) of GrantTypes GrantTypesList; + + /** + * @desc The token endpoint. + */ + type Json.String TokenEndpoint; + + /** + * @desc Parameters related to use of OAuth 2.0. + */ + type record OAuth2Info { + GrantTypesList grantTypes, + TokenEndpoint tokenEndpoint + } + + /** + * @desc This type represents security information related to a transport. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.5.4-1: Attributes of SecurityInfo + */ + type record SecurityInfo { + OAuth2Info oAuth2Info optional, + UInt8 extentions optional + } + + /** + * @desc The enumeration SerializerTypes represents types of serializers. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.3-1: Enumeration SerializerType + */ + type enumerated SerializerType { + JSON, + XML, + PROTOBUF3, + RAW // Used for invalid behavior + } + + /** + * @desc Reference of the catalogue. + */ + type Json.String CategoryRef_Href; + + /** + * @desc Unique identifier of the category. + */ + type Json.String CategoryRef_Id; + + /** + * @desc Name of the category. + */ + type Json.String Name; + + /** + * @desc Category version. + */ + type Json.String CategoryRef_Version; + + /** + * @desc This type represents the category reference. + */ + type record CategoryRef { + CategoryRef_Href href, + CategoryRef_Id id, + Name name, + CategoryRef_Version version + } + + type Json.String NotificationType; + + } // End of group edge_platform_application_enablement + group application_descriptor_information_model { /** @@ -262,7 +353,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { Json.String tunnelDstAddress, Json.String tunnelSrcAddress, Json.String tunnelSpecificData optional - } + } type enumerated TunnelType { GTP_U, @@ -285,7 +376,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { Json.String ipAddressType, IpAddress ipAddress, integer ttl optional - } + } /** * @desc The LatencyDescriptor data type describes latency requirements for a MEC application @@ -294,7 +385,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { */ type record LatencyDescriptor { UInt32 maxLatency - } + } /** * @desc The TerminateAppInstanceOpConfig data type supports the specification of MEC application requirements related to terminate application instance operation configuration @@ -329,7 +420,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { Json.String version, TransportDependency serTransportDependencies optional, Json.String requestedPermissions optional - } + } /** * @desc The TransportDependency data type supports the specification of requirements of a MEC application related to supported transport bindings (each being a combination of a transport with one or more serializers) @@ -342,7 +433,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { TransportDescriptor transport, SerializerType serializers, Labels labels - } + } type record length(1..infinity) of Json.String Labels; @@ -350,7 +441,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { * @desc The TransportDescriptor data type describes a transport * @member name The name of this transport * @member description Human-readable description of this transport - * @member type_ Type of the transport, as defined in the TransportTypes type in ETSI GS MEC 011 [17]i.0 + * @member type_ Type of the transport, as defined in the TransportType type in ETSI GS MEC 011 [17]i.0 * @member protocol The name of the protocol used. Shall be set to "HTTP" for a REST API * @member version The version of the protocol used * @member security Information about the security used by the transport in ETSI GS MEC 011 [17]i.0 @@ -360,12 +451,14 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { type record TransportDescriptor { Json.String name, Json.String description optional, - TransportTypes type_, + TransportType type_, Json.String protocol, Json.String version, SecurityInfo security, Json.String implSpecificInfo optional - } + } with { + variant (type_) "name as 'type'"; + } /** * @desc This data type represents the information of user context transfer capability of application @@ -376,7 +469,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { type record UserContextTransferCapability { Json.Bool statefulApplication, Json.Bool userContextTransferSupport optional - } + } /** * @desc This data type represents the network policy in the application instantiation and operation @@ -386,7 +479,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { */ type record AppNetworkPolicy { SteeredNetwork steeredNetwork - } + } /** * @desc Provides an option for the application to specify a type of network to carry the application traffic diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn index 4584bc9..b3e3d5f 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn @@ -52,17 +52,17 @@ module EdgePlatformApplicationEnablementAPI_Templates { extentions := * } // End of template mw_security_info - template (value) TransportInfo_Endpoint m_end_point_uris( - in template (value) EndPointInfo_UriList p_uris - ) := { + template (value) EndpointInfo m_end_point_uris( + in template (value) EndPointInfo_UriList p_uris + ) := { uris := p_uris, addresses := omit, alternative := omit } // End of template m_end_point_uris - template (present) TransportInfo_Endpoint mw_end_point_uris( - template (present) EndPointInfo_UriList p_uris := ? - ) := { + template (present) EndpointInfo mw_end_point_uris( + template (present) EndPointInfo_UriList p_uris := ? + ) := { uris := p_uris, addresses := *, alternative := * @@ -205,10 +205,10 @@ module EdgePlatformApplicationEnablementAPI_Templates { template (value) TransportInfo m_transport_info( in TransportInfo_Id p_id, in TransportInfo_Name p_name, - in TransportTypes p_type_, + in TransportType p_type_, in TransportInfo_Protocol p_protocol, in TransportInfo_Version p_version, - in template (value) TransportInfo_Endpoint p_endpoint, + in template (value) EndpointInfo p_endpoint, in template (value) SecurityInfo p_security ) := { id := p_id, @@ -225,10 +225,10 @@ module EdgePlatformApplicationEnablementAPI_Templates { template (present) TransportInfo mw_transport_info( template (present) TransportInfo_Id p_id := ?, template (present) TransportInfo_Name p_name := ?, - template (present) TransportTypes p_type_ := ?, + template (present) TransportType p_type_ := ?, template (present) TransportInfo_Protocol p_protocol := ?, template (present) TransportInfo_Version p_version := ?, - template (present) TransportInfo_Endpoint p_endpoint := ?, + template (present) EndpointInfo p_endpoint := ?, template (present) SecurityInfo p_security := ? ) := { id := p_id, diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn index ede77b5..0b58937 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn @@ -1,6 +1,6 @@ /** * @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_mec011v020201p.pdf + * @see https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/03.01.01_60/gs_MEC011v030101p.pdf */ module EdgePlatformApplicationEnablementAPI_TypesAndValues { @@ -10,6 +10,9 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { // LibCommon import from LibCommon_BasicTypesAndValues all; + // MEC-10-2 + import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; + /** * @desc Maximum timeout value in seconds for graceful termination or graceful stop of an application instance. */ @@ -30,6 +33,11 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc This type represents the information that the mobile edge platform notifies the subscribed application instance about the corresponding application instance termination/stop. + * @member notificationType Shall be set to "AppTerminationNotification" + * @member operationAction Operation that is being performed on the MEC application instance + * @member maxGracefulTimeout Maximum non-zero timeout value in seconds for graceful termination or graceful stop of an application instance + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.4.2-1: Attributes of AppTerminationNotification */ type record AppTerminationNotification { NotificationType notificationType, @@ -42,16 +50,19 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc This type represents the information that the MEC application instance provides to the MEC platform when informing it -that the application has completed its application level related terminate/stop actions, e.g. retention of application state -in the case of stop. + * that the application has completed its application level related terminate/stop actions, e.g. retention of application state + * in the case of stop. + * @member operationAction Operation that is being performed on the MEC application instance + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.4.3-1: Attributes of AppTerminationConfirmation */ type record AppTerminationConfirmation { OperationAction operationAction } /** - * @desc This type represents the information that the MEC application instance indicates to the MEC platform that it is up and -running + * @desc This type represents the information that the MEC application instance indicates to the MEC platform that it is up and running + * @member indication Indication about the MEC application instance + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.4.4-1: Attributes of AppReadyConfirmation */ type record AppReadyConfirmation { Json.String indication @@ -59,6 +70,7 @@ running /** * @desc Represents possible states of a MEC service instance + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.6-1: Enumeration ServiceState */ type enumerated ServiceState { ACTIVE (0), @@ -69,6 +81,10 @@ running /** * @desc This type represents the liveness information of a MEC service instance + * @member state Liveness state of the MEC service instance + * @member timeStamp The time when the last "heartbeat" message was received by MEC platform + * @member interval The interval (in seconds) between two consecutive "heartbeat" messages (see clause 8.2.10.3.3) that MEC platform has determined. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.2.4-1: Attributes of ServiceLivenessInfo */ type record ServiceLivenessInfo { ServiceState state, @@ -89,6 +105,11 @@ running /** * @desc This type represents the information that the mobile edge platform notifies the subscribed application instance about the corresponding application instance termination/stop. + * @member subscriptionType Shall be set to "AppTerminationNotificationSubscription" + * @member callbackReference URI selected by the MEC application instance to receive notifications on the subscribed MEC application instance management information + * @member links Object containing hyperlinks related to the resource + * @member appInstanceId It is used as the filtering criterion for the subscribed events + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.3.2-1: Attributes of AppTerminationNotificationSubscription */ type record AppTerminationNotificationSubscription { SubscriptionType subscriptionType, @@ -147,6 +168,7 @@ running /** * @desc Platform Time Source status. 1 = TRACEABLE - time source is locked to the UTC time source. 2 = NONTRACEABLE - time source is not locked to the UTC time source. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.2.5-1: Attributes of CurrentTime */ type enumerated TimeSourceStatus { TRACEABLE (1), @@ -158,6 +180,7 @@ running * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. * @member timeSourceStatus Platform Time Source status. 1 = TRACEABLE - time source is locked to the UTC time source. 2 = NONTRACEABLE - time source is not locked to the UTC time source. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.2.5-1: Attributes of CurrentTime */ type record CurrentTime { Seconds seconds, @@ -165,6 +188,45 @@ running TimeSourceStatus timeSourceStatus } + /** + * @desc This type represents the information provided by the MEC application instance as part of the "application registration request" and "application registration update" messages + * @member appName Name of the application. It shall be consistent with the appName in the AppD, if an AppD is available + * @member appProvider Provider of the application. It shall be consistent with the appProvider in the AppD, if an AppD is available + * @member appCategory Category of the application + * @member appDId The application descriptor identifier + * @member appInstanceId Identifier of the application instance + * @member endpoint Endpoint information (e.g. URI, FQDN, IP address) of the application server, which is part of the application functionalities + * @member appServiceRequired Describes services a MEC application requires to run + * @member appServiceOptional Describes services a MEC application may use if available + * @member appFeatureRequired Describes features a MEC application requires to run + * @member appFeatureOptional Describes features a MEC application may use if available + * @member isInsByMec Indicate whether the application instance is instantiated by the MEC Management + * @member appProfile Can be mapped to EAS profile as defined in ETSI TS 129 558 [19] + * @see ETSI GS MEC 011 V3.1.1 (2022-09) 7.1.2.6-1: Attributes of AppInfo + */ + type record AppInfo { + Json.String appName, + Json.String appProvider optional, + CategoryRef appCategory optional, + Json.String appDId optional, + Json.String appInstanceId optional, + EndpointInfo endpoint optional, + ServiceDependency appServiceRequired optional, + ServiceDependency appServiceOptional optional, + FeatureDependency appFeatureRequired optional, + FeatureDependency appFeatureOptional optional, + Json.Bool isInsByMec optional, + AppProfile appProfile optional + } // End of type AppInfo + + /** + * @desc + * @see ETSI TS 129 558 V17.2.0 + */ + type record AppProfile { + // TODO + } // End of type AppProfile + /** * @desc Type of the interface. */ @@ -187,6 +249,12 @@ running /** * @desc This type represents the destination interface. + * member interfaceType Type of the interface, e.g. TUNNEL, MAC, IP, etc + * member tunnelInfo Included only if the destination interface type is "tunnel" + * member srcMacAddress If the interface type is "MAC", source address identifies the MAC address of the interface + * member dstMacAddress If the interface type is "MAC", destination address identifies the MAC address of the interface + * member dstIpAddress If the interface type is "IP", destination address identifies the IP address of the remote destination + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.5.3-1: Attributes of DestinationInterface */ type record DestinationInterface { InterfaceType interfaceType, @@ -235,7 +303,14 @@ running type UInt32 Ttl; /** - * @desc This type represents the general information of a DNS rule. + * @desc This type represents the general information of a DNS rule + * member dnsRuleId Identifies the DNS Rule + * member domainName FQDN resolved by the DNS rule + * member ipAddressType 1 Specify the IP address type, value: IP_V6, IP_V4 + * member ipAddress IP address associated with the FQDN resolved by the DNS rule + * member ttl Time to live value, in seconds. + * member state Contains the DNS rule state: ACTIVE, INACTIVE + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.2.3-1: Attributes of DnsRule */ type record DnsRule { DnsRule_Id dnsRuleId, @@ -289,6 +364,11 @@ running */ type record length(1..infinity) of EndPointInfo_Uri EndPointInfo_UriList; + /** + * @desc Fully Qualified Domain Name of the service. + */ + type record length(1..infinity) of Json.String EndPointInfo_FqdnList; + /** * @desc This type represents a type of link and may be referenced from data structures. * @member href URI referring to a resource @@ -401,6 +481,7 @@ running /** * @desc This type represents security information related to a transport. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.5.4-1: Attributes of SecurityInfo */ type record SecurityInfo { OAuth2Info oAuth2Info optional, @@ -440,6 +521,12 @@ running /** * @desc Filtering criteria to match services for which events are requested to be reported + * @member serInstanceIds Identifiers of service instances about which to report events + * @member serNames Names of services about which to report events + * @member serCategories Categories of services about which to report events + * @member states States of the services about which to report events + * @member isLocal Restrict event reporting to whether the service is local to the MEC platform where the subscription is managed + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.3.2-1: Attributes of SerAvailabilityNotificationSubscription */ type record FilteringCriteria { SerInstanceIdList serInstanceIds optional, @@ -460,6 +547,7 @@ running /** * @desc The enumeration SerializerTypes represents types of serializers. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.3-1: Enumeration SerializerType */ type enumerated SerializerType { JSON, @@ -494,6 +582,7 @@ running /** * @desc Contains the types of locality. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.5-1: Enumeration LocalityType */ type enumerated LocalityType { MEC_SYSTEM, @@ -525,6 +614,20 @@ running /** * @desc This type represents the general information of a mobile edge service. + * @member serInstanceId Identifier of the service instance assigned by the MEPM/MEC platform + * @member serName The name of the service + * @member serCategory A Category reference + * @member version The version of the service + * @member state Contains the service state + * @member transportId Identifier of the platform-provided transport to be used by the service + * @member transportInfo Information regarding the transport used by the service + * @member serializer Indicate the supported serialization format of the service + * @member scopeOfLocality The scope of locality as expressed by "consumedLocalOnly" and "isLocal". + * @member consumedLocalOnly Indicate whether the service can only be consumed by the MEC applications located in the same locality (as defined by scopeOfLocality) as this service instance (TRUE) or not (FALSE) + * @member isLocal Indicate whether the service is located in the same locality (as defined by scopeOfLocality) as the consuming MEC application (TRUE) or not (FALSE) + * @member livenessInterval Interval (in seconds) between two consecutive "heartbeat" messages + * @member links Links to resources related to this resource + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.2.2-1: Attributes of ServiceInfo */ type record ServiceInfo { SerInstanceId serInstanceId optional, @@ -611,6 +714,14 @@ running /** * @desc NTP server detail. + * @member ntpServerAddrType Address type of NTP server + * @member ntpServerAddr NTP server address + * @member minPollingInterval Minimum poll interval for NTP messages + * @member maxPollingInterval Maximum poll interval for NTP messages + * @member localPriority NTP server local priority + * @member authenticationOption NTP authentication option + * @member authenticationKeyNum Authentication key number + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.2.4-1: Attributes of TimingCaps */ type record NtpServers { NtpServerAddrType ntpServerAddrType, @@ -644,7 +755,11 @@ running } /** - * @desc This type represents the information provided by the mobile edge platform in response to the Timing capabilities Query message. + * @desc This type represents the information provided by the mobile edge platform in response to the Timing capabilities Query message + * @member timeStamp + * @member ntpServers Number of available NTP servers + * @member ptpMasters Number of available PTP Servers (referred to as "masters" in IEEE 1588-2019™ [i.2]) + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.2.4-1: Attributes of TimingCaps */ type record TimingCaps { TimeStamp timeStamp optional, @@ -705,6 +820,20 @@ running /** * @desc This type represents the traffic filter. + * @member srcAddress An IP address or a range of IP address + * @member dstAddress An IP address or a range of IP address + * @member srcPort A port or a range of ports. + * @member dstPort A port or a range of ports. + * @member protocol Specify the protocol of the traffic filter + * @member tag Used for tag based traffic rule + * @member srcTunnelAddress Used for GTP tunnel based traffic rule + * @member tgtTunnelAddress Used for GTP tunnel based traffic rule + * @member srcTunnelPort Used for GTP tunnel based traffic rule + * @member dstTunnelPort Used for GTP tunnel based traffic rule + * @member qCI Used to match all packets that have the same QCI + * @member dSCP Used to match all IPv4 packets that have the same DSCP + * @member tC Used to match all IPv6 packets that have the same TC + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.5.2-1: Attributes of TrafficFilter */ type record TrafficFilter { TrafficFilter_AddressList srcAddress optional, @@ -762,7 +891,14 @@ running } /** - * @desc This type represents the general information of a traffic rule. + * @desc This type represents the general information of a traffic rule + * member trafficRuleId Identify the traffic rule. + * member filterType Definition of filter per FLOW or PACKET + * member priority Priority of this traffic rule within the range 0 to 255] + * member trafficFilter The filter used to identify specific packets that need to be handled by the MEC host + * member action The action of the MEC host data plane when a packet matches the trafficFilter + * member dstInterface Describes the destination interface information + * member state Contains the traffic rule state: ACTIVE, INACTIVE * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.2.2-1: Attributes of TrafficRule */ type record TrafficRule { @@ -809,25 +945,41 @@ running type Json.String TransportInfo_Version; /** - * @desc This type represents information about a transport endpoint. + * @desc This type represents information about a transport endpoint + * @member uris Entry point information of the service as string, formatted according to URI syntax (see IETF RFC 3986 [8]) + * @member fqdn Fully Qualified Domain Name of the service + * @member addresses Entry point information of the service as one or more pairs of IP address and port + * @member alternativeEntry point information of the service in a format defined by an implementation, or in an external specification + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.5.3-1: Attributes of EndpointInfo */ - type record TransportInfo_Endpoint { + type record EndpointInfo { EndPointInfo_UriList uris optional, + EndPointInfo_FqdnList fqdn optional, EndPointInfo_AddressList addresses optional, EndPointInfo_Alternative alternative optional } /** * @desc This type represents the general information of a mobile edge service. + * @member id The identifier of this transport + * @member name The name of this transport + * @member description Human-readable description of this transport + * @member type_ Type of the transport + * @member protocol The name of the protocol used. Shall be set to "HTTP" for a REST API + * @member version The version of the protocol used + * @member endpoint Information about the endpoint to access the transport + * @member security Information about the security used by the transport + * @member implSpecificInfo Additional implementation specific details of the transport + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.2.3-1: Attributes of TransportInfo */ type record TransportInfo { TransportInfo_Id id, TransportInfo_Name name, TransportInfo_Description description optional, - TransportTypes type_, + TransportType type_, TransportInfo_Protocol protocol, TransportInfo_Version version, - TransportInfo_Endpoint endpoint, + EndpointInfo endpoint, SecurityInfo security, TransportInfo_ImplSpecificInfo implSpecificInfo optional } with { @@ -836,9 +988,10 @@ running type record of TransportInfo TransportInfoList; /** - * @desc The enumeration TransportTypes represents types of transports. + * @desc The enumeration TransportType represents types of transports. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.4-1: Enumeration TransportType */ - type enumerated TransportTypes { + type enumerated TransportType { REST_HTTP, MB_TOPIC_BASED, MB_ROUTING, @@ -868,6 +1021,10 @@ running /** * @desc This type represents the tunnel information. + * @member tunnelType Type of the tunnel, e.g. GTP_U, GRE, etc + * @member tunnelDstAddress Destination address of the tunnel + * @member tunnelSrcAddress Source address of the tunnel + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.5.4-1: Attributes of TunnelInfo */ type record TunnelInfo { TunnelInfo_TunnelType tunnelType, diff --git a/ttcn/LibMec/IotAPI/module.mk b/ttcn/LibMec/IotAPI/module.mk index 1d3e297..d3033e4 100644 --- a/ttcn/LibMec/IotAPI/module.mk +++ b/ttcn/LibMec/IotAPI/module.mk @@ -3,4 +3,4 @@ sources := \ ttcn/IotAPI_Pixits.ttcn \ ttcn/IotAPI_Templates.ttcn \ ttcn/IotAPI_TypesAndValues.ttcn \ - ../EdgePlatformApplicationEnablementAPI\/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn + ../../ttcn/EdgePlatformApplicationEnablementAPI/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index 6b91648..75ff0a7 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -112,7 +112,7 @@ module LibHttp_JsonMessageBodyTypes { /* AppLCM_TypesAndValues.SubscriptionInfo subscriptionInfo, */ /* AppLCM_TypesAndValues.Notification lcmNotification, */ UEAppInterfaceAPI_TypesAndValues.AppContext appContext, - AppInfo appInfo, + UEAppInterfaceAPI_TypesAndValues.AppInfo appInfo, ServiceInfoList serviceInfoList, ServiceInfo serviceInfo, EdgePlatformApplicationEnablementAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList_app_ens, diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn index b4e9720..5f713e6 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -934,14 +934,14 @@ group ams_api { } // End of template mw_body_json_app_context template (value) JsonBody m_body_json_app_info( - in template (value) AppInfo p_appInfo - ) := { + in template (value) UEAppInterfaceAPI_TypesAndValues.AppInfo p_appInfo + ) := { appInfo := p_appInfo } // End of template m_body_json_app_info template (present) JsonBody mw_body_json_app_info( - template (present) AppInfo p_appInfo := ? - ) := { + template (present) UEAppInterfaceAPI_TypesAndValues.AppInfo p_appInfo := ? + ) := { appInfo := p_appInfo } // End of template mw_body_json_app_info -- GitLab From 99728e6c3ad1e0350084dbd5bfab8617be2ed43e Mon Sep 17 00:00:00 2001 From: YannGarcia Date: Mon, 13 Feb 2023 11:46:40 +0100 Subject: [PATCH 03/58] Update skeleton for MEC040 and MEC033 --- ccsrc/Protocols/Http/http_codec_mec.cc | 9 ++- ...Mec_FederationEnablementAPI_TestCases.ttcn | 25 +++++++ ...c_FederationEnablementAPI_TestControl.ttcn | 16 +++++ ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn | 25 +++++++ .../AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn | 16 +++++ ttcn/{AtsMec_Iot => AtsMec_IoT}/module.mk | 0 ttcn/AtsMec_Iot/AtsMec_IoTAPI_TestCases.ttcn | 0 .../AtsMec_Iot/AtsMec_IoTAPI_TestControl.ttcn | 0 ...ormApplicationEnablementAPI_Templates.ttcn | 8 +-- ...plicationEnablementAPI_TypesAndValues.ttcn | 66 +++++++++---------- ttcn/LibMec/FederationEnablementAPI/module.mk | 1 + .../FederationEnablementAPI_Functions.ttcn | 3 + .../ttcn/FederationEnablementAPI_Pics.ttcn | 3 + .../ttcn/FederationEnablementAPI_Pixits.ttcn | 3 + .../FederationEnablementAPI_Templates.ttcn | 3 + ...ederationEnablementAPI_TypesAndValues.ttcn | 4 +- ttcn/LibMec/IoTAPI/module.mk | 6 ++ ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn | 3 + ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pics.ttcn | 3 + ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn | 3 + ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn | 3 + .../ttcn/IoTAPI_TypesAndValues.ttcn} | 29 ++++---- ttcn/LibMec/IotAPI/module.mk | 6 -- .../LibCommon_Sync.ttcn | 1 + 24 files changed, 176 insertions(+), 60 deletions(-) create mode 100644 ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn create mode 100644 ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn rename ttcn/{AtsMec_Iot => AtsMec_IoT}/module.mk (100%) delete mode 100644 ttcn/AtsMec_Iot/AtsMec_IoTAPI_TestCases.ttcn delete mode 100644 ttcn/AtsMec_Iot/AtsMec_IoTAPI_TestControl.ttcn create mode 100644 ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Functions.ttcn create mode 100644 ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pics.ttcn create mode 100644 ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pixits.ttcn create mode 100644 ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Templates.ttcn create mode 100644 ttcn/LibMec/IoTAPI/module.mk create mode 100644 ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn create mode 100644 ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pics.ttcn create mode 100644 ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn create mode 100644 ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn rename ttcn/LibMec/{IotAPI/ttcn/IotAPI_TypesAndValues.ttcn => IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn} (91%) delete mode 100644 ttcn/LibMec/IotAPI/module.mk diff --git a/ccsrc/Protocols/Http/http_codec_mec.cc b/ccsrc/Protocols/Http/http_codec_mec.cc index f6df151..362bdac 100644 --- a/ccsrc/Protocols/Http/http_codec_mec.cc +++ b/ccsrc/Protocols/Http/http_codec_mec.cc @@ -28,13 +28,16 @@ bool http_codec_mec::decode_body_json(const OCTETSTRING &p_data, LibHttp__JsonMe loggers::get_instance().log(">>> http_codec_mec::decode_body_json"); if (_codecs["json"].get() != nullptr) { - loggers::get_instance().log("http_codec::decode_body: Call 'json_codec'"); + loggers::get_instance().log("http_codec::decode_body_json: Call 'json_codec'"); if (_codecs["json"]->decode(p_data, (Record_Type&)p_json_body, p_params) == -1) { - loggers::get_instance().warning("http_codec::decode_body: Failed to decode JSON message"); + loggers::get_instance().warning("http_codec::decode_body_json: Failed to decode JSON message"); p_json_body.raw() = CHARSTRING(p_data.lengthof(), (char*)static_cast(p_data)); } else { - loggers::get_instance().log_msg("http_codec::decode_body: Decoded message:", p_json_body); + loggers::get_instance().log_msg("http_codec::decode_body_json: Decoded message:", p_json_body); } + } else { + loggers::get_instance().error("http_codec::decode_body_json: Codec not found"); + return false; } return true; diff --git a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn index e69de29..121d712 100644 --- a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn +++ b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn @@ -0,0 +1,25 @@ +module AtsMec_FederationEnablementAPI_TestCases { + + // Libcommon + import from LibCommon_Sync all; + + // LibHttp + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec/FederationEnablementAPI + import from FederationEnablementAPI_TypesAndValues all; + import from FederationEnablementAPI_Templates all; + import from FederationEnablementAPI_Functions all; + import from FederationEnablementAPI_Pics all; + import from FederationEnablementAPI_Pixits all; + + // LibMec + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + +} // End of module AtsMec_FederationEnablementAPI_TestCases diff --git a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn index e69de29..73c204b 100644 --- a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn +++ b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn @@ -0,0 +1,16 @@ +module AtsMec_FederationEnablementAPI_TestControl { + + // LibMec/FederationEnablementAPI + import from FederationEnablementAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec_FederationEnablementAPI + import from AtsMec_FederationEnablementAPI_TestCases all; + + control { + + } // End of 'control' statement + +} // End of module AtsMec_FederationEnablementAPI_TestControl diff --git a/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn new file mode 100644 index 0000000..f02d4df --- /dev/null +++ b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn @@ -0,0 +1,25 @@ +module AtsMec_IoTAPI_TestCases { + + // Libcommon + import from LibCommon_Sync all; + + // LibHttp + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec/IoTAPI + import from IoTAPI_TypesAndValues all; + import from IoTAPI_Templates all; + import from IoTAPI_Functions all; + import from IoTAPI_Pics all; + import from IoTAPI_Pixits all; + + // LibMec + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + +} // End of module AtsMec_IoTAPI_TestCases diff --git a/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn new file mode 100644 index 0000000..ad2c195 --- /dev/null +++ b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn @@ -0,0 +1,16 @@ +module AtsMec_IoTAPI_TestControl { + + // LibMec/IoTAPI + import from IoTAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec_IoTAPI + import from AtsMec_IoTAPI_TestCases all; + + control { + + } // End of 'control' statement + +} // End of module AtsMec_IoTAPI_TestControl diff --git a/ttcn/AtsMec_Iot/module.mk b/ttcn/AtsMec_IoT/module.mk similarity index 100% rename from ttcn/AtsMec_Iot/module.mk rename to ttcn/AtsMec_IoT/module.mk diff --git a/ttcn/AtsMec_Iot/AtsMec_IoTAPI_TestCases.ttcn b/ttcn/AtsMec_Iot/AtsMec_IoTAPI_TestCases.ttcn deleted file mode 100644 index e69de29..0000000 diff --git a/ttcn/AtsMec_Iot/AtsMec_IoTAPI_TestControl.ttcn b/ttcn/AtsMec_Iot/AtsMec_IoTAPI_TestControl.ttcn deleted file mode 100644 index e69de29..0000000 diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn index b3e3d5f..fd90167 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn @@ -52,7 +52,7 @@ module EdgePlatformApplicationEnablementAPI_Templates { extentions := * } // End of template mw_security_info - template (value) EndpointInfo m_end_point_uris( + template (value) EndPointInfo m_end_point_uris( in template (value) EndPointInfo_UriList p_uris ) := { uris := p_uris, @@ -60,7 +60,7 @@ module EdgePlatformApplicationEnablementAPI_Templates { alternative := omit } // End of template m_end_point_uris - template (present) EndpointInfo mw_end_point_uris( + template (present) EndPointInfo mw_end_point_uris( template (present) EndPointInfo_UriList p_uris := ? ) := { uris := p_uris, @@ -208,7 +208,7 @@ module EdgePlatformApplicationEnablementAPI_Templates { in TransportType p_type_, in TransportInfo_Protocol p_protocol, in TransportInfo_Version p_version, - in template (value) EndpointInfo p_endpoint, + in template (value) EndPointInfo p_endpoint, in template (value) SecurityInfo p_security ) := { id := p_id, @@ -228,7 +228,7 @@ module EdgePlatformApplicationEnablementAPI_Templates { template (present) TransportType p_type_ := ?, template (present) TransportInfo_Protocol p_protocol := ?, template (present) TransportInfo_Version p_version := ?, - template (present) EndpointInfo p_endpoint := ?, + template (present) EndPointInfo p_endpoint := ?, template (present) SecurityInfo p_security := ? ) := { id := p_id, diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn index 0b58937..f34deb8 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn @@ -68,35 +68,6 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { Json.String indication } - /** - * @desc Represents possible states of a MEC service instance - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.6-1: Enumeration ServiceState - */ - type enumerated ServiceState { - ACTIVE (0), - INACTIVE (1), - SUSPENDED (2) - } - type record length(1..infinity) of ServiceState ServiceStateList; - - /** - * @desc This type represents the liveness information of a MEC service instance - * @member state Liveness state of the MEC service instance - * @member timeStamp The time when the last "heartbeat" message was received by MEC platform - * @member interval The interval (in seconds) between two consecutive "heartbeat" messages (see clause 8.2.10.3.3) that MEC platform has determined. - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.2.4-1: Attributes of ServiceLivenessInfo - */ - type record ServiceLivenessInfo { - ServiceState state, - TimeStamp timeStamp, - integer interval - } - - /** - * @desc It is used as the filtering criterion for the subscribed events. - */ - type Json.String AppInstanceId; - /** * @desc URI selected by the mobile edge application instance to receive notifications on the subscribed mobile edge application instance management information. * This shall be included in both the request and the response." @@ -125,6 +96,35 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { */ type Json.String SubscriptionType; + /** + * @desc It is used as the filtering criterion for the subscribed events. + */ + type Json.String AppInstanceId; + + /** + * @desc Represents possible states of a MEC service instance + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.6-1: Enumeration ServiceState + */ + type enumerated ServiceState { + ACTIVE (0), + INACTIVE (1), + SUSPENDED (2) + } + type record length(1..infinity) of ServiceState ServiceStateList; + + /** + * @desc This type represents the liveness information of a MEC service instance + * @member state Liveness state of the MEC service instance + * @member timeStamp The time when the last "heartbeat" message was received by MEC platform + * @member interval The interval (in seconds) between two consecutive "heartbeat" messages (see clause 8.2.10.3.3) that MEC platform has determined. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.2.4-1: Attributes of ServiceLivenessInfo + */ + type record ServiceLivenessInfo { + ServiceState state, + TimeStamp timeStamp, + integer interval + } + /** * @desc Reference of the catalogue. */ @@ -210,7 +210,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { CategoryRef appCategory optional, Json.String appDId optional, Json.String appInstanceId optional, - EndpointInfo endpoint optional, + EndPointInfo endpoint optional, ServiceDependency appServiceRequired optional, ServiceDependency appServiceOptional optional, FeatureDependency appFeatureRequired optional, @@ -950,9 +950,9 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @member fqdn Fully Qualified Domain Name of the service * @member addresses Entry point information of the service as one or more pairs of IP address and port * @member alternativeEntry point information of the service in a format defined by an implementation, or in an external specification - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.5.3-1: Attributes of EndpointInfo + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.5.3-1: Attributes of EndPointInfo */ - type record EndpointInfo { + type record EndPointInfo { EndPointInfo_UriList uris optional, EndPointInfo_FqdnList fqdn optional, EndPointInfo_AddressList addresses optional, @@ -979,7 +979,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { TransportType type_, TransportInfo_Protocol protocol, TransportInfo_Version version, - EndpointInfo endpoint, + EndPointInfo endpoint, SecurityInfo security, TransportInfo_ImplSpecificInfo implSpecificInfo optional } with { diff --git a/ttcn/LibMec/FederationEnablementAPI/module.mk b/ttcn/LibMec/FederationEnablementAPI/module.mk index a7bdf52..ff13bd4 100644 --- a/ttcn/LibMec/FederationEnablementAPI/module.mk +++ b/ttcn/LibMec/FederationEnablementAPI/module.mk @@ -2,4 +2,5 @@ sources := \ ttcn/FederationEnablementAPI_Pics.ttcn \ ttcn/FederationEnablementAPI_Pixits.ttcn \ ttcn/FederationEnablementAPI_Templates.ttcn \ + ttcn/FederationEnablementAPI_Functions.ttcn \ ttcn/FederationEnablementAPI_TypesAndValues.ttcn diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Functions.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Functions.ttcn new file mode 100644 index 0000000..92a7a6a --- /dev/null +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Functions.ttcn @@ -0,0 +1,3 @@ +module FederationEnablementAPI_Functions { + +} // End of modue FederationEnablementAPI_Functions \ No newline at end of file diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pics.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pics.ttcn new file mode 100644 index 0000000..a04be3d --- /dev/null +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pics.ttcn @@ -0,0 +1,3 @@ +module FederationEnablementAPI_Pics { + +} // End of module FederationEnablementAPI_Pics \ No newline at end of file diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pixits.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pixits.ttcn new file mode 100644 index 0000000..ba1c4a9 --- /dev/null +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pixits.ttcn @@ -0,0 +1,3 @@ +module FederationEnablementAPI_Pixits { + +} // End of module FederationEnablementAPI_Pixits \ No newline at end of file diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Templates.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Templates.ttcn new file mode 100644 index 0000000..77eebbe --- /dev/null +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Templates.ttcn @@ -0,0 +1,3 @@ +module FederationEnablementAPI_Templates { + +} // End of module FederationEnablementAPI_Templates \ No newline at end of file diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_TypesAndValues.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_TypesAndValues.ttcn index d32ddd7..1e7895b 100644 --- a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_TypesAndValues.ttcn @@ -9,6 +9,8 @@ module FederationEnablementAPI_TypesAndValues { // LibCommon import from LibCommon_BasicTypesAndValues all; + + import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; /** * @desc Information provided by the MEC orchestrator as a part of the "Registration of MEC system to the federation" @@ -31,7 +33,7 @@ module FederationEnablementAPI_TypesAndValues { */ type record SystemInfoUpdate { Json.String systemName optional, - EndPointInfo endpoint optional + EdgePlatformApplicationEnablementAPI_TypesAndValues.EndPointInfo endpoint optional } // End of type SystemInfoUpdate } with { diff --git a/ttcn/LibMec/IoTAPI/module.mk b/ttcn/LibMec/IoTAPI/module.mk new file mode 100644 index 0000000..150ca46 --- /dev/null +++ b/ttcn/LibMec/IoTAPI/module.mk @@ -0,0 +1,6 @@ +sources := \ + ttcn/IoTAPI_Pics.ttcn \ + ttcn/IoTAPI_Pixits.ttcn \ + ttcn/IoTAPI_Templates.ttcn \ + ttcn/IoTAPI_Functions.ttcn \ + ttcn/IoTAPI_TypesAndValues.ttcn diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn new file mode 100644 index 0000000..3a5a360 --- /dev/null +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn @@ -0,0 +1,3 @@ +module IoTAPI_Functions { + +} // End of IoTAPI_Functions diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pics.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pics.ttcn new file mode 100644 index 0000000..9d74084 --- /dev/null +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pics.ttcn @@ -0,0 +1,3 @@ +module IoTAPI_Pics { + +} // End of IoTAPI_Pics diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn new file mode 100644 index 0000000..9a5c93b --- /dev/null +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn @@ -0,0 +1,3 @@ +module IoTAPI_Pixits { + +} // End of IoTAPI_Pixits diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn new file mode 100644 index 0000000..a27bba0 --- /dev/null +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn @@ -0,0 +1,3 @@ +module IoTAPI_Templates { + +} // End of IoTAPI_Templates diff --git a/ttcn/LibMec/IotAPI/ttcn/IotAPI_TypesAndValues.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn similarity index 91% rename from ttcn/LibMec/IotAPI/ttcn/IotAPI_TypesAndValues.ttcn rename to ttcn/LibMec/IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn index 48d34be..94f21a9 100644 --- a/ttcn/LibMec/IotAPI/ttcn/IotAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn @@ -2,7 +2,7 @@ * @desc The ETSI MEC ISG MEC033 Radio Network Information API described using OpenAPI * @see https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_MEC033v030101p.pdf */ -module IotAPI_TypesAndValues { +module IoTAPI_TypesAndValues { // JSON import from Json all; @@ -10,9 +10,12 @@ module IotAPI_TypesAndValues { // LibCommon import from LibCommon_BasicTypesAndValues all; + // MEC-010-1 + import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; + // MEC-011 import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; - + /** * @desc Information associated to an IoT device * @member deviceAuthenticationInfo Information needed for secondary authentication of the IoT device to the data network @@ -49,7 +52,7 @@ module IotAPI_TypesAndValues { DeviceSpecificMessageFormats deviceSpecificMessageFormats optional, DownlinkInfo downlinkInfo optional, Json.String clientCertificate optional, - Json.Bool + Json.Bool enabled } // End of type DeviceInfo /** @@ -101,15 +104,15 @@ module IotAPI_TypesAndValues { * @see ETSI GS MEC 033 V3.1.1 (2022-12) Table 6.3.2-1: Definition of type MBTransportInfo */ type record MBTransportInfo { - Json.String id String, + Json.String id, Json.String name, Json.String description optional, - TransportType type_, + EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType type_, Json.String protocol, Json.String version , - EndPointInfo endpoint, - SecurityInfo security, - ImplSpecificInfo implSpecificInfo Structure (inlined) 1 Additional implementation specific details of the transport. + EdgePlatformApplicationEnablementAPI_TypesAndValues.EndPointInfo endpoint, + EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo security, + ImplSpecificInfo implSpecificInfo } // End of type MBTransportInfo type record of MBTransportInfo MBTransportInfoList; @@ -129,8 +132,8 @@ module IotAPI_TypesAndValues { type record of Json.String UplinkTopics; type record of Json.String DownlinkTopics; - type record of TrafficRuleDescriptor TrafficRuleDescriptorList; - type record of TransportInfo TransportInfoList; + type record of ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficRuleDescriptor TrafficRuleDescriptorList; + type record of EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfo TransportInfoList; /** * @desc Defines the format of the messages to be published on the user transport in order to provide application-specific information about events related to the established session between the IoT device and the end IoT application(s) @@ -147,7 +150,7 @@ module IotAPI_TypesAndValues { */ type record EventMsg { Json.String eventTopic, - SerializerType selectedSerializer SerializerType, + EdgePlatformApplicationEnablementAPI_TypesAndValues.SerializerType selectedSerializer, Json.Bool includeDeviceAddr optional, Json.Bool includeDeviceMetadata optional, Json.Bool includeSupi optional, @@ -171,7 +174,7 @@ module IotAPI_TypesAndValues { */ type record UplinkMsg { Json.String uplinkTopic, - SerializerType selectedSerializer SerializerType, + EdgePlatformApplicationEnablementAPI_TypesAndValues.SerializerType selectedSerializer, Json.Bool includeDeviceAddr optional, Json.Bool includeDeviceMetadata optional, Json.Bool includeSupi optional, @@ -182,4 +185,4 @@ module IotAPI_TypesAndValues { } with { encode "JSON" -} // End of module IotAPI_TypesAndValues \ No newline at end of file +} // End of module IoTAPI_TypesAndValues \ No newline at end of file diff --git a/ttcn/LibMec/IotAPI/module.mk b/ttcn/LibMec/IotAPI/module.mk deleted file mode 100644 index d3033e4..0000000 --- a/ttcn/LibMec/IotAPI/module.mk +++ /dev/null @@ -1,6 +0,0 @@ -sources := \ - ttcn/IotAPI_Pics.ttcn \ - ttcn/IotAPI_Pixits.ttcn \ - ttcn/IotAPI_Templates.ttcn \ - ttcn/IotAPI_TypesAndValues.ttcn \ - ../../ttcn/EdgePlatformApplicationEnablementAPI/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn diff --git a/ttcn/patch_lib_common_titan/LibCommon_Sync.ttcn b/ttcn/patch_lib_common_titan/LibCommon_Sync.ttcn index 38e29df..7b95770 100644 --- a/ttcn/patch_lib_common_titan/LibCommon_Sync.ttcn +++ b/ttcn/patch_lib_common_titan/LibCommon_Sync.ttcn @@ -777,6 +777,7 @@ module LibCommon_Sync { // leave it to be ok to receive anything else // in case that the user has added any non-sync ports to // his/her server component type definition! + repeat; } [] tc_sync.timeout{ log("**** f_serverSyncClientsTimed: A client is not responding within specified time limit - sync server is sending stop to all clients! ****"); -- GitLab From 25f887a19dbdef1e5f707940afa296c85612f295 Mon Sep 17 00:00:00 2001 From: YannGarcia Date: Fri, 24 Feb 2023 07:45:43 +0100 Subject: [PATCH 04/58] Reorganize patch_lib_common_titan --- README.md | 4 +- titan-test-system-framework | 2 +- ttcn/LibMec/ttcn/LibMec_Pixits.ttcn | 6 +- .../module/src/Abstract_Socket.cc | 2 +- .../LibCommon_BasicTypesAndValues.ttcn | 64 +- .../LibCommon_DataStrings.ttcn | 168 ++ .../LibCommon_Sync.ttcn | 4 +- .../ttcn/LibCommon_BasicTypesAndValues.ttcn | 247 +++ .../ttcn/LibCommon_Sync.ttcn | 1359 +++++++++++++++++ .../docker-dev/home/etc/init.d/40-ttf_t012.sh | 4 +- virtualization/vagrant/provisioner.bash | 4 +- 11 files changed, 1819 insertions(+), 45 deletions(-) create mode 100644 ttcn/patch_lib_common_titan/LibCommon_DataStrings.ttcn create mode 100644 ttcn/patch_lib_common_titan/ttcn/LibCommon_BasicTypesAndValues.ttcn create mode 100644 ttcn/patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn diff --git a/README.md b/README.md index 2407730..7ae085f 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ $ ln -sf module_mec.mk module.mk ```sh $ cd ../../.. $ cp ./ttcn/patch_lib_common_titan/module.mk ./ttcn/LibCommon/ -$ cp ./ttcn/patch_lib_common_titan/*.ttcn ./ttcn/LibCommon/ttcn +$ cp ./ttcn/patch_lib_common_titan/ttcn/*.ttcn ./ttcn/LibCommon/ttcn ``` - From the ETSI MEC Test System root directory, build the Docker image executing the following commands: @@ -301,7 +301,7 @@ $ ln -sf module_mec.mk module.mk ```sh $ cd /home/etsi/dev/gs032p3-ttcn-test-suite $ cp ./ttcn/patch_lib_common_titan/module.mk ./ttcn/LibCommon/ -$ cp ./ttcn/patch_lib_common_titan/*.ttcn ./ttcn/LibCommon/ +$ cp ./ttcn/patch_lib_common_titan/ttcn/*.ttcn ./ttcn/LibCommon/ttcn ``` - Update your default environment with the content of the script $HOME/dev/gs032p3-ttcn-test-suite/scripts/devenv.bash.ubuntu diff --git a/titan-test-system-framework b/titan-test-system-framework index b3e32ae..3c00b81 160000 --- a/titan-test-system-framework +++ b/titan-test-system-framework @@ -1 +1 @@ -Subproject commit b3e32ae45e559819ba3eab8ba748a03ff6fdd284 +Subproject commit 3c00b81c1e158922c83ae0c0de5288631dd1a2be diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index c694216..0ebeb92 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -68,13 +68,13 @@ module LibMec_Pixits { modulepar charstring PX_MEC_SVC_MGMT_APPS_URI := "/mec_service_mgmt/v1/applications"; - modulepar charstring PX_ME_APP_SUPPORT_TIMING_CURRENT_URI := "/mec_app_support/v1/timing/current_time"; + modulepar charstring PX_ME_APP_SUPPORT_TIMING_CURRENT_URI := "//timing/current_time"; - modulepar charstring PX_ME_APP_SUPPORT_URI := "/mec_app_support/v1/applications"; + modulepar charstring PX_ME_APP_SUPPORT_URI := "/applications"; modulepar charstring PX_MEC_SVC_MGMT_SVC_URI := "/mec_service_mgmt/v1/services"; - modulepar charstring PX_ME_APP_SUPPORT_TIMING_CAPS_URI := "/mec_app_support/v1/timing/timing_caps"; + modulepar charstring PX_ME_APP_SUPPORT_TIMING_CAPS_URI := "//timing/timing_caps"; modulepar charstring PX_FAI_FA_INFO_URI := "/fai/v1/fa_info"; diff --git a/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.cc b/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.cc index fcff30b..38bc8f5 100644 --- a/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.cc +++ b/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.cc @@ -43,7 +43,7 @@ #endif -#define AS_TCP_CHUNCK_SIZE 4096 +#define AS_TCP_CHUNCK_SIZE 4096 + 1024 #define AS_SSL_CHUNCK_SIZE 16384 // Used for the 'address already in use' bug workaround #define AS_DEADLOCK_COUNTER 16 diff --git a/ttcn/patch_lib_common_titan/LibCommon_BasicTypesAndValues.ttcn b/ttcn/patch_lib_common_titan/LibCommon_BasicTypesAndValues.ttcn index 5758c7c..9b5477d 100644 --- a/ttcn/patch_lib_common_titan/LibCommon_BasicTypesAndValues.ttcn +++ b/ttcn/patch_lib_common_titan/LibCommon_BasicTypesAndValues.ttcn @@ -172,38 +172,38 @@ const integer c_int32Max := 2147483647; type integer Int; - type integer Int1 (c_int1Min .. c_int1Max) with { variant "1 bit, COMP(2scompl)" }; - type integer Int2 (c_int2Min .. c_int2Max) with { variant "2 bit, COMP(2scompl)" }; - type integer Int3 (c_int3Min .. c_int3Max) with { variant "3 bit, COMP(2scompl)" }; - type integer Int4 (c_int4Min .. c_int4Max) with { variant "4 bit, COMP(2scompl)" }; - type integer Int5 (c_int5Min .. c_int5Max) with { variant "5 bit, COMP(2scompl)" }; - type integer Int6 (c_int6Min .. c_int6Max) with { variant "6 bit, COMP(2scompl)" }; - type integer Int7 (c_int7Min .. c_int7Max) with { variant "7 bit, COMP(2scompl)" }; - type integer Int8 (c_int8Min .. c_int8Max) with { variant "8 bit, COMP(2scompl)" }; - type integer Int9 (c_int9Min .. c_int9Max) with { variant "9 bit, COMP(2scompl)" }; - type integer Int10 (c_int10Min .. c_int10Max) with { variant "10 bit, COMP(2scompl)" }; - type integer Int11 (c_int11Min .. c_int11Max) with { variant "11 bit, COMP(2scompl)" }; - type integer Int12 (c_int12Min .. c_int12Max) with { variant "12 bit, COMP(2scompl)" }; - type integer Int13 (c_int13Min .. c_int13Max) with { variant "13 bit, COMP(2scompl)" }; - type integer Int14 (c_int14Min .. c_int14Max) with { variant "14 bit, COMP(2scompl)" }; - type integer Int15 (c_int15Min .. c_int15Max) with { variant "15 bit, COMP(2scompl)" }; - type integer Int16 (c_int16Min .. c_int16Max) with { variant "16 bit, COMP(2scompl)" }; - type integer Int17 (c_int17Min .. c_int17Max) with { variant "17 bit, COMP(2scompl)" }; - type integer Int18 (c_int18Min .. c_int18Max) with { variant "18 bit, COMP(2scompl)" }; - type integer Int19 (c_int19Min .. c_int19Max) with { variant "19 bit, COMP(2scompl)" }; - type integer Int20 (c_int20Min .. c_int20Max) with { variant "20 bit, COMP(2scompl)" }; - type integer Int21 (c_int21Min .. c_int21Max) with { variant "21 bit, COMP(2scompl)" }; - type integer Int22 (c_int22Min .. c_int22Max) with { variant "22 bit, COMP(2scompl)" }; - type integer Int23 (c_int23Min .. c_int23Max) with { variant "23 bit, COMP(2scompl)" }; - type integer Int24 (c_int24Min .. c_int24Max) with { variant "24 bit, COMP(2scompl)" }; - type integer Int25 (c_int25Min .. c_int25Max) with { variant "25 bit, COMP(2scompl)" }; - type integer Int26 (c_int26Min .. c_int26Max) with { variant "26 bit, COMP(2scompl)" }; - type integer Int27 (c_int27Min .. c_int27Max) with { variant "27 bit, COMP(2scompl)" }; - type integer Int28 (c_int28Min .. c_int28Max) with { variant "28 bit, COMP(2scompl)" }; - type integer Int29 (c_int29Min .. c_int29Max) with { variant "29 bit, COMP(2scompl)" }; - type integer Int30 (c_int30Min .. c_int30Max) with { variant "30 bit, COMP(2scompl)" }; - type integer Int31 (c_int31Min .. c_int31Max) with { variant "31 bit, COMP(2scompl)" }; - type integer Int32 (c_int32Min .. c_int32Max) with { variant "32 bit, COMP(2scompl)" }; + type integer Int1 (c_int1Min .. c_int1Max) with { variant "1 bit"}; + type integer Int2 (c_int2Min .. c_int2Max) with { variant "2 bit"}; + type integer Int3 (c_int3Min .. c_int3Max) with { variant "3 bit"}; + type integer Int4 (c_int4Min .. c_int4Max) with { variant "4 bit"}; + type integer Int5 (c_int5Min .. c_int5Max) with { variant "5 bit"}; + type integer Int6 (c_int6Min .. c_int6Max) with { variant "6 bit"}; + type integer Int7 (c_int7Min .. c_int7Max) with { variant "7 bit"}; + type integer Int8 (c_int8Min .. c_int8Max) with { variant "8 bit"}; + type integer Int9 (c_int9Min .. c_int9Max) with { variant "9 bit"}; + type integer Int10 (c_int10Min .. c_int10Max) with { variant "10 bit"}; + type integer Int11 (c_int11Min .. c_int11Max) with { variant "11 bit"}; + type integer Int12 (c_int12Min .. c_int12Max) with { variant "12 bit"}; + type integer Int13 (c_int13Min .. c_int13Max) with { variant "13 bit"}; + type integer Int14 (c_int14Min .. c_int14Max) with { variant "14 bit"}; + type integer Int15 (c_int15Min .. c_int15Max) with { variant "15 bit"}; + type integer Int16 (c_int16Min .. c_int16Max) with { variant "16 bit"}; + type integer Int17 (c_int17Min .. c_int17Max) with { variant "17 bit"}; + type integer Int18 (c_int18Min .. c_int18Max) with { variant "18 bit"}; + type integer Int19 (c_int19Min .. c_int19Max) with { variant "19 bit"}; + type integer Int20 (c_int20Min .. c_int20Max) with { variant "20 bit"}; + type integer Int21 (c_int21Min .. c_int21Max) with { variant "21 bit"}; + type integer Int22 (c_int22Min .. c_int22Max) with { variant "22 bit"}; + type integer Int23 (c_int23Min .. c_int23Max) with { variant "23 bit"}; + type integer Int24 (c_int24Min .. c_int24Max) with { variant "24 bit"}; + type integer Int25 (c_int25Min .. c_int25Max) with { variant "25 bit"}; + type integer Int26 (c_int26Min .. c_int26Max) with { variant "26 bit"}; + type integer Int27 (c_int27Min .. c_int27Max) with { variant "27 bit"}; + type integer Int28 (c_int28Min .. c_int28Max) with { variant "28 bit"}; + type integer Int29 (c_int29Min .. c_int29Max) with { variant "29 bit"}; + type integer Int30 (c_int30Min .. c_int30Max) with { variant "30 bit"}; + type integer Int31 (c_int31Min .. c_int31Max) with { variant "31 bit"}; + type integer Int32 (c_int32Min .. c_int32Max) with { variant "32 bit"}; } // end group signedIntegerDefintions diff --git a/ttcn/patch_lib_common_titan/LibCommon_DataStrings.ttcn b/ttcn/patch_lib_common_titan/LibCommon_DataStrings.ttcn new file mode 100644 index 0000000..9bfbe61 --- /dev/null +++ b/ttcn/patch_lib_common_titan/LibCommon_DataStrings.ttcn @@ -0,0 +1,168 @@ +/** + * + * @author ETSI + * @version $URL$ + * $Id$ + * @desc A collection of data string type and value definitions which + * may be useful in the implementation of any TTCN-3 test + * suite. "Data string" refers to TTCN-3 hexstring, octetstring + * and bitstring types. + * @remark End users should be aware that any changes made to the in + * definitions this module may be overwritten in future releases. + * End users are encouraged to contact the distributers of this + * module regarding their modifications or additions so that future + * updates will include your changes. + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * + */ + module LibCommon_DataStrings { + + /** + * @remark Number in name indicates string length in number of + * _bits_ + */ + group bitStringSubTypes { + + type bitstring Bit1 length(1) with {encode "length(1)"}; + type bitstring Bit2 length(2) with {encode "length(2)"}; + type bitstring Bit3 length(3) with {encode "length(3)"}; + type bitstring Bit4 length(4) with {encode "length(4)"}; + type bitstring Bit5 length(5) with {encode "length(5)"}; + type bitstring Bit6 length(6) with {encode "length(6)"}; + type bitstring Bit7 length(7) with {encode "length(7)"}; + type bitstring Bit8 length(8) with {encode "length(8)"}; + type bitstring Bit9 length(9) with {encode "length(9)"}; + type bitstring Bit10 length(10) with {encode "length(10)"}; + type bitstring Bit11 length(11) with {encode "length(11)"}; + type bitstring Bit12 length(12) with {encode "length(12)"}; + type bitstring Bit13 length(13) with {encode "length(13)"}; + type bitstring Bit14 length(14) with {encode "length(14)"}; + type bitstring Bit15 length(15) with {encode "length(15)"}; + type bitstring Bit16 length(16) with {encode "length(16)"}; + type bitstring Bit17 length(17) with {encode "length(17)"}; + type bitstring Bit18 length(18) with {encode "length(18)"}; + type bitstring Bit19 length(19) with {encode "length(19)"}; + type bitstring Bit20 length(20) with {encode "length(20)"}; + type bitstring Bit21 length(21) with {encode "length(21)"}; + type bitstring Bit22 length(22) with {encode "length(22)"}; + type bitstring Bit23 length(23) with {encode "length(23)"}; + type bitstring Bit24 length(24) with {encode "length(24)"}; + type bitstring Bit25 length(25) with {encode "length(25)"}; + type bitstring Bit26 length(26) with {encode "length(26)"}; + type bitstring Bit27 length(27) with {encode "length(27)"}; + type bitstring Bit28 length(28) with {encode "length(28)"}; + type bitstring Bit29 length(29) with {encode "length(29)"}; + type bitstring Bit30 length(30) with {encode "length(30)"}; + type bitstring Bit31 length(31) with {encode "length(31)"}; + type bitstring Bit32 length(32) with {encode "length(32)"}; + type bitstring Bit40 length(40) with {encode "length(40)"}; + + type bitstring Bit48 length(48) with {encode "length(48)"}; + type bitstring Bit64 length(64) with {encode "length(64)"}; + type bitstring Bit72 length(72) with {encode "length(72)"}; + type bitstring Bit128 length(128) with {encode "length(128)"}; + type bitstring Bit144 length(144) with {encode "length(144)"}; + type bitstring Bit256 length(256) with {encode "length(256)"}; + + } // end group bitStringSubTypes + + group zeroedBits { + + const Bit1 c_1ZeroBit := int2bit(0,1); + const Bit2 c_2ZeroBits := int2bit(0,2); + const Bit4 c_4ZeroBits := int2bit(0,4); + const Bit5 c_5ZeroBits := int2bit(0,5); + const Bit6 c_6ZeroBits := int2bit(0,6); + const Bit8 c_8ZeroBits := int2bit(0,8); + const Bit14 c_14ZeroBits := int2bit(0,14); + const Bit64 c_64ZeroBits := int2bit(0,64); + + }//end group zeroedBits + + /** + * @remark Number in name indicates string length in number of + * _octets_ + */ + group octetStringSubTypes { + + type octetstring Oct1 length(1) with {encode "length(1)"}; + type octetstring Oct2 length(2) with {encode "length(2)"}; + type octetstring Oct3 length(3) with {encode "length(3)"}; + type octetstring Oct4 length(4) with {encode "length(4)"}; + type octetstring Oct5 length(5) with {encode "length(5)"}; + type octetstring Oct6 length(6) with {encode "length(6)"}; + type octetstring Oct7 length(7) with {encode "length(7)"}; + type octetstring Oct8 length(8) with {encode "length(8)"}; + type octetstring Oct9 length(9) with {encode "length(9)"}; + type octetstring Oct10 length(10) with {encode "length(10)"}; + type octetstring Oct11 length(11) with {encode "length(11)"}; + type octetstring Oct12 length(12) with {encode "length(12)"}; + type octetstring Oct13 length(13) with {encode "length(13)"}; + type octetstring Oct14 length(14) with {encode "length(14)"}; + type octetstring Oct15 length(15) with {encode "length(15)"}; + type octetstring Oct16 length(16) with {encode "length(16)"}; + + type octetstring Oct20 length(20) with {encode "length(20)"}; + type octetstring Oct32 length(32) with {encode "length(32)"}; + type octetstring Oct48 length(48) with {encode "length(48)"}; + type octetstring Oct64 length(64) with {encode "length(64)"}; + type octetstring Oct80 length(80) with {encode "length(80)"}; + type octetstring Oct96 length(96) with {encode "length(96)"}; + type octetstring Oct128 length(128) with {encode "length(128)"}; + type octetstring Oct160 length(160) with {encode "length(160)"}; + type octetstring Oct320 length(320) with {encode "length(320)"}; + type octetstring Oct640 length(640) with {encode "length(640)"}; + type octetstring Oct1280 length(1280) with {encode "length(1280)"}; + type octetstring Oct1380 length(1380) with {encode "length(1380)"}; + + type octetstring Oct0to3 length(0..3) with {encode "length(0..3)"}; + type octetstring Oct0to8 length(0..16) with {encode "length(0..8)"}; + type octetstring Oct0to12 length(0..12) with {encode "length(0..12)"}; + type octetstring Oct0to16 length(0..16) with {encode "length(0..16)"}; + type octetstring Oct0to31 length(0..31) with {encode "length(0..31)"}; + type octetstring Oct0to20 length(0..20) with {encode "length(0..20)"}; + type octetstring Oct0to30 length(0..20) with {encode "length(0..30)"}; + type octetstring Oct0to127 length(0..127) with {encode "length(0..127)"}; + type octetstring Oct0to255 length(0..255) with {encode "length(0..255)"}; + + type octetstring Oct1to15 length(1..15) with {encode "length(1..15)"}; + type octetstring Oct1to31 length(1..31) with {encode "length(1..31)"}; + type octetstring Oct1to128 length(1..128) with {encode "length(1..128)"}; + type octetstring Oct1to254 length(1..254) with {encode "length(1..254)"}; + type octetstring Oct1to255 length(1..255) with {encode "length(1..255)"}; + + type octetstring Oct4to16 length(4..16) with {encode "length(4..16)"}; + type octetstring Oct6to15 length(6..15) with {encode "length(6..15)"}; + + } // end group octetStringSubTypes + + group zeroedBytes { + const Oct1 c_1ZeroByte := int2oct(0,1); + const Oct2 c_2ZeroBytes := int2oct(0,2); + const Oct4 c_4ZeroBytes := int2oct(0,4); + const Oct6 c_6ZeroBytes := int2oct(0,6); + const Oct8 c_8ZeroBytes := int2oct(0,8); + const Oct9 c_9ZeroBytes := int2oct(0,9); + const Oct12 c_12ZeroBytes := int2oct(0,12); + const Oct16 c_16ZeroBytes := int2oct(0,16); + const Oct20 c_20ZeroBytes := int2oct(0,20); + + const Oct80 c_80ZeroBytes := int2oct(0,80); + const Oct160 c_160ZeroBytes := int2oct(0,160); + const Oct320 c_320ZeroBytes := int2oct(0,320); + const Oct640 c_640ZeroBytes := int2oct(0,640); + const Oct1280 c_1280ZeroBytes := int2oct(0,1280); + const Oct1380 c_1380ZeroBytes := int2oct(0,1380); + const octetstring c_256ZeroBytes := int2oct(0,256); + const octetstring c_1KZeroBytes := int2oct(0,1024); + const octetstring c_4KZeroBytes := int2oct(0,4096); + const octetstring c_16KZeroBytes := int2oct(0,16384); + const octetstring c_64KZeroBytes := int2oct(0,65536); + const octetstring c_128KZeroBytes := int2oct(0,131072); + + }//end group zeroedBytes + +} // end module LibCommon_DataStrings diff --git a/ttcn/patch_lib_common_titan/LibCommon_Sync.ttcn b/ttcn/patch_lib_common_titan/LibCommon_Sync.ttcn index 7b95770..5b2ae66 100644 --- a/ttcn/patch_lib_common_titan/LibCommon_Sync.ttcn +++ b/ttcn/patch_lib_common_titan/LibCommon_Sync.ttcn @@ -1,7 +1,7 @@ /** * @author ETSI - * @version $URL: https://oldforge.etsi.org/svn/LibCommon/tags/v1.4.0/ttcn/LibCommon_Sync.ttcn $ - * $Id: LibCommon_Sync.ttcn 66 2017-03-06 09:59:41Z filatov $ + * @version $URL$ + * $Id$ * @desc This module implements _one_ generic synchronization mechanism * for TTCN-3 test cases with one or more test components. * Key concept is here that one test component acts as a diff --git a/ttcn/patch_lib_common_titan/ttcn/LibCommon_BasicTypesAndValues.ttcn b/ttcn/patch_lib_common_titan/ttcn/LibCommon_BasicTypesAndValues.ttcn new file mode 100644 index 0000000..5758c7c --- /dev/null +++ b/ttcn/patch_lib_common_titan/ttcn/LibCommon_BasicTypesAndValues.ttcn @@ -0,0 +1,247 @@ +/** + * @author ETSI + * @version $URL$ + * $Id$ + * @desc A collection of basic type and value definitions which may be + * useful in the implementation of any TTCN-3 test suite.

+ * @remark End users should be aware that any changes made to the in + * definitions this module may be overwritten in future releases. + * End users are encouraged to contact the distributers of this + * module regarding their modifications or additions so that future + * updates will include your changes. + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * + */ + module LibCommon_BasicTypesAndValues { + + /** + * @remark Number in subtype name always indicates encoding length + * in _bits_ + */ + group unsignedIntegerDefintions { + + const integer c_uInt1Max := 1; + const integer c_uInt2Max := 3; + const integer c_uInt3Max := 7; + const integer c_uInt4Max := 15; + const integer c_uInt5Max := 31; + const integer c_uInt6Max := 63; + const integer c_uInt7Max := 127; + const integer c_uInt8Max := 255; + const integer c_uInt9Max := 511; + const integer c_uInt10Max := 1023; + const integer c_uInt11Max := 2047; + const integer c_uInt12Max := 4095; + const integer c_uInt13Max := 8191; + const integer c_uInt14Max := 16383; + const integer c_uInt15Max := 32767; + const integer c_uInt16Max := 65535; + const integer c_uInt17Max := 131071; + const integer c_uInt18Max := 262143; + const integer c_uInt19Max := 524287; + const integer c_uInt20Max := 1048575; + const integer c_uInt21Max := 2097151; + const integer c_uInt22Max := 4194303; + const integer c_uInt23Max := 8388607; + const integer c_uInt24Max := 16777215; + const integer c_uInt25Max := 33554431; + const integer c_uInt26Max := 67108863; + const integer c_uInt27Max := 134217727; + const integer c_uInt28Max := 268435456; + const integer c_uInt29Max := 536870911; + const integer c_uInt30Max := 1073741823; + const integer c_uInt31Max := 2147483647; + const integer c_uInt32Max := 4294967295; + const integer c_uInt36Max := 68719476735; + const integer c_uInt48Max := 281474976710655; + const integer c_uInt52Max := 4503599627370495; + const integer c_uInt64Max := 18446744073709551615; + + type integer UInt (0 .. infinity); + type integer UInt1 (0 .. c_uInt1Max) with {variant "unsigned 1 bit"}; + type integer UInt2 (0 .. c_uInt2Max) with {variant "unsigned 2 bit"}; + type integer UInt3 (0 .. c_uInt3Max) with {variant "unsigned 3 bit"}; + type integer UInt4 (0 .. c_uInt4Max) with {variant "unsigned 4 bit"}; + type integer UInt5 (0 .. c_uInt5Max) with {variant "unsigned 5 bit"}; + type integer UInt6 (0 .. c_uInt6Max) with {variant "unsigned 6 bit"}; + type integer UInt7 (0 .. c_uInt7Max) with {variant "unsigned 7 bit"}; + type integer UInt8 (0 .. c_uInt8Max) with {variant "unsigned 8 bit"}; + type integer UInt9 (0 .. c_uInt9Max) with {variant "unsigned 9 bit"}; + type integer UInt10 (0 .. c_uInt10Max) with {variant "unsigned 10 bit"}; + type integer UInt11 (0 .. c_uInt11Max) with {variant "unsigned 11 bit"}; + type integer UInt12 (0 .. c_uInt12Max) with {variant "unsigned 12 bit"}; + type integer UInt13 (0 .. c_uInt13Max) with {variant "unsigned 13 bit"}; + type integer UInt14 (0 .. c_uInt14Max) with {variant "unsigned 14 bit"}; + type integer UInt15 (0 .. c_uInt15Max) with {variant "unsigned 15 bit"}; + type integer UInt16 (0 .. c_uInt16Max) with {variant "unsigned 16 bit"}; + type integer UInt17 (0 .. c_uInt17Max) with {variant "unsigned 17 bit"}; + type integer UInt18 (0 .. c_uInt18Max) with {variant "unsigned 18 bit"}; + type integer UInt19 (0 .. c_uInt19Max) with {variant "unsigned 19 bit"}; + type integer UInt20 (0 .. c_uInt20Max) with {variant "unsigned 20 bit"}; + type integer UInt21 (0 .. c_uInt21Max) with {variant "unsigned 21 bit"}; + type integer UInt22 (0 .. c_uInt22Max) with {variant "unsigned 22 bit"}; + type integer UInt23 (0 .. c_uInt23Max) with {variant "unsigned 23 bit"}; + type integer UInt24 (0 .. c_uInt24Max) with {variant "unsigned 24 bit"}; + type integer UInt25 (0 .. c_uInt25Max) with {variant "unsigned 25 bit"}; + type integer UInt26 (0 .. c_uInt26Max) with {variant "unsigned 26 bit"}; + type integer UInt27 (0 .. c_uInt27Max) with {variant "unsigned 27 bit"}; + type integer UInt28 (0 .. c_uInt28Max) with {variant "unsigned 28 bit"}; + type integer UInt29 (0 .. c_uInt29Max) with {variant "unsigned 29 bit"}; + type integer UInt30 (0 .. c_uInt30Max) with {variant "unsigned 30 bit"}; + type integer UInt31 (0 .. c_uInt31Max) with {variant "unsigned 31 bit"}; + type integer UInt32 (0 .. c_uInt32Max) with {variant "unsigned 32 bit"}; + type integer UInt36 (0 .. c_uInt36Max) with {variant "unsigned 36 bit"}; + type integer UInt48 (0 .. c_uInt48Max) with {variant "unsigned 48 bit"}; + type integer UInt52 (0 .. c_uInt52Max) with {variant "unsigned 52 bit"}; + type integer UInt64 (0 .. c_uInt64Max) with {variant "unsigned 64 bit"}; + + } // end group unsignedIntegerDefintions + + /** + * @remark Number in subtype name always indicates encoding length + * in _bits_ + */ + group signedIntegerDefintions { + + const integer c_int1Min := -1; + const integer c_int1Max := 0; + const integer c_int2Min := -2; + const integer c_int2Max := 1; + const integer c_int3Min := -4; + const integer c_int3Max := 3; + const integer c_int4Min := -8; + const integer c_int4Max := 7; + const integer c_int5Min := -16; + const integer c_int5Max := 15; + const integer c_int6Min := -32; + const integer c_int6Max := 31; + const integer c_int7Min := -64; + const integer c_int7Max := 63; + const integer c_int8Min := -128; + const integer c_int8Max := 127; + const integer c_int9Min := -256; + const integer c_int9Max := 255; + const integer c_int10Min := -512; + const integer c_int10Max := 511; + const integer c_int11Min := -1024; + const integer c_int11Max := 1023; + const integer c_int12Min := -2048; + const integer c_int12Max := 2047; + const integer c_int13Min := -4096; + const integer c_int13Max := 4095; + const integer c_int14Min := -8192; + const integer c_int14Max := 8191; + const integer c_int15Min := -16384; + const integer c_int15Max := 16383; + const integer c_int16Min := -32768; + const integer c_int16Max := 32767; + const integer c_int17Min := -65536; + const integer c_int17Max := 65535; + const integer c_int18Min := -131072; + const integer c_int18Max := 131071; + const integer c_int19Min := -262144; + const integer c_int19Max := 262143; + const integer c_int20Min := -524288; + const integer c_int20Max := 524287; + const integer c_int21Min := -1048576; + const integer c_int21Max := 1048575; + const integer c_int22Min := -2097152; + const integer c_int22Max := 2097151; + const integer c_int23Min := -4194304; + const integer c_int23Max := 4194303; + const integer c_int24Min := -8388608; + const integer c_int24Max := 8388607; + const integer c_int25Min := -16777216; + const integer c_int25Max := 16777215; + const integer c_int26Min := -33554432; + const integer c_int26Max := 33554431; + const integer c_int27Min := -67108864; + const integer c_int27Max := 67108863; + const integer c_int28Min := -134217728; + const integer c_int28Max := 134217727; + const integer c_int29Min := -268435456; + const integer c_int29Max := 268435456; + const integer c_int30Min := -536870912; + const integer c_int30Max := 536870911; + const integer c_int31Min := -1073741824; + const integer c_int31Max := 1073741823; + const integer c_int32Min := -2147483648; + const integer c_int32Max := 2147483647; + + type integer Int; + type integer Int1 (c_int1Min .. c_int1Max) with { variant "1 bit, COMP(2scompl)" }; + type integer Int2 (c_int2Min .. c_int2Max) with { variant "2 bit, COMP(2scompl)" }; + type integer Int3 (c_int3Min .. c_int3Max) with { variant "3 bit, COMP(2scompl)" }; + type integer Int4 (c_int4Min .. c_int4Max) with { variant "4 bit, COMP(2scompl)" }; + type integer Int5 (c_int5Min .. c_int5Max) with { variant "5 bit, COMP(2scompl)" }; + type integer Int6 (c_int6Min .. c_int6Max) with { variant "6 bit, COMP(2scompl)" }; + type integer Int7 (c_int7Min .. c_int7Max) with { variant "7 bit, COMP(2scompl)" }; + type integer Int8 (c_int8Min .. c_int8Max) with { variant "8 bit, COMP(2scompl)" }; + type integer Int9 (c_int9Min .. c_int9Max) with { variant "9 bit, COMP(2scompl)" }; + type integer Int10 (c_int10Min .. c_int10Max) with { variant "10 bit, COMP(2scompl)" }; + type integer Int11 (c_int11Min .. c_int11Max) with { variant "11 bit, COMP(2scompl)" }; + type integer Int12 (c_int12Min .. c_int12Max) with { variant "12 bit, COMP(2scompl)" }; + type integer Int13 (c_int13Min .. c_int13Max) with { variant "13 bit, COMP(2scompl)" }; + type integer Int14 (c_int14Min .. c_int14Max) with { variant "14 bit, COMP(2scompl)" }; + type integer Int15 (c_int15Min .. c_int15Max) with { variant "15 bit, COMP(2scompl)" }; + type integer Int16 (c_int16Min .. c_int16Max) with { variant "16 bit, COMP(2scompl)" }; + type integer Int17 (c_int17Min .. c_int17Max) with { variant "17 bit, COMP(2scompl)" }; + type integer Int18 (c_int18Min .. c_int18Max) with { variant "18 bit, COMP(2scompl)" }; + type integer Int19 (c_int19Min .. c_int19Max) with { variant "19 bit, COMP(2scompl)" }; + type integer Int20 (c_int20Min .. c_int20Max) with { variant "20 bit, COMP(2scompl)" }; + type integer Int21 (c_int21Min .. c_int21Max) with { variant "21 bit, COMP(2scompl)" }; + type integer Int22 (c_int22Min .. c_int22Max) with { variant "22 bit, COMP(2scompl)" }; + type integer Int23 (c_int23Min .. c_int23Max) with { variant "23 bit, COMP(2scompl)" }; + type integer Int24 (c_int24Min .. c_int24Max) with { variant "24 bit, COMP(2scompl)" }; + type integer Int25 (c_int25Min .. c_int25Max) with { variant "25 bit, COMP(2scompl)" }; + type integer Int26 (c_int26Min .. c_int26Max) with { variant "26 bit, COMP(2scompl)" }; + type integer Int27 (c_int27Min .. c_int27Max) with { variant "27 bit, COMP(2scompl)" }; + type integer Int28 (c_int28Min .. c_int28Max) with { variant "28 bit, COMP(2scompl)" }; + type integer Int29 (c_int29Min .. c_int29Max) with { variant "29 bit, COMP(2scompl)" }; + type integer Int30 (c_int30Min .. c_int30Max) with { variant "30 bit, COMP(2scompl)" }; + type integer Int31 (c_int31Min .. c_int31Max) with { variant "31 bit, COMP(2scompl)" }; + type integer Int32 (c_int32Min .. c_int32Max) with { variant "32 bit, COMP(2scompl)" }; + + } // end group signedIntegerDefintions + + group zeroedIntegers { + + const UInt1 c_uInt1Zero := 0; + const UInt2 c_uInt2Zero := 0; + const UInt3 c_uInt3Zero := 0; + const UInt4 c_uInt4Zero := 0; + const UInt5 c_uInt5Zero := 0; + const UInt6 c_uInt6Zero := 0; + const UInt7 c_uInt7Zero := 0; + const UInt8 c_uInt8Zero := 0; + const UInt10 c_uInt10Zero := 0; + const UInt12 c_uInt12Zero := 0; + const UInt14 c_uInt14Zero := 0; + const UInt16 c_uInt16Zero := 0; + const UInt24 c_uInt24Zero := 0; + const UInt32 c_uInt32Zero := 0; + const UInt48 c_uInt48Zero := 0; + + }//end group zeroedInt + + /** + * @remark Number in subtype name always indicates encoding length + * in _bits_ + */ + group booleanDefintions { + + type boolean Bool1 with { variant "1 bit" }; + type boolean Bool2 with { variant "2 bit" }; + type boolean Bool3 with { variant "3 bit" }; + type boolean Bool4 with { variant "4 bit" }; + type boolean Bool5 with { variant "5 bit" }; + type boolean Bool6 with { variant "6 bit" }; + type boolean Bool7 with { variant "7 bit" }; + type boolean Bool8 with { variant "8 bit" }; + + } // end group booleanDefintions + +} // end module LibCommon_BasicTypesAndValues diff --git a/ttcn/patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn b/ttcn/patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn new file mode 100644 index 0000000..7b95770 --- /dev/null +++ b/ttcn/patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn @@ -0,0 +1,1359 @@ +/** + * @author ETSI + * @version $URL: https://oldforge.etsi.org/svn/LibCommon/tags/v1.4.0/ttcn/LibCommon_Sync.ttcn $ + * $Id: LibCommon_Sync.ttcn 66 2017-03-06 09:59:41Z filatov $ + * @desc This module implements _one_ generic synchronization mechanism + * for TTCN-3 test cases with one or more test components. + * Key concept is here that one test component acts as a + * synchronization server which listens and triggers one or more + * synchronization clients. It is recomended to use the MTC always as + * the synchronization server but in theory also a PTC can act as such + * a server.

+ * This synchronization is used by calling a function on + * the server test component to wait for a desired amount of clients + * to notify the server that they have reached a specific synchronization + * point. Each client test component must call another + * function to perform this notification.

+ * In the event that a client is not able to reach a synchronization + * point the server sends out a signal to all clients to abort the + * test case. This signal is a STOP message which can be caught by + * a test component default which in turn can then run a proper + * shut down behavior based on the current state of the test + * component.

+ * Note that this synchronization mechanism can also be used + * in a special mode called "self synchronization" when a test case + * only has one test component. Here, the test component in essence + * acts as a server and client at the same time. The main benefit of + * using self synchoronization is that the same shutdown mechanisms + * can also be reused fomr the multi component test cases.

+ * This module contains a lot of TTCN-3 definitions. It has been + * structured into tree main groups to help the user to identify + * quickly relevant TTCN-3 definitions. For rookie users of this + * module basicUserRelevantDefinitions should offer all the needed + * definitions. Advanced users can consider use of definitions in + * advancedUserRelevantDefinitions. Finally, internalDefinitions + * are definitions which are required for the module to work + * properly but do not need to be used in your code. Remember that + * the main motiviation of this sychronization module is to offer + * are _simple_ user interface. Practice has shown that when writing + * actual test component behavior _only a handful_ of functions + * usually wind up being used! Also check the synchronization examples + * module for example uses of this synchronization mechanism.

+ * The invocation of the sync functions is also closely tied + * to the verdict control functions which should also be reviewed + * prior to using this module.

+ * This module has been derived from EtsiCommon_Synchronization + * which was created in ETSIs STF256/276. It has been kept + * intentionally separate to avoid conflicts with future ETSI + * test suite releases. + * @see LibCommon_Sync.basicUserRelevantDefinitions + * @see LibCommon_Sync.advancedUserRelevantDefinitions + * @remark End users should be aware that any changes made to the in + * definitions this module may be overwritten in future releases. + * End users are encouraged to contact the distributers of this + * module regarding their modifications or additions so that future + * updates will include your changes. + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * + */ +module LibCommon_Sync { + + //Common + import from LibCommon_BasicTypesAndValues { type UInt } ; + import from LibCommon_AbstractData all; + import from LibCommon_VerdictControl all; + + group basicUserRelevantDefinitions { + + group importantSyncTypeDefinitions { + + group compTypeRelated { + + /** + * @desc This type is used to be the base of any synchronization + * behavior which is to be executed on a sync server + * component. The test component which acts as a + * sync server in a test case must NOT directly use + * this component type in its runs on clause! + * Note that server synchronization functions may be + * invoked by a test component as long as its + * component type is type compatible to this component + * type definition! + */ + type component BaseSyncComp { + port SyncPort syncPort; + timer tc_sync := PX_TSYNC_TIME_LIMIT; + } + + /** + * @desc This type is used to define any synchronization + * behavior which is to be executed on a sync server + * component. The test component which acts as a + * sync server in a test case may - but does + * not have to - directly use this component type its + * runs on clause. + * Note that server synchronization functions may be + * invoked by a test component as long as its + * component type is type compatible to this component + * type definition! + */ + type component ServerSyncComp extends BaseSyncComp { + timer tc_shutDown := PX_TSHUT_DOWN_TIME_LIMIT; + } + + /** + * @desc This type is used to define any synchronization + * behavior which is to be executed on a sync client + * component. The test component(s) which act as a + * sync client in a test case may - but do not have + * to - directly use this component type their runs + * on clause. + * Note that server synchronization functions may be + * invoked by a test component as long as its + * component type is type compatible to this component + * type definition! + */ + type component ClientSyncComp extends BaseSyncComp { + var StringStack v_stateStack:= c_initStringStack; + var TestcaseStep vc_testcaseStep := e_preamble; + } + + /** + * @desc This type is used to define any synchronization + * behavior which is relevant to non-concurrent test + * cases. + * Note that self synchronization functions may be + * invoked by a test component as long as its + * component type is type compatible to this component + * type definition! + * Note also that this type is type compatible to the + * ClientSyncComp type so that shutdown altsteps from + * concurrent test cases can also be reused in single + * component test cases! + * @see LibCommon_Sync.ClientSyncComp + */ + type component SelfSyncComp extends ClientSyncComp { + port SyncPort syncSendPort; + } + + /** + * @desc This port type must be imported into test suites + * when defining test component types which are + * type compatible to a synchronization component + * type + * @see LibCommon_Sync.SelfSyncComp + * @see LibCommon_Sync.ServerSyncComp + * @see LibCommon_Sync.ClientSyncComp + */ + type port SyncPort message { + inout SyncCmd + } with { + extension "internal" + } + + + /** + * @desc Describes in which step of execution is the testcase + */ + type enumerated TestcaseStep { + e_preamble, + e_testBody, + e_postamble + } + + } // end compTypeRelated + + group standardSyncPointNames { + const charstring c_prDone := "preambleDone"; + const charstring c_poDone := "postambleDone"; + const charstring c_tbDone := "testBodyDone"; + const charstring c_initDone := "initDone"; + } + + } // end group importantSyncTypeDefinitions + + group syncCompTestConfiguration { + + /** + * @desc Calls self connect function if invoking + * component is the MTC or otherwise connects the client + * the server. This function allows to implement preambles + * in a way that they can be used by test components + * in both non-concurrent as well as concurrent test + * cases! + * @remark This function should _not_ be called if the MTC + * acts as a client (and not a server) in a concurrent + * test case. In this case f_connect4ClientSync + * should be used instead. + * @see LibCommon_Sync.f_connect4SelfSync + * @see LibCommon_Sync.f_connect4ClientSync + */ + function f_connect4SelfOrClientSync() + runs on SelfSyncComp { + if ( self == mtc ) { + f_connect4SelfSync(); + } else { + f_connect4ClientSync(); + } + } + + /** + * @desc Calls self connect function if the invoking + * component is the MTC or otherwise disconnects the client + * from the server. This function allows to implement + * postambles in a way that they can be used in both + * non-concurrent as well as concurrent test cases. + * @remark This function should _not_ be called if the MTC + * acts as a client (and not a server) in a concurrent + * test case. In this case f_disconnect4ClientSync + * should be used instead. + * @see LibCommon_Sync.f_disconnect4SelfSync + * @see LibCommon_Sync.f_disconnect4ClientSync + */ + function f_disconnect4SelfOrClientSync() + runs on SelfSyncComp { + if ( self == mtc ) { + f_disconnect4SelfSync(); + } else { + f_disconnect4ClientSync(); + } + } + + } // end group syncCompTestConfiguration + + group syncFunctions { + + /** + * @desc Implements synchronization of 2 clients from server side + * on one or more synchronization points. + * If problem occurs, then server sends STOP to all clients. + * Waits for PX_TSYNC_TIME_LIMIT to let clients + * finish executing their behavior until this + * synchronization point. After passing all synchronization + * points successfuly the server waits for all clients + * to stop. + * See f_serverSyncClientsTimed for overwriting this + * the timing constraint! + * This function sets the server component verdict. + * @remark The use of this function requires prior connection of + * the server sync ports! + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT + * @see LibCommon_Sync.f_serverSyncClientsTimed + * @see LibCommon_Sync.f_serverWaitForAllClientsToStop + * @param p_syncPointIds list of synchronization point name/ids + */ + function f_serverSync2ClientsAndStop( in SyncPointList p_syncPointIds ) + runs on ServerSyncComp { + f_serverSyncNClientsAndStop(2, p_syncPointIds); + } + + /** + * @desc Implements synchronization of 3 clients from server side + * on one or more synchronization points. + * If problem occurs, then server sends STOP to all clients. + * Waits for PX_TSYNC_TIME_LIMIT to let clients + * finish executing their behavior until this + * synchronization point. After passing all synchronization + * points successfuly the server waits for all clients + * to stop. + * See f_serverSyncClientsTimed for overwriting this + * the timing constraint! + * This function sets the server component verdict. + * @remark The use of this function requires prior connection of + * the server sync ports! + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT + * @see LibCommon_Sync.f_serverSyncClientsTimed + * @see LibCommon_Sync.f_serverWaitForAllClientsToStop + * @param p_syncPointIds list of synchronization point name/ids + */ + function f_serverSync3ClientsAndStop( in SyncPointList p_syncPointIds ) + runs on ServerSyncComp { + f_serverSyncNClientsAndStop(3, p_syncPointIds); + } + + /** + * @desc Implements synchronization of 4 clients from server side + * on one or more synchronization points. + * If problem occurs, then server sends STOP to all clients. + * Waits for PX_TSYNC_TIME_LIMIT to let clients + * finish executing their behavior until this + * synchronization point. After passing all synchronization + * points successfuly the server waits for all clients + * to stop. + * See f_serverSyncClientsTimed for overwriting this + * the timing constraint! + * This function sets the server component verdict. + * @remark The use of this function requires prior connection of + * the server sync ports! + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT + * @see LibCommon_Sync.f_serverSyncClientsTimed + * @see LibCommon_Sync.f_serverWaitForAllClientsToStop + * @param p_syncPointIds list of synchronization point name/ids + */ + function f_serverSync4ClientsAndStop( in SyncPointList p_syncPointIds ) + runs on ServerSyncComp { + f_serverSyncNClientsAndStop(4, p_syncPointIds); + } + + /** + * @desc Implements synchronization of N clients from server side + * on one or more synchronization points. + * If problem occurs, then server sends STOP to all clients. + * Waits for PX_TSYNC_TIME_LIMIT to let clients + * finish executing their behavior until this + * synchronization point. After passing all synchronization + * points successfuly the server waits for all clients + * to stop. + * See f_serverSyncClientsTimed for overwriting this + * the timing constraint! + * This function sets the server component verdict. + * @remark The use of this function requires prior connection of + * the server sync ports! + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT + * @see LibCommon_Sync.f_serverSyncClientsTimed + * @see LibCommon_Sync.f_serverWaitForAllClientsToStop + * @param p_numClients number of synchronization clients + * @param p_syncPointIds list of synchronization point name/ids + */ + function f_serverSyncNClientsAndStop ( + in UInt p_numClients, + in SyncPointList p_syncPointIds ) + runs on ServerSyncComp { + var integer i, v_noOfSyncIds := sizeof(p_syncPointIds); + for ( i := 0; i < v_noOfSyncIds; i := i+1 ) { + f_serverSyncClientsTimed ( + p_numClients, + valueof(p_syncPointIds[i]), + PX_TSYNC_TIME_LIMIT ); + } + f_serverWaitForAllClientsToStop(); + } + + /** + * @desc Implements synchronization of 2 clients and 1 UT from server side + * on one or more synchronization points. + * If problem occurs, then server sends STOP to all clients. + * Waits for PX_TSYNC_TIME_LIMIT to let clients + * finish executing their behavior until this + * synchronization point. After passing all synchronization + * points successfuly the server waits for all clients + * to stop. + * See f_serverSyncClientsTimed for overwriting this + * the timing constraint! + * This function sets the server component verdict. + * @remark The use of this function requires prior connection of + * the server sync ports! + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT + * @see LibCommon_Sync.f_serverSyncClientsTimed + * @see LibCommon_Sync.f_serverWaitForAllClientsToStop + * @param p_syncPointIds list of synchronization point name/ids + */ + function f_serverSync2ClientsUtAndStop( in SyncPointList p_syncPointIds ) + runs on ServerSyncComp { + var integer i, v_noOfSyncIds := sizeof(p_syncPointIds); + for ( i := 0; i < v_noOfSyncIds; i := i+1 ) { + f_serverSyncClientsTimed(3,valueof(p_syncPointIds[i]), PX_TSYNC_TIME_LIMIT); + } + f_serverWaitForAllClientsToStop(); + } + + /** + * @desc Calls either self synchronization function if + * invoking component is the MTC, otherwise + * calls client synchronization. After that it + * sets the verdict based on the specified return code. + * This function allows to implement TTCN-3 functions + * in a way that they can be used in both non-concurrent + * as well as concurrent test cases. + * @remark This function should _not_ be called if the MTC + * acts as a client (and not a server) in a concurrent + * test case. In this case f_clientSyncAndVerdict + * should be used instead. + * @param p_syncPoint Synchronization point name/id + * @param p_ret Current behavior execution status + * @see LibCommon_Sync.f_clientSyncAndVerdict + * @see LibCommon_VerdictControl.f_setVerdict + */ + function f_selfOrClientSyncAndVerdict( in charstring p_syncPoint, + in FncRetCode p_ret) + runs on SelfSyncComp { + if ( self == mtc ) { + // then assume we are running non-conurrent test case + f_selfSyncAndVerdict(p_syncPoint, p_ret); + } else { + f_clientSyncAndVerdict(p_syncPoint, p_ret); + } + } + + /** + * @desc Calls either self synchronization function if + * invoking component is the MTC, otherwise + * calls client synchronization. After that it + * sets a preamble specific verdict based on the + * specified return code. + * This function allows to implement TTCN-3 functions + * in a way that they can be used in both non-concurrent + * as well as concurrent test cases. + * @remark This function should _not_ be called if the MTC + * acts as a client (and not a server) in a concurrent + * test case. In this case f_clientSyncAndVerdictPreamble + * should be used instead. + * @param p_syncPoint Synchronization point name/id + * @param p_ret Current behavior execution status + * @see LibCommon_Sync.f_clientSyncAndVerdict + * @see LibCommon_VerdictControl.f_setVerdictPreamble + */ + function f_selfOrClientSyncAndVerdictPreamble( in charstring p_syncPoint, + in FncRetCode p_ret) + runs on SelfSyncComp { + if ( self == mtc ) { + // then assume we are running non-conurrent test case + f_selfSyncAndVerdictPreamble(p_syncPoint, p_ret); + } else { + f_clientSyncAndVerdictPreamble(p_syncPoint, p_ret); + } + } + + /** + * @desc Calls either self synchronization function if + * invoking component is the MTC, otherwise + * calls client synchronization. After that it + * sets a preamble specific verdict based on the + * specified return code. + * This function allows to implement TTCN-3 functions + * in a way that they can be used in both non-concurrent + * as well as concurrent test cases. + * @remark This function should _not_ be called if the MTC + * acts as a client (and not a server) in a concurrent + * test case. In this case f_clientSyncAndVerdictTestBody + * should be used instead. + * @param p_syncPoint Synchronization point name/id + * @param p_ret Current behavior execution status + * @see LibCommon_Sync.f_clientSyncAndVerdict + * @see LibCommon_VerdictControl.f_setVerdictPreamble + */ + function f_selfOrClientSyncAndVerdictTestBody( in charstring p_syncPoint, + in FncRetCode p_ret) + runs on SelfSyncComp { + if ( self == mtc ) { + // then assume we are running non-conurrent test case + f_selfSyncAndVerdictTestBody(p_syncPoint, p_ret); + } else { + f_clientSyncAndVerdictTestBody(p_syncPoint, p_ret); + } + } + + /** + * @desc Function kept for backward compatibility + * @see f_selfOrClientSyncAndVerdictPreamble + * + */ + function f_selfOrClientSyncAndVerdictPR( in charstring p_syncPoint, + in FncRetCode p_ret) + runs on SelfSyncComp { + f_selfOrClientSyncAndVerdictPreamble(p_syncPoint, p_ret); + } + + } // end group syncFunctions + + group syncCompStateHandling { + + /** + * + * @desc This function updates the state (stack) of a + * sync client or self sync component. This stack is + * key in the shutdown handling of test components. + * It adds the new state name to the top of the + * sync component stack of states. + * The state will only be added in case of a current + * execution status of e_success. + * @param p_newSyncCompState Name of state which was attempted to be reached. + * @param p_ret Current behavior execution status + * @remark If the state of component changes this function must be + * _at least_ called from your test suite prior to f_selfSync + * or f_clientSync which is the only definite place for the + * shutdown default invocation! + * @see LibCommon_Sync.a_dummyShutDown + * @see LibCommon_Sync.f_selfSync + * @see LibCommon_Sync.f_clientSync + */ + function f_addSyncCompState(in charstring p_newSyncCompState, + in FncRetCode p_ret) + runs on ClientSyncComp { + if ( p_ret == e_success ) { + if ( f_isItemOnStringStack(v_stateStack,p_newSyncCompState) ) { + log("**** f_addSyncCompState: WARNING: Attempt to add state which is already on sync state stack! No additition done.****"); + } else { + f_pushStringStack(v_stateStack,p_newSyncCompState); + } + } + } // end function f_addSyncCompState + + /** + * + * @desc This function returns the top state on the sync + * state stack of a sync client or self sync + * component and removes it from the stack + * This function cna be used, e.g., in a while + * statement within a postamble or shutdown + * implementation + * @param p_state State on top of the state stack. + * @return false if state stack is empty, true otherwise + * @see LibCommon_Sync.a_dummyShutDown + */ + function f_getTopSyncCompState( out charstring p_state ) + runs on ClientSyncComp + return boolean { + if ( not f_peekStringStackTop(v_stateStack,p_state) ) { + p_state := "IDLE"; + return false; + } + f_popStringStack(v_stateStack); + return true; + } // end function f_getTopSyncCompState + + /* + * @desc This function removes the last state on the state stack + * of a sync client or self sync component. + * This stack is key in the shutdown handling of test + * components. + * @see LibCommon_Sync.a_dummyShutDown + */ + function f_popSyncCompState() + runs on ClientSyncComp { + f_popStringStack(v_stateStack); + } // end function f_popSyncCompState + + /** + * + * @desc This function returns the top state on the sync state + * stack of a sync client or self sync component. It + * does not remove it from the stack + * This stack is key in the shutdown handling of test + * components. + * @param p_state State on top of the state stack. + * @return false if state stack is empty, true otherwise + * @see LibCommon_Sync.a_dummyShutDown + */ + function f_peekTopSyncCompState(out charstring p_state) + runs on ClientSyncComp + return boolean { + return f_peekStringStackTop(v_stateStack,p_state); + } // end function f_peekTopSyncCompState + + /** + * @desc This function checks if the sync state stack + * of a sync client or self sync component is empty. + * This stack is key in the shutdown handling of test + * components. + * @see LibCommon_Sync.a_dummyShutDown + */ + function f_isSyncCompStateStackEmpty() + runs on ClientSyncComp + return boolean { + return f_isStringStackEmpty(v_stateStack); + } // end function f_isSyncCompStateStackEmpty + + } // end group syncCompStateHandling + + group shutDownAltsteps { + + /** + * @desc This is an example of a shutdown altstep which can be + * used as a "template" for a interface specific shutdown + * altstep or possily as a first temporary solution in + * test case development.

+ * This altstep shall be activated as a default as the + * first statement in each test case function which drives + * an interface, i.e., in MTC behavior of single component + * and in each client behavior of multi component test + * cases.
+ * The required behavior from this altstep is to:

+ * 1) expect the STOP either via the test component + * syncPort

+ * 2) upon its arrival it should shut down the SUT + * gracefully based on the current component state

+ * The current component state should have been + * previously kept uptodate from a test suite via the + * f_addSyncCompState function. This default will then be + * (automatically) invoked either from within f_selfSync + * or f_clientSync.
+ * Note that shutdown defaults can be written as + * _interface specific_ - they do not need to be test case + * or test component specific! See another example of a + * shutdown altstep in the sync module. + * @see LibCommon_Sync.f_addSyncCompState + * @see LibCommon_Sync.f_selfSync + * @see LibCommon_Sync.f_clientSync + * @see LibCommon_SyncExamples.a_exampleShutDown + * @remark Your application specific shutdown altstep + * implementation(s) should _not_ be defined in this + * module but as part of your test suite or application specific + * modules. + */ + altstep a_dummyShutDown() + runs on SelfSyncComp { + [] syncPort.receive(m_syncServerStop){ + var charstring v_state := ""; + tc_sync.stop; + log("**** a_dummyShutDown: Test component received STOP signal from sync server - going to IDLE state ****"); + while ( f_getTopSyncCompState(v_state) ) { + if ( v_state == "x" ) { + // then do something + } else if ( v_state == "y" ) { + // then do something else + } + } // end while + f_disconnect4SelfOrClientSync(); + // unmap/disconnect more if needed + log("**** a_dummyShutDown: -> Test component stopping itself now! ****") ; + stop ; + } + } // end altstep a_dummyShutDown + + /** + * @desc Shutdown alstep in case the sync server is requesting shutdown. + * + * @remark User shall stop the component + */ + altstep a_shutdown() + runs on ClientSyncComp { + [] syncPort.receive(m_syncServerStop){ + tc_sync.stop ; + log("**** a_shutdown: Test component received STOP signal from MTC **** "); + } + } + + } // end group shutDownAltsteps + + } // end group basicUserRelevantDefinitions + + group advancedUserRelevantDefinitions { + + group serverRelated { + + /** + * @desc Implements synchronization of "n" clients from server + * side. If a problem occurs, then server sends STOP to + * all clients. Waits for PX_TSYNC_TIME_LIMIT to let + * clients finish executing their behavior until this + * synchronization point. See f_serverSyncClientsTimed for + * overwriting this later timing constraint! + * This function sets the server component verdict. + * @remark The use of this function requires prior connection of + * the server sync port! + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT + * @see LibCommon_Sync.f_serverSyncClientsTimed + * @param p_noOfClients number of clients to be synchronized + * @param p_syncId synchronization point name/id + */ + function f_serverSyncClients( in UInt p_noOfClients, in charstring p_syncId ) + runs on ServerSyncComp { + f_serverSyncClientsTimed(p_noOfClients,p_syncId, PX_TSYNC_TIME_LIMIT); + } + + /** + * @desc Implements synchronization of "n" clients from server + * side including intermediate synchronization. + * If a problem occurs, then server sends STOP to + * all clients. Waits for PX_TSYNC_TIME_LIMIT to let + * clients finish executing their behavior until this + * synchronization point. See f_serverSyncClientsTimed for + * overwriting this later timing constraint! + * This function sets the server component verdict. + * @remark The use of this function requires prior connection of + * the server sync port! + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT + * @see LibCommon_Sync.f_serverSyncClientsTimed + * @param p_noOfClients number of clients to be synchronized + * @param p_syncId synchronization point name/id + */ + function f_serverSyncClientsIntermediateSync( in UInt p_noOfClients, in charstring p_syncId, in UInt p_NoOfClientIntermediate, in template (present) charstring p_syncIdIntermediate ) + runs on ServerSyncComp { + f_serverSyncClientsTimedIntermediateSync(p_noOfClients,p_syncId, p_NoOfClientIntermediate, p_syncIdIntermediate, PX_TSYNC_TIME_LIMIT); + } + + /** + * @desc Handles synchronization of clients from server side. + * If problem occurs, then server sends STOP to all clients. + * This function sets the server verdict. + * @remark The use of this function requires prior connection of + * the server sync ports! + * @param p_NoOfClients number of clients to be synchronized + * @param p_syncId synchronization point name/id + * @param p_execTimeLimit time limit given to all clients to finish the execution + * of their behavior up to this synchronization point + * @see LibCommon_Sync.f_connect4SelfOrClientSync + */ + function f_serverSyncClientsTimed(in UInt p_NoOfClients, + in charstring p_syncId, + float p_execTimeLimit ) + runs on ServerSyncComp { + f_serverSyncClientsTimedIntermediateSync(p_NoOfClients, p_syncId, 0, ?, p_execTimeLimit ) + } // end function f_serverSyncClientsTimed + + /** @desc Handles synchronization of clients from server side including + * intermediate synchronization. + * If problem occurs, then server sends STOP to all clients. + * This function sets the server verdict. + * @remark The use of this function requires prior connection of + * the server sync ports! + * @param p_NoOfClients number of clients to be synchronized + * @param p_syncId synchronization point name/id + * @param p_execTimeLimit time limit given to all clients to finish the execution + * of their behavior up to this synchronization point + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @return execution status + */ + function f_serverSyncClientsTimedIntermediateSync( in UInt p_NoOfClients, + in charstring p_syncId, in UInt p_NoOfClientIntermediate, in template (present) charstring p_syncIdIntermediate, + float p_execTimeLimit ) + runs on ServerSyncComp { + + var integer v_noOfRecvdSyncMsgs := 0, v_noOfRecvdSyncMsgsIntermediate := 0; + var boolean v_stopClients := false; + var ClientSyncCompList v_clientRefs := {}, v_clientRefsIntermediate := {}; + var ClientSyncComp v_clientRef; + + if ( p_syncId == c_prDone ) { + log("**** f_serverSyncClientsTimed: Sync server now starting PREAMBLE synchronization ... ****") ; + } else if ( p_syncId == c_tbDone ) { + log("**** f_serverSyncClientsTimed: Sync server now starting TEST BODY synchronization ... ****") ; + } else if ( p_syncId == c_initDone ) { + log("**** f_serverSyncClientsTimed: Sync server now starting UPPER TESTER synchronization ... ****") ; + } else { + log("**** f_serverSyncClientsTimed: Sync server now starting handling of next synchronization point ... ****") ; + } + tc_sync.start(p_execTimeLimit) ; + alt{ + [v_noOfRecvdSyncMsgsIntermediate != p_NoOfClientIntermediate] syncPort.receive(m_syncClientReady(p_syncIdIntermediate)) -> sender v_clientRef { + if(not f_isPresentInArray(v_clientRef, v_clientRefsIntermediate)) { + v_clientRefsIntermediate[v_noOfRecvdSyncMsgsIntermediate] := v_clientRef; + v_noOfRecvdSyncMsgsIntermediate := v_noOfRecvdSyncMsgsIntermediate + 1; + if (v_noOfRecvdSyncMsgsIntermediate == p_NoOfClientIntermediate) { + f_serverSendToAllClients(v_clientRefsIntermediate, m_syncServerReady(p_syncIdIntermediate)); + } + } + repeat; + } + [] syncPort.receive(m_syncClientReady(p_syncId)) -> sender v_clientRef { + if(not f_isPresentInArray(v_clientRef, v_clientRefs)) { + v_clientRefs[v_noOfRecvdSyncMsgs] := v_clientRef; + v_noOfRecvdSyncMsgs := v_noOfRecvdSyncMsgs + 1; + } + if ( v_noOfRecvdSyncMsgs != p_NoOfClients ) { repeat; } + } + [] syncPort.receive(m_syncClientStop) -> sender v_clientRef { + log("**** f_serverSyncClientsTimed: Sync server received STOP signal from a client - server will wait for all clients to reach their next synchronization point and then stop them! ****") ; + v_stopClients := true; + if(not f_isPresentInArray(v_clientRef, v_clientRefs)) { + v_clientRefs[v_noOfRecvdSyncMsgs] := v_clientRef; + v_noOfRecvdSyncMsgs := v_noOfRecvdSyncMsgs + 1; + } + if ( v_noOfRecvdSyncMsgs != p_NoOfClients ) { repeat; } + + } + [] syncPort.receive(m_syncClientReady(?)) -> sender v_clientRef { + log("**** f_serverSyncClientsTimed: Sync server received client sync message with incorrect synchronization point id which is currently not handled - server will stop all clients! ****") ; + v_stopClients := true; + if(not f_isPresentInArray(v_clientRef, v_clientRefs)) { + v_clientRefs[v_noOfRecvdSyncMsgs] := v_clientRef; + } + } + [] syncPort.receive(SyncCmd :? ) { + log("**** f_serverSyncClientsTimed: Sync server received (invalid) sync message from other sync server - server will stop all clients! ****") ; + v_stopClients := true; } + [] any port.receive { + // leave it to be ok to receive anything else + // in case that the user has added any non-sync ports to + // his/her server component type definition! + repeat; + } + [] tc_sync.timeout{ + log("**** f_serverSyncClientsTimed: A client is not responding within specified time limit - sync server is sending stop to all clients! ****"); + v_stopClients := true; } + } //end alt + if (v_noOfRecvdSyncMsgsIntermediate != p_NoOfClientIntermediate) { + v_stopClients := true; + } + tc_sync.stop ; + if ( v_stopClients ) { + setverdict(inconc); + // then send out STOP sync msg + f_serverSendToAllClients(v_clientRefs, m_syncServerStop); + f_serverWaitForAllClientsToShutDown(); // function will never return! + } else { + setverdict(pass); + // then send out READY sync msg + f_serverSendToAllClients(v_clientRefs, m_syncServerReady(p_syncId)); + if ( p_syncId == c_prDone ) { + log("**** f_serverSyncClientsTimed: Sync server successfully passed PREAMBLE synchronization point. ****") ; + } else if ( p_syncId == c_tbDone ) { + log("**** f_serverSyncClientsTimed: Sync server successfully passed TEST BODY synchronization point. ****") ; + } else { + log("**** f_serverSyncClientsTimed: Sync server successfully passed synchronization point. ****") ; + } + } + } // end function f_serverSyncClientsTimedIntermediateSync + + /** + * @desc This function is intended only for use on the sync + * server component in concurrent TTCN-3 test cases. + * It waits for all components to finish execution within + * the PX_TSYNC_TIME_LIMIT. If a timeout occurs + * the server will stop all clients. + * This function sets the server component verdict. + */ + function f_serverWaitForAllClientsToStop() + runs on ServerSyncComp { + tc_sync.start; + alt { + [] all component.done { + tc_sync.stop; + log("**** f_serverWaitForAllClientsToStop: All sync clients have finished their execution. Sync server now terminating test case. ****") ; + } + [] tc_sync.timeout { + log("**** f_serverWaitForAllClientsToStop: Not all sync clients have finshed execution within the sync time limit. Sync server will stop test case! ****") ; + stop; + } + } // end alt + setverdict(pass); + } // end function f_serverWaitForAllClientsToStop + + } // end group serverRelated + + group clientRelated { + + /** + * @desc This function creates the connection needed to + * execute client synchronization functions + * @see LibCommon_Sync.f_clientSync + * @see LibCommon_Sync.f_clientSendStop + */ + function f_connect4ClientSync() + runs on ClientSyncComp { + connect(self:syncPort, mtc:syncPort); + }// end function f_connect4ClientSync + + /** + * @desc This function removes the connection needed + * to execute client synchronization functions + * @see LibCommon_Sync.f_clientSync + * @see LibCommon_Sync.f_clientSendStop + */ + function f_disconnect4ClientSync() + runs on ClientSyncComp { + disconnect(self:syncPort, mtc:syncPort); + }// end function f_disconnect4ClientSync + + /** + * @desc This function combines client verdict setting with its + * synchronization for use,e.g, after or within a + * test body implementation. + * Note that such premables can _not_ be reused in non- + * concurrent test cases. This can be achieved by using + * the f_selfOrClientSyncAndVerdict function instead. + * This function sets the client component verdict. + * @param p_syncId Synchronization point name/id + * @param p_ret Current behavior execution status + * @remark The use of this function requires prior connection + * of the client sync port! + * @see LibCommon_Sync.f_connect4ClientSync + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_VerdictControl.f_setVerdict + * @see LibCommon_Sync.f_selfOrClientSyncAndVerdict + */ + function f_clientSyncAndVerdict(in charstring p_syncId, + in FncRetCode p_ret) + runs on ClientSyncComp { + if(vc_testcaseStep == e_preamble) { + f_clientSyncAndVerdictPreamble(p_syncId, p_ret); + } else if(vc_testcaseStep == e_testBody) { + f_clientSyncAndVerdictTestBody(p_syncId, p_ret); + } + else { + f_clientSyncAndVerdictPostamble(p_syncId, p_ret); + } + } + + /** + * @desc This function combines client verdict setting with its + * synchronization for use after or within a preamble + * implementation. + * Note that such preambles can _not_ be reused in non- + * concurrent test cases. + * This function sets the client component verdict. + * @remark The use of this function requires prior connection + * of the client sync port! + * @see LibCommon_Sync.f_connect4ClientSync + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_VerdictControl.f_setVerdictPreamble + * @param p_syncId Synchronization point name/id + * @param p_ret Current behavior execution status + */ + function f_clientSyncAndVerdictPreamble(in charstring p_syncId , + FncRetCode p_ret) + runs on ClientSyncComp { + f_setVerdictPreamble(p_ret); + f_clientSync(p_syncId,p_ret); + vc_testcaseStep := e_testBody; + } + + /** + * @desc This function combines client verdict setting with its + * synchronization for use,e.g, after or within a + * test body implementation. + * Note that such premables can _not_ be reused in non- + * concurrent test cases. This can be achieved by using + * the f_selfOrClientSyncAndVerdict function instead. + * This function sets the client component verdict. + * @param p_syncId Synchronization point name/id + * @param p_ret Current behavior execution status + * @remark The use of this function requires prior connection + * of the client sync port! + * @see LibCommon_Sync.f_connect4ClientSync + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_VerdictControl.f_setVerdict + * @see LibCommon_Sync.f_selfOrClientSyncAndVerdict + */ + function f_clientSyncAndVerdictTestBody(in charstring p_syncId, + in FncRetCode p_ret) + runs on ClientSyncComp { + f_setVerdict(p_ret); + f_clientSync(p_syncId,p_ret); + vc_testcaseStep := e_postamble; + } + + /** + * @desc This function combines client verdict setting with its + * synchronization for use after or within a + * postamble implementation. + * Note that such prostambles can _not_ be reused in non- + * concurrent test cases. + * This function sets the client component verdict. + * @remark The use of this function requires prior connection + * of the client sync port! + * @see LibCommon_Sync.f_connect4ClientSync + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_VerdictControl.f_setVerdictPostamble + * @param p_syncId Synchronization point name/id + * @param p_ret Current behavior execution status + */ + function f_clientSyncAndVerdictPostamble(in charstring p_syncId , + in FncRetCode p_ret) + runs on ClientSyncComp { + f_setVerdictPostamble(p_ret); + f_clientSync(p_syncId,p_ret); + } + + /** + * @desc This function handles synchronization of a sync client + * with the server. In case of successful execution it sends + * a READY message to the server and waits the READY back. + * The time used for waiting is defined by PX_TSYNC_TIME_LIMIT. + * In case of a non successful execution status it + * sends a STOP message to the server. + * In both cases the receipt of a STOP message or no + * response from the server it will trigger the shutdown + * default (if activated). + * This function will set only the client verdict to INCONC + * (and stop its execution) if no STOP response is received + * from the server within the PX_TSYNC_TIME_LIMIT + * or if no shutdown default is activated. In all other + * cases the client verdict is NOT set. + * @param p_syncId Synchronization point name/id + * @param p_ret Current behavior execution status + * @remark The use of this function requires prior connection + * of the client sync port! + * @see LibCommon_Sync.f_connect4ClientSync + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT + * @see LibCommon_Sync.a_dummyShutDown + * @see LibCommon_Sync.f_clientSendStop + * @return Updated execution status + */ + function f_clientSync( in charstring p_syncId , + in FncRetCode p_ret ) + runs on ClientSyncComp + return FncRetCode{ + + if (p_ret == e_success){ + syncPort.send(m_syncClientReady(p_syncId)); + tc_sync.start; + alt{ + [] syncPort.receive(m_syncServerReady(p_syncId)){ + tc_sync.stop ; } + [] tc_sync.timeout{ + log("**** f_clientSync: Sync client did not receive message from sync server within the specified time limit - sync client will ask sync server to stop test case! ****") ; + f_clientSendStop(); } // function will not return! + } //end alt + } //end if + else { + log("**** f_clientSync: Execution status indicates that execution of test component behavior was not successful - sync client will ask sync server to stop test case! ****") ; + f_clientSendStop(); // function will not return! + } + if ( p_syncId == c_prDone ) { + log("**** f_clientSync: Sync client successfully passed PREAMBLE synchronization point. ****") ; + } else if ( p_syncId == c_tbDone ) { + log("**** f_clientSync: Sync client successfully passed TEST BODY synchronization point. ****") ; + } else { + log("**** f_clientSync: Sync client successfully passed synchronization point. ****") ; + } + return e_success ; + + } // end function f_clientSync + + /** + * @desc This function can be used to request the shutdown a + * multi component test case _prior_ to reaching a + * synchronization point. It sends a STOP message to + * the sync server and awaits then the STOP from the server + * which will trigger the shutdown default (if activated). + * This function will set the server verdict to INCONC (and + * stop the test case) if no shutdown default is activated. + * This function will set only the client verdict to INCONC + * (and stop its execution) if no STOP response is received + * from the server within the PX_TSYNC_TIME_LIMIT + * or if no shutdown default is activated. In all other + * cases the client verdict is NOT set. + * @remark The use of this function requires prior connection + * of the client sync port! + * @see LibCommon_Sync.f_connect4ClientSync + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT + * @see LibCommon_Sync.a_dummyShutDown + */ + function f_clientSendStop() + runs on ClientSyncComp { + log("**** f_clientSendStop: Sync client requesting from server to stop test case (including itself). ****") ; + syncPort.send(m_syncClientStop) ; + tc_sync.start; + alt{ + [] tc_sync.timeout{ + log("**** f_clientSendStop: Stopping sync client without shutdown - either no shutdown default active or no stop received from server. ****") ; + setverdict(inconc); + stop ; + } + }//end alt + tc_sync.stop; + stop; // stop here if shutdown default does not stop + } + + } // end group clientRelated + + } // end group advancedUserRelevantDefinitions + + group otherSyncModuleDefinitions { + + group syncModuleparams { + /** + * + * @desc Default time limit for a sync client to reach a + * synchronization point + */ + modulepar float PX_TSYNC_TIME_LIMIT := 120.0; + + /* + * @desc Default time limit for a sync client to finish + * its execution of the shutdown default + */ + modulepar float PX_TSHUT_DOWN_TIME_LIMIT := 120.0; + } + + group otherSyncTypes { + + type record of charstring SyncPointList; + + type record of ClientSyncComp ClientSyncCompList; + + } // end group otherSyncTypes + + group otherSelfSyncRelatedDefinitions { + + /** + * @desc This function creates the connection needed to + * execute self sync functions + * @see LibCommon_Sync.f_selfSync + * @see LibCommon_Sync.f_selfSyncStop + */ + function f_connect4SelfSync() + runs on SelfSyncComp { + connect(self:syncSendPort, self:syncPort); + }// end function f_connect4SelfSync + + /** + * @desc This function removes the connection needed + * to execute self sync functions + * @see LibCommon_Sync.f_selfSync + * @see LibCommon_Sync.f_selfSyncStop + */ + function f_disconnect4SelfSync() + runs on SelfSyncComp { + disconnect(self:syncSendPort, self:syncPort); + }// end function f_disconnect4SelfSync + + /** + * @desc This function combines MTC verdict setting with self + * synchronization for use in the preamble / test body / postamble + * @param p_syncId Synchronization point name/id + * @param p_ret Current behavior execution status + * @see LibCommon_VerdictControl.f_setVerdict + * @see LibCommon_Sync.f_selfSync + * @see LibCommon_Sync.a_dummyShutDown + */ + function f_selfSyncAndVerdict( in charstring p_syncId, + in FncRetCode p_ret ) + runs on SelfSyncComp { + if(vc_testcaseStep == e_preamble) { + f_selfSyncAndVerdictPreamble(p_syncId, p_ret); + } else if(vc_testcaseStep == e_testBody) { + f_selfSyncAndVerdictTestBody(p_syncId, p_ret); + } + else { + f_selfSyncAndVerdictPostamble(p_syncId, p_ret); + } + } + + /** + * @desc This function combines MTC verdict setting with self + * synchronization for use after the preamble. + * @param p_syncId Synchronization point name/id + * @param p_ret Current behavior execution status + * @see LibCommon_VerdictControl.f_setVerdictPreamble + * @see LibCommon_Sync.f_selfSync + */ + function f_selfSyncAndVerdictPreamble( in charstring p_syncId, + in FncRetCode p_ret ) + runs on SelfSyncComp { + f_setVerdictPreOrPostamble(p_ret); + f_selfSync(p_syncId,p_ret); + vc_testcaseStep := e_testBody; + } + + /** + * @desc This function combines MTC verdict setting with self + * synchronization for use after the test body. + * @param p_syncId Synchronization point name/id + * @param p_ret Current behavior execution status + * @see LibCommon_VerdictControl.f_setVerdict + * @see LibCommon_Sync.f_selfSync + */ + function f_selfSyncAndVerdictTestBody( in charstring p_syncId, + in FncRetCode p_ret ) + runs on SelfSyncComp { + f_setVerdict(p_ret); + f_selfSync(p_syncId,p_ret); + vc_testcaseStep := e_postamble; + } + + /** + * @desc This function combines MTC verdict setting with self + * synchronization for use after the postamble. + * @param p_syncId Synchronization point name/id + * @param p_ret Current behavior execution status + * @see LibCommon_VerdictControl.f_setVerdictPostamble + * @see LibCommon_Sync.f_selfSync + */ + function f_selfSyncAndVerdictPostamble( in charstring p_syncId , + in FncRetCode p_ret ) + runs on SelfSyncComp { + f_setVerdictPreOrPostamble(p_ret); + f_selfSync(p_syncId,p_ret); + } + + /** + * @desc This function synchronizes a MTC with itself. In case + * of a non successful execution status it sends a STOP + * message to itself and invokes that way the + * shutdown default (if activated). + * This function will set the server verdict to INCONC (and + * stop the test case) if no shutdown default is activated. + * Otherwise no verdict is set. + * @remark Sync ports should be connected prior to the invocation + * of this function! + * @param p_syncId Synchronization point name/id + * @param p_ret Current behavior execution status + * @return Updated execution status + * @see LibCommon_Sync.f_connect4SelfSync + * @see LibCommon_Sync.a_dummyShutDown + */ + function f_selfSync( in charstring p_syncId , + in FncRetCode p_ret ) + runs on SelfSyncComp + return FncRetCode{ + if (p_ret != e_success){ + f_selfSyncStop() ; // function will not return! + } + if ( p_syncId == c_prDone ) { + log("**** f_selfSync: Successfully passed PREAMBLE synchronization point. ****") ; + } else if ( p_syncId == c_tbDone ) { + log("**** f_selfSync: Successfully passed TEST BODY synchronization point. ****") ; + } else { + log("**** f_selfSync: Successfully passed synchronization point. ****") ; + } + return e_success ; + }// end function f_selfSync + + /** + * @desc This function can be used to shut down a test case _prior_ + * to reaching a synchronization point. it sends a STOP + * message to itself and invokes that way the + * shutdown default (if activated). + * This function will set the server verdict to INCONC (and + * stop the test case) if no shutdown default is activated. + * Otherwise no verdict is set. + * @remark Sync ports should be connected prior to the invocation + * of this function! + * @see LibCommon_Sync.f_connect4SelfSync + */ + function f_selfSyncStop() + runs on SelfSyncComp { + + log("**** f_selfSyncStop: MTC requests to stop test case (itself). ****") ; + syncSendPort.send(m_syncServerStop) ; // this MUST be _server_ for the default to catch! + tc_sync.start(PX_TSYNC_TIME_LIMIT); + alt{ + [] tc_sync.timeout{ + log("**** f_selfSyncStop: Stopping MTC without shutdown - either no shutdown default active or missing syncPort connection ****") ; + setverdict(inconc); + stop ; + } + }//end alt + tc_sync.stop; + stop; // if shutdown default is not activated or if it does not stop + } // end function f_selfSyncStop + + } // end group otherSelfSyncRelatedDefinitions + + /** + * + * @desc The sychronization protocol is conceptually based on + * named synchronization. Each synchronization point + * has it own specific synchronization message. This + * makes each synchronization unique, and allows, e.g., to + * ensure that a server synchronizes only clients which have + * reached the same synchronization point. + */ + group syncProtocolDefinition { + + type union SyncCmd { + ClientReady clientReady, + ServerReady serverReady, + ClientStop clientStop, + ServerStop serverStop + } + + type record ClientReady { + charstring syncPointId + } + + type record ServerReady { + charstring syncPointId + } + + type record ClientStop {} + + type record ServerStop {} + + } // end group syncProtocolDefinition + + group syncMessages { + template SyncCmd m_syncClientReady( template (present) charstring p_syncId ) := { + clientReady := { p_syncId } + } + + template SyncCmd m_syncServerReady( template (present) charstring p_syncId ) := { + serverReady := { p_syncId } + } + + template SyncCmd m_syncClientStop := { + clientStop := {} + } + + template SyncCmd m_syncServerStop := { + serverStop := {} + } + + } // end group syncMessages + + group otherSyncFunctions { + + /** + * @desc Makes server send a sync message to all known clients + * @param p_clientRefs List of client references to which the message is to be send + * @param p_syncCmd The actual synchronization message to be sent out + */ + function f_serverSendToAllClients( in ClientSyncCompList p_clientRefs, + in template (value) SyncCmd p_syncCmd) + runs on ServerSyncComp { + var integer i:=0; + for (i:=0; i< sizeof(p_clientRefs); i:=i+1 ){ + syncPort.send(p_syncCmd) to valueof(p_clientRefs[i]); + } + } // end function f_serverSendToAllClients + + /** + * @desc This function is intended only for use on server in concurrent + * TTCN-3 test cases. It waits for all components to shut down + * within the PX_TSHUT_DOWN_TIME_LIMIT. If a timeout occurs + * it aborts the test case (no matter how far clients got with their + * shutdown). + * This function sets the server verdict. + */ + function f_serverWaitForAllClientsToShutDown() + runs on ServerSyncComp { + + tc_shutDown.start(PX_TSHUT_DOWN_TIME_LIMIT); + alt { + [] syncPort.receive { + // clients may still try to send some sync message + } + [] all component.done { + tc_shutDown.stop; + log("**** f_serverWaitForAllClientsToShutDown: All components have properly shut down. Sync server will now terminate the test case. ****") ; + } + [] tc_shutDown.timeout { + log("**** f_serverWaitForAllClientsToShutDown: Not all clients have properly shutdown within the shut down time limit. Sync server will now terminate test case! ****") ; + } + } // end alt + // cover case that shut down default is NOT activated + setverdict(inconc); + //mtc.stop; + syncPort.send(m_syncServerStop) to self; // this MUST be _server_ for the default to catch! + tc_sync.start(PX_TSYNC_TIME_LIMIT); + alt{ + [] tc_sync.timeout{ + log("**** f_selfSyncStop: Stopping MTC without shutdown - either no shutdown default active or missing syncPort connection ****") ; + setverdict(inconc); + stop ; + } + }//end alt + tc_sync.stop; + stop; // if shutdown default is not activated or if it does not stop + } // end function f_serverWaitForAllClientsToShutDown + + function f_isPresentInArray(in ClientSyncComp p_clientRef, in ClientSyncCompList p_clientRefs) + return boolean { + var integer i; + for(i:=0; i < sizeof(p_clientRefs); i:=i+1) { + if(p_clientRefs[i] == p_clientRef) { + return true; + } + } + return false; + } + } // end group otherSyncFunctions + + } // end group otherSyncDefinitions + +} // end module LibCommon_Sync diff --git a/virtualization/docker-dev/home/etc/init.d/40-ttf_t012.sh b/virtualization/docker-dev/home/etc/init.d/40-ttf_t012.sh index 4115e5c..ab701a5 100755 --- a/virtualization/docker-dev/home/etc/init.d/40-ttf_t012.sh +++ b/virtualization/docker-dev/home/etc/init.d/40-ttf_t012.sh @@ -6,7 +6,7 @@ set -vx echo -e "*****************************\n* Checkout mec_devel sources\n*****************************\n" mkdir -p ${HOME}/dev && cd ${HOME}/dev || exit 1 -git clone --recurse-submodules --branch devel --single-branch https://forge.etsi.org/rep/mec/gs032p3-ttcn-test-suite.git mec_devel +git clone --recurse-submodules --branch devel https://forge.etsi.org/rep/mec/gs032p3-ttcn-test-suite.git mec_devel cd ${HOME}/dev/mec_devel/titan-test-system-framework git checkout devel cd ${HOME}/dev/mec_devel/ttcn @@ -20,7 +20,7 @@ ln -sf ${HOME}/dev/mec_devel/scripts/devenv.bash.ubuntu ${HOME}/devenv.bash echo -e "*****************************\n* Apply patched \n*****************************\n" cd ${HOME}/dev/mec_devel cp ./ttcn/patch_lib_common_titan/module.mk ./ttcn/LibCommon/ -cp ./ttcn/patch_lib_common_titan/*.ttcn ./ttcn/LibCommon/ttcn +cp ./ttcn/patch_lib_common_titan/ttcn/*.ttcn ./ttcn/LibCommon/ttcn echo -e "*****************************\n* Build Mec test suite\n*****************************\n" cd ${HOME}/dev/mec_devel diff --git a/virtualization/vagrant/provisioner.bash b/virtualization/vagrant/provisioner.bash index 420a225..82a7d07 100755 --- a/virtualization/vagrant/provisioner.bash +++ b/virtualization/vagrant/provisioner.bash @@ -82,7 +82,7 @@ echo ". ~/devenv.bash" >> /home/vagrant/.bashrc # Clone project cd /home/vagrant/dev -git clone --recurse-submodules --branch devel --single-branch https://forge.etsi.org/rep/mec/gs032p3-ttcn-test-suite.git mec_devel +git clone --recurse-submodules --branch devel https://forge.etsi.org/rep/mec/gs032p3-ttcn-test-suite.git mec_devel cd /home/vagrant/dev/mec_devel/titan-test-system-framework git checkout devel cd /home/vagrant/dev/mec_devel/ttcn @@ -102,7 +102,7 @@ ln -sf /home/vagrant/dev/mec_devel/scripts/devenv.bash.ubuntu /home/vagrant/deve # Apply patch cd /home/vagrant/dev/mec_devel cp ./ttcn/patch_lib_common_titan/module.mk ./ttcn/LibCommon/ -cp ./ttcn/patch_lib_common_titan/*.ttcn ./ttcn/LibCommon/ttcn +cp ./ttcn/patch_lib_common_titan/ttcn/*.ttcn ./ttcn/LibCommon/ttcn # Change user in cfg files cd ${HOME}/dev/mec_devel/scripts || exit 1 -- GitLab From 9a64913a2381f4db789791565e130e91097832ac Mon Sep 17 00:00:00 2001 From: YannGarcia Date: Mon, 17 Apr 2023 12:04:01 +0200 Subject: [PATCH 05/58] Update typing for MEC-013 and MEC-015 --- etc/AtsMec_Location/AtsMec_Location_Lewis.cf_ | 4 +- .../AtsMec_Location_Mockoon.cf_ | 6 +- .../AtsMec_Location_Sandbox.cf_ | 6 +- titan-test-system-framework | 2 +- ...AtsMec_TrafficManagementAPI_TestCases.ttcn | 4 +- .../LocationAPI/ttcn/LocationAPI_Pixits.ttcn | 4 +- .../ttcn/LocationAPI_Templates.ttcn | 135 +-- .../ttcn/LocationAPI_TypesAndValues.ttcn | 979 +++++++++++++----- .../ttcn/TrafficManagementAPI_Functions.ttcn | 2 +- .../ttcn/TrafficManagementAPI_Templates.ttcn | 32 +- .../TrafficManagementAPI_TypesAndValues.ttcn | 115 +- ttcn/LibMec/ttcn/LibMec_Pixits.ttcn | 14 +- .../ttcn/LibHttp_JsonTemplates.ttcn | 36 - 13 files changed, 896 insertions(+), 443 deletions(-) diff --git a/etc/AtsMec_Location/AtsMec_Location_Lewis.cf_ b/etc/AtsMec_Location/AtsMec_Location_Lewis.cf_ index 4255964..384e475 100644 --- a/etc/AtsMec_Location/AtsMec_Location_Lewis.cf_ +++ b/etc/AtsMec_Location/AtsMec_Location_Lewis.cf_ @@ -17,8 +17,8 @@ LibHttp_Pics.PICS_USE_TOKEN_HEADER := true LibMec_Pics.PICS_ROOT_API := "etsi-013" # LibMex_Pixits -LibMec_Pixits.PX_ME_APP_Q_ZONE_ID_URI := "/location/v2/zones" -LibMec_Pixits.PX_ME_APP_Q_USERS_LIST_URI := "/location/v2/users" +LibMec_Pixits.PX_ME_APP_Q_ZONE_ID_URI := "/location/v3/zones" +LibMec_Pixits.PX_ME_APP_Q_USERS_LIST_URI := "/location/v3/users" LibMec_Pixits.PX_RNIS_SUBSCRITIONS_URI := "/rni/v1/subscriptions" LibMec_Pixits.PX_RNIS_QUERIES_URI := "/rni/v1/queries" LibMec_Pixits.PX_MEC_SVC_MGMT_APPS_URI := "/mec_service_mgmt/v1/applications" diff --git a/etc/AtsMec_Location/AtsMec_Location_Mockoon.cf_ b/etc/AtsMec_Location/AtsMec_Location_Mockoon.cf_ index 7909087..52e927a 100644 --- a/etc/AtsMec_Location/AtsMec_Location_Mockoon.cf_ +++ b/etc/AtsMec_Location/AtsMec_Location_Mockoon.cf_ @@ -63,9 +63,9 @@ LocationAPI_Pixits.PX_USER := "4005C0A640001" LocationAPI_Pixits.PX_IP_ADDRESS := "10.100.0.1" LocationAPI_Pixits.PX_CLIENT_ID := "0123" LocationAPI_Pixits.PX_SUBSCRIPTION_ID := "1" -LocationAPI_Pixits.PX_CALLBACK_REF_URL := { notifyURL := "http://yanngarcia.ddns.net/location/v2/notif/1", callbackData := omit, notificationFormat := omit } -LocationAPI_Pixits.PX_AREA_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v2/notif/1", callbackData := omit, notificationFormat := omit } -LocationAPI_Pixits.PX_UE_DIST_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v2/notif/1", callbackData := omit, notificationFormat := omit } +LocationAPI_Pixits.PX_CALLBACK_REF_URL := { notifyURL := "http://yanngarcia.ddns.net/location/v3/notif/1", callbackData := omit, notificationFormat := omit } +LocationAPI_Pixits.PX_AREA_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v3/notif/1", callbackData := omit, notificationFormat := omit } +LocationAPI_Pixits.PX_UE_DIST_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v3/notif/1", callbackData := omit, notificationFormat := omit } LocationAPI_Pixits.PX_UE_COORD_LAT := 43.729538 LocationAPI_Pixits.PX_UE_COORD_LONG := 7.413819 diff --git a/etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ b/etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ index 094c53d..b9c2f57 100644 --- a/etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ +++ b/etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ @@ -26,9 +26,9 @@ LocationAPI_Pixits.PX_USER := "4005C0A640001" LocationAPI_Pixits.PX_IP_ADDRESS := "10.100.0.1" LocationAPI_Pixits.PX_CLIENT_ID := "0123" LocationAPI_Pixits.PX_SUBSCRIPTION_ID := "1" -LocationAPI_Pixits.PX_CALLBACK_REF_URL := { notifyURL := "http://yanngarcia.ddns.net/location/v2/notif/1", callbackData := omit, notificationFormat := omit } -LocationAPI_Pixits.PX_AREA_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v2/notif/1", callbackData := omit, notificationFormat := omit } -LocationAPI_Pixits.PX_UE_DIST_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v2/notif/1", callbackData := omit, notificationFormat := omit } +LocationAPI_Pixits.PX_CALLBACK_REF_URL := { notifyURL := "http://yanngarcia.ddns.net/location/v3/notif/1", callbackData := omit, notificationFormat := omit } +LocationAPI_Pixits.PX_AREA_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v3/notif/1", callbackData := omit, notificationFormat := omit } +LocationAPI_Pixits.PX_UE_DIST_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v3/notif/1", callbackData := omit, notificationFormat := omit } LocationAPI_Pixits.PX_UE_COORD_LAT := 43.729538 LocationAPI_Pixits.PX_UE_COORD_LONG := 7.413819 diff --git a/titan-test-system-framework b/titan-test-system-framework index 3c00b81..0a28ff3 160000 --- a/titan-test-system-framework +++ b/titan-test-system-framework @@ -1 +1 @@ -Subproject commit 3c00b81c1e158922c83ae0c0de5288631dd1a2be +Subproject commit 0a28ff34d9ca15d6ed481dad98485210e4d6e179 diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn index 2d66097..cf5a3c5 100644 --- a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn @@ -392,7 +392,7 @@ module AtsMec_TrafficManagementAPI_TestCases { SESSION_SPECIFIC_BW_ALLOCATION, // Request type "1024", // FixedAllocation Downlink, // AllocationDirection - { m_session_filter("10.10.10.10", { "1010" }) } + { m_session_filter("10.10.10.10", 1010) } ) ) ) @@ -543,7 +543,7 @@ module AtsMec_TrafficManagementAPI_TestCases { APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type "1024", // FixedAllocation Downlink, // AllocationDirection - { m_session_filter("10.10.10.10", { "1010" }) } // MEC015 Clause 7.2.2 Type: BwInfo Table 7.2.2-1: Elements of BwInfo, sessionFilter shall be omit + { m_session_filter("10.10.10.10", 1010) } // MEC015 Clause 7.2.2 Type: BwInfo Table 7.2.2-1: Elements of BwInfo, sessionFilter shall be omit ) ) ) diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn index 46cda75..1a397ef 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn @@ -27,7 +27,7 @@ module LocationAPI_Pixits { modulepar ZoneId PX_NON_EXISTENT_ZONE_ID := "zone51"; - modulepar ResourceURL PX_RESOURCE_URL := "http://meep-loc-serv/etsi-013/location/v2/users/ue1"; + modulepar ResourceURL PX_RESOURCE_URL := "http://meep-loc-serv/etsi-013/location/v3/users/ue1"; modulepar NumberOfAccessPoints PX_NB_ACCESS_POINTS := 3; @@ -51,7 +51,7 @@ module LocationAPI_Pixits { modulepar Address PX_UE_ZONAL_TRAF_SUB_URI := ""; - modulepar Json.AnyURI PX_UE_LOC_QRY_URI := "/location/v2/queries/distance"; + modulepar Json.AnyURI PX_UE_LOC_QRY_URI := "/location/v3/queries/distance"; modulepar Json.Number PX_UE_COORD_LAT := -80.86302; diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn index a169aeb..71ac97c 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn @@ -20,8 +20,8 @@ module LocationAPI_Templates { address_ := p_address, accessPointId := p_access_point_id, zoneId := p_zone_id, - timestamp_ := p_timestamp, resourceURL := p_resource_url, + timestamp_ := p_timestamp, locationInfo := omit, contextLocationInfo := omit, ancillaryInfo := omit @@ -37,8 +37,8 @@ module LocationAPI_Templates { address_ := p_address, accessPointId := p_access_point_id, zoneId := p_zone_id, - timestamp_ := p_timestamp, resourceURL := p_resource_url, + timestamp_ := p_timestamp, locationInfo := *, contextLocationInfo := *, ancillaryInfo := * @@ -210,41 +210,12 @@ module LocationAPI_Templates { resourceURL := * } // End of template mw_periodic_tracking_subscription - template (value) ZonalTrafficSubscription m_zonal_traffic_subscription( - in ClientCorrelator p_client_correlator, - in CallbackReference p_callback_reference, - in ZoneId p_zone_id, - in UserEventCriteria p_user_event_criteria := { Entering } - ) := { - clientCorrelator := p_client_correlator, - callbackReference := p_callback_reference, - zoneId := p_zone_id, - interestRealm := omit, - userEventCriteria := p_user_event_criteria, - duration := omit, - resourceURL := omit - } // End of template m_zonal_traffic_subscription - - template (present) ZonalTrafficSubscription mw_zonal_traffic_subscription( - template (present) ClientCorrelator p_client_correlator := ?, - template (present) CallbackReference p_callback_reference := ?, - template (present) ZoneId p_zone_id := ? - ) := { - clientCorrelator := p_client_correlator, - callbackReference := p_callback_reference, - zoneId := p_zone_id, - interestRealm := *, - userEventCriteria := *, - duration := *, - resourceURL := * - } // End of template mw_zonal_traffic_subscription - template (omit) CircleNotificationSubscription m_circle_notification_subscription( in template (omit) ClientCorrelator p_clientCorrelator := omit, in template (value) CallbackReference p_callbackReference, in template (value) Addresses p_address, - in template (value) Json.Number p_latitude := PX_UE_COORD_LAT, - in template (value) Json.Number p_longitude := PX_UE_COORD_LONG, + in template (value) Latitude p_latitude := PX_UE_COORD_LAT, + in template (value) Longitude p_longitude := PX_UE_COORD_LONG, in template (value) Json.Number p_radius := 200.0, in template (value) Json.Number p_trackingAccuracy := 10.0, in template (value) EnteringLeavingCriteria p_enteringLeavingCriteria := Entering, @@ -273,8 +244,8 @@ module LocationAPI_Templates { template ClientCorrelator p_clientCorrelator := *, template (present) CallbackReference p_callbackReference := ?, template (present) Addresses p_address := ?, - template (present) Json.Number p_latitude := ?, - template (present) Json.Number p_longitude := ?, + template (present) Latitude p_latitude := ?, + template (present) Longitude p_longitude := ?, template (present) Json.Number p_radius := ?, template (present) Json.Number p_trackingAccuracy := ?, template (present) EnteringLeavingCriteria p_enteringLeavingCriteria := ?, @@ -311,98 +282,4 @@ module LocationAPI_Templates { timestamp_ := * } // End of template mw_terminal_distance - template (omit) DistanceNotificationSubscription m_distance_notification_subscription( - in template (value) CallbackReference p_callbackReference, - in template (value) Json.Bool p_checkImmediate := true, - in template (omit) ClientCorrelator p_clientCorrelator := omit, - in template (value) DistanceCriteria p_criteria := AllWithinDistance, - in template (value) Json.Number p_distance, - in template (value) UInt32 p_frequency := 10, - in template (value) Addresses p_monitoredAddress, - in template (omit) Addresses p_referenceAddress := omit, - in template (value) Json.Number p_trackingAccuracy := 10.0, - in template (omit) ResourceURL p_resourceURL := omit - ) := { - callbackReference := p_callbackReference, - checkImmediate := p_checkImmediate, - clientCorrelator := p_clientCorrelator, - count := omit, - criteria := p_criteria, - distance := p_distance, - duration := omit, - frequency := p_frequency, - link := omit, - monitoredAddress := p_monitoredAddress, - referenceAddress := p_referenceAddress, - requester := omit, - resourceURL := p_resourceURL, - trackingAccuracy := p_trackingAccuracy - } // End of template m_distance_notification_subscription - - template DistanceNotificationSubscription mw_distance_notification_subscription( - template (present) CallbackReference p_callbackReference := ?, - template (present) Json.Bool p_checkImmediate := ?, - template ClientCorrelator p_clientCorrelator := *, - template (present) DistanceCriteria p_criteria := ?, - template (present) Json.Number p_distance := ?, - template (present) UInt32 p_frequency := ?, - template (present) Addresses p_monitoredAddress := ?, - template Addresses p_referenceAddress := *, - template (present) Json.Number p_trackingAccuracy := ?, - template ResourceURL p_resourceURL := * - ) := { - callbackReference := p_callbackReference, - checkImmediate := p_checkImmediate, - clientCorrelator := p_clientCorrelator, - count := *, - criteria := p_criteria, - distance := p_distance, - duration := *, - frequency := p_frequency, - link := *, - monitoredAddress := p_monitoredAddress, - referenceAddress := p_referenceAddress, - requester := *, - resourceURL := p_resourceURL, - trackingAccuracy := p_trackingAccuracy - } // End of template mw_distance_notification_subscription - - template (omit) PeriodicNotificationSubscription m_periodic_notification_subscription( - in template (value) Addresses p_address, - in template (value) CallbackReference p_callbackReference, - in template (value) UInt32 p_frequency := 10, - in template (value) UInt32 p_requestedAccuracy := 1, - in template (omit) ClientCorrelator p_clientCorrelator := omit, - in template (omit) ResourceURL p_resourceURL := omit - ) := { - address_ := p_address, - callbackReference := p_callbackReference, - clientCorrelator := p_clientCorrelator, - duration := omit, - frequency := p_frequency, - link := omit, - requestedAccuracy := p_requestedAccuracy, - requester := omit, - resourceURL := p_resourceURL - } // End of template m_periodic_notification_subscription - - template PeriodicNotificationSubscription mw_periodic_notification_subscription( - template (present) Addresses p_address := ?, - template (present) CallbackReference p_callbackReference := ?, - template (present) UInt32 p_frequency := ?, - template (present) UInt32 p_requestedAccuracy := ?, - template ClientCorrelator p_clientCorrelator := *, - template ResourceURL p_resourceURL := * - ) := { - address_ := p_address, - callbackReference := p_callbackReference, - clientCorrelator := p_clientCorrelator, - duration := *, - frequency := p_frequency, - link := *, - requestedAccuracy := p_requestedAccuracy, - requester := *, - resourceURL := p_resourceURL - } // End of template mw_periodic_notification_subscription - } // End of module LocationAPI_Templates diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn index 7206dfa..46cf247 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn @@ -1,8 +1,8 @@ /** - * @author ETSI / STF569 + * @author ETSI / STF569 / TTF T027 * @version $Url$ * $Id$ - * @desc Types ANd Values for ETSI GS MEC 013 V2.1.1 (2019-09) + * @desc Types ANd Values for ETSI GS MEC 013 V3.1.1 (2019-09) * @copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. @@ -30,7 +30,7 @@ module LocationAPI_TypesAndValues { * @desc * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see ETSI GS MEC 013 V2.1.1 (2019-09) Clause 6.5.2 Type: TimeStamp + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.2 Type: TimeStamp */ type record TimeStamp { Seconds seconds, @@ -38,56 +38,91 @@ module LocationAPI_TypesAndValues { } /** - * @desc A type containing list of users. - * @member user Collection of the zone information list. + * @desc This type represents a list of UserInfo. + * @member user Collection of the user location information list. * @member resourceURL Self referring URL. - * @see ETSI GS MEC 013 V2.1.1 (2019-09) Clause 6.2.2 Type: UserInfo + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.5 Type: UserList */ - type record of UserInfo UserInfos; type record UserList { UserInfos user optional, - ResourceURL resourceURL + ResourceURL resourceURL optional } + type record of UserInfo UserInfos; /** - * @desc Shape information, as detailed in [14], associated with the reported location coordinate - * @see ETSI GS MEC 013 V2.1.1 (2019-09) Table 6.5.3-1: Definition of type LocationInfo + * @desc This type represents configuration for the delivery of subscription notifications over Websockets + * @member websocketUri Set by location server to indicate to the service consumer the Websocket URI to be used for delivering notifications + * @member requestWebsocketUri Set to true by the service consumer to indicate that Websocket delivery is requested + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.4 Type: WebsockNotifConfig */ - type enumerated Shape { - ELLIPSOID_ARC (1), - ELLIPSOID_POINT (2), - ELLIPSOID_POINT_ALTITUDE (3), - ELLIPSOID_POINT_ALTITUDE_UNCERT_ELLIPSOID (4), - ELLIPSOID_POINT_UNCERT_CIRCLE (5), - ELLIPSOID_POINT_UNCERT_ELLIPSE (6), - POLYGON (7) - } with { - variant "JSON: as number" + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional } /** - * @desc Velocity information, as detailed in [14], associated with the reported location coordinate - * @see ETSI GS MEC 013 V2.1.1 (2019-09) Table 6.5.3-1: Definition of type LocationInfo + * @desc This type represents some requirements about reporting the event of user locationreportingLocationReq This IE shall be set to true if a location estimate is required for each event report + * @member accessPointList One or more access points forming a monitoring area that could be any shape + * @member zoneId Identifier of zone (e.g. zone001) to monitor + * @member occurrenceInfo One time only report indication + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.5 Type: UserEventPara */ - type enumerated VelocityType { - HORIZONTAL (1), - HORIZONTAL_VERTICAL (2), - HORIZONTAL_UNCERT (3), - HORIZONTAL_VERTICAL_UNCERT (4) - } + type record UserEventPara { + Json.Bool reportingLocationReq optional, + AccessPointList accessPointList optional, + ZoneId zoneId optional, + OccurrenceInfo occurrenceInfo optional + } // End of type UserEventPara - type record Velocity { - VelocityType velocityType, - UInt32 bearing, - UInt32 horizontalSpeed, - Int32 verticalSpeed optional, - UInt32 verticalUncertainty optional - } + /** + * @desc This type represents the parameters that control the report times and frequency + * @member minimumInterval Minimum interval between reports in case frequently reporting. Unit is second. + * @member maximumFrequency Maximum frequency (in seconds) of notifications per subscription + * @member maximumCount Maximum number of notifications. For no maximum, either do not include this element or specify a value of zero. Default value is 0 + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.6 Type: ReportingCtrl + */ + type record ReportingCtrl { + Json.UInteger minimumInterval optional, + Json.UInteger maximumFrequency optional, + Json.UInteger maximumCount optional + } // End of type ReportingCtrl + + /** + * @desc This type represents the parameters that describe an area + * @member shape The shape of the area monitored + * @member points Shall include one point if the shape is CIRCLE + * @member radius + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.7 Type: AreaInfo + */ + type record AreaInfo { + Shae shape, + Points points, + Json.UInteger radius optional + } // End of type AreaInfo + + /** + * @desc Location latitude, expressed in the range -90° to +90° + */ type record of Json.Number Latitude; + /** + * @desc Location longitude, expressed in the range -180° to +180° + */ type record of Json.Number Longitude; + /** + * @desc This type represents the geographical location of a point + * @member latitude Location latitude, expressed in the range -90° to +90° + * @member longitude Location longitude, expressed in the range -180° to +180° + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.8 Type: Point + */ + type record Point { + Latitude latitude, + Longitude longitude + } // End of type Point + type record of Point Points; + /** * @desc A type containing location information with latitude, longitude and altitude, in addition the accuracy of the information are provided. * @member latitude Location latitude, expressed in the range -90° to +90°. Cardinality greater than one only if "shape" equals 7. @@ -104,7 +139,7 @@ module LocationAPI_TypesAndValues { * @member includedAngle Present only if \"shape\" equals 6 * @member shape Shape information, as detailed in [14], associated with the reported location coordinate * @member velocity Structure with attributes relating to the target entity’s velocity, as defined in [14] - * @see ETSI GS MEC 013 V2.1.1 (2019-09) Clause 6.5.3 Type: LocationInfo + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.3 Type: LocationInfo */ type record LocationInfo { Latitude latitude, @@ -126,6 +161,63 @@ module LocationAPI_TypesAndValues { variant (timestamp_) "name as 'timestamp'"; } // End of type LocationInfo + /** + * @desc Shape information, as detailed in [14], associated with the reported location coordinate + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Table 6.5.3-1: Definition of type LocationInfo + */ + type enumerated Shape { + ELLIPSOID_ARC (1), + ELLIPSOID_POINT (2), + ELLIPSOID_POINT_ALTITUDE (3), + ELLIPSOID_POINT_ALTITUDE_UNCERT_ELLIPSOID (4), + ELLIPSOID_POINT_UNCERT_CIRCLE (5), + ELLIPSOID_POINT_UNCERT_ELLIPSE (6), + POLYGON (7) + } with { + variant "JSON: as number" + } + + /** + * @desc Velocity information, as detailed in [14], associated with the reported location coordinate + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Table 6.5.3-1: Definition of type LocationInfo + */ + type enumerated VelocityType { + HORIZONTAL (1), + HORIZONTAL_VERTICAL (2), + HORIZONTAL_UNCERT (3), + HORIZONTAL_VERTICAL_UNCERT (4), + ELLIPSOID_POINT_UNCERT_CIRCLE (5), + ELLIPSOID_POINT_UNCERT_ELLIPSE (6), + POLYGON (7) + } with { + variant "JSON: as number" + } + + /** + * @desc Structure with attributes relating to the target entity's velocity + * @member velocityType Velocity information + * @member bearing Bearing, expressed in the range 0° to 360° + * @member horizontalSpeed Horizontal speed + * @member uncertainty Horizontal uncertainty + * @member verticalSpeed Vertical speed, expressed in km/h + * @member verticalUncertainty Vertical uncertainty + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Table 6.5.3-1: Definition of type LocationInfo + */ + type record Velocity { + VelocityType velocityType, + Json.UInteger bearing, + Json.UInteger horizontalSpeed, + Json.UInteger uncertainty optional, + Json.Integer verticalSpeed optional, + Json.UInteger verticalUncertainty optional + } // End of type Velocity + + /** + * @desc Identifier of access point, (reference ETSI TS 129 171). Where the E-CGI is made up of the PLMN and Cell Identity (28 bit string). Then the PLMN is made up of the 3 digit MCC & 2 or 3 digit MNC. The Cell Portion is an optional element + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.6.1 accessPointId + */ + type Json.String AccessPointId; + /** * @desc A type containing zone information. * @member zoneId Identifier of zone @@ -133,6 +225,8 @@ module LocationAPI_TypesAndValues { * @member numberOfUnservicableAccessPoints Number of inoperable access points within the zone. * @member numberOfUsers The number of users currently on the access point. * @member resourceURL Self referring URL. + * @see OMA-TS-REST_NetAPI_ZonalPresence-V1_0-20160308-C Clause 5.2.2.2 Type: ZoneInfo + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1 Zonal presence data types */ type record ZoneInfo { ZoneId zoneId, @@ -146,6 +240,8 @@ module LocationAPI_TypesAndValues { * @desc Collection of the zone information list. * @member zone Collection of the zone information list. * @member resourceURL Self referring URL. + * @see OMA-TS-REST_NetAPI_ZonalPresence-V1_0-20160308-C Clause 5.2.2.1 Type: ZoneList + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1 Zonal presence data types */ type record of ZoneInfo ZoneInfos; type record ZoneList { @@ -153,12 +249,6 @@ module LocationAPI_TypesAndValues { ResourceURL resourceURL } - /** - * @desc Identifier of access point, (reference ETSI TS 129 171). Where the E-CGI is made up of the PLMN and Cell Identity (28 bit string). Then the PLMN is made up of the 3 digit MCC & 2 or 3 digit MNC. The Cell Portion is an optional element - * @see ETSI GS MEC 013 V2.1.1 (2019-09) 6.6.1 accessPointId - */ - type Json.String AccessPointId; - type UInt32 DateTimeStamp; // FIXME To be reviewed /** @@ -170,6 +260,8 @@ module LocationAPI_TypesAndValues { * @member interestRealm Interest realm of access point * @member timezone Time zone of access point * @member resourceURL Self referring URL. + * @see OMA-TS-REST_NetAPI_ZonalPresence-V1_0-20160308-C Clause 5.2.2.4 Type: AccessPointInfo + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1 Zonal presence data types */ type record AccessPointInfo { AccessPointId accessPointId, @@ -181,6 +273,7 @@ module LocationAPI_TypesAndValues { DateTimeStamp timezone optional, ResourceURL resourceURL } + /** * @desc Collection of the access point information list */ @@ -191,6 +284,8 @@ module LocationAPI_TypesAndValues { * @member zoneId Identifier of zone * @member accessPoint Collection of the access point information list. * @member resourceURL Self referring URL + * @see OMA-TS-REST_NetAPI_ZonalPresence-V1_0-20160308-C Clause 5.2.2.3 Type: AccessPointList + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1 Zonal presence data types */ type record AccessPointList { ZoneId zoneId, @@ -199,7 +294,7 @@ module LocationAPI_TypesAndValues { } /** - * @desc Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI). + * @desc Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) */ type Json.AnyURI Address type record of Address Addresses; @@ -213,7 +308,7 @@ module LocationAPI_TypesAndValues { * @desc CallBackData if passed by the application during the associated ZonalTrafficSubscription and UserTrackingSubscription operation. See [\ REST_NetAPI_Common]. */ - type Json.String CallbackData; + type Json.String CallbackData; // TODO To be removed /** * @desc Notification serialization format @@ -241,19 +336,20 @@ REST_NetAPI_Common]. type Json.String ClientCorrelator; /** - * @desc The connection type for the access point + * @desc This enumeration represents the connection type of an access point. + * @member LTE Access point provides a LTE-Femto connection + * @member Wifi Access point provides a Wifi® connection + * @member Wimax Access point provides a Wimax® connection + * @member FiveG_NR Access point provides a 5G NR connection + * @member UNKNOWN Access point connection type is unknown + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.7.5 Enumeration: ConnectionType */ type enumerated ConnectionType { - Femto, - LTE_femto, - Smallcell, - LTE_smallcell, + LTE, Wifi, - Pico, - Micro, - Macro, Wimax, - Unknown + FiveG_NR, + UNKNOWN } /** @@ -277,19 +373,50 @@ REST_NetAPI_Common]. type Json.String InterestRealm; /** - * @desc Link to other resources - * @member rel Describes the relationship between the URI and the resource. - * @member href UTI + * @desc This type represents a type of link and may be referenced from data structures + * @member href URI referring to a resource + * @see ETSI TS 129 572 V16.7.0 (2021 08) Clause 6.7.2 Type: LinkType + */ + type record LinkType { + Json.AnyURI href + } + + /** + * @desc This type represents specified event types for UE location report + * @member ENTERING_AREA_EVENT Entering area reporting event + * @member LEAVING_AREA_EVENT Leaving area reporting event + * @see ETSI TS 129 572 V16.7.0 (2021 08) Clause 6.7.3 Enumeration: LocationEventType + */ + type enumerated LocationEventType { + ENTERING_AREA_EVENT, + LEAVING_AREA_EVENT + } + + /** + * @desc This enumeration represents the result of a localization associated with a notification + * @member SUCCESS Localization is successful + * @member ABNORMAL Localization is failed due to timeout or other unspecific errors + * @see ETSI TS 129 572 V16.7.0 (2021 08) 6.7.4 Enumeration: NotificationResult */ - type record Link { - Json.String rel, - Json.String href + type enumerated NotificationResult { + SUCCESS, + ABNORMAL } /** * @desc The URL of your own listener application. */ - type Json.String NotifyURL; + type Json.AnyURI NotifyURL; + + /** + * @desc Hyperlink related to the resource + * @member self_ Self-referring URI + */ + type record Links { + Link self_ + } with { + variant (self_) "name as 'self'"; + } /** * @desc The number of access points within the zone @@ -373,25 +500,99 @@ REST_NetAPI_Common]. */ type record of UserEventType UserEventCriteria; + /** + * @desc Definition of type CivicAddress + * @member country The two-letter ISO 3166 country code in capital ASCII letters + * @member A1 National subdivisions + * @member A2 County, parish + * @member A3 City, township + * @member A4 City division, borough, city district + * @member A5 Neighbourhood + * @member A6 Group of streets below the neighbourhood level IETF RFC 4776 [6] + * @member PRD Leading street direction IETF RFC 4776 [6] + * @member POD Trailing street suffix IETF RFC 4776 [6] + * @member STS Street suffix or type IETF RFC 4776 [6] + * @member HNO House number IETF RFC 4776 [6] + * @member HNS House number suffix IETF RFC 4776 [6] + * @member LMK Landmark or vanity address IETF RFC 4776 [6] + * @member LOC Additional location information IETF RFC 4776 [6] + * @member NAM Name (residence and office occupant) IETF RFC 4776 [6] + * @member PC Postal/zip code IETF RFC 4776 [6] + * @member BLD Building (structure) IETF RFC 5139 [7] + * @member UNIT Unit (apartment, suite) IETF RFC 5139 [7] + * @member FLR Floor IETF RFC 4776 [6] + * @member Room Place-type IETF RFC 5139 [7] + * @member PCN Postal community name IETF RFC 5139 [7] + * @member POBOX Post office box (P.O. box) IETF RFC 5139 [7] + * @member ADDCODE Additional code IETF RFC 5139 [7] + * @member SEAT Seat (desk, cubicle, workstation) IETF RFC 5139 [7] + * @member RD Primary road or street IETF RFC 5139 [7] + * @member RDSEC Road clause IETF RFC 5139 [7] + * @member RDBR Road branch IETF RFC 5139 [7] + * @member RDSUBBR Road sub-branch IETF RFC 5139 [7] + * @member PRM Road pre-modifier IETF RFC 5139 [7] + * @member POM Road post-modifier IETF RFC 5139 [7] + * @member usageRules When present, this IE shall carry the value of "usagerules" Element of the PIDL-LO XML document + * @member method When present, this IE shall contain the method token, carried by the "method" Element of the PIDLLO XML document. IETF RFC 4119 [25] providedBy string O 0..1 When present, this IE shall carry the value of "provided-by" Element of the PIDL-LO XML document + * @member providedBy When present, this IE shall carry the value of "provided-by" Element of the PIDL-LO XML document + * @see ETSI TS 129 572 V16.7.0 (2021 08) Table 6.1.6.2.14-1 + */ + type record CivicAddress { + Json.String country, + Json.String A1 optional, + Json.String A3 optional, + Json.String A4 optional, + Json.String A5 optional, + Json.String A6 optional, + Json.String PRD optional, + Json.String POD optional, + Json.String STS optional, + Json.String HNO optional, + Json.String HNS optional, + Json.String LMK optional, + Json.String LOC optional, + Json.String NAM optional, + Json.String PC optional, + Json.String BLD optional, + Json.String UNIT optional, + Json.String FLR optional, + Json.String Room optional, + Json.String PCN optional, + Json.String POBOX optional, + Json.String ADDCODE optional, + Json.String SEAT optional, + Json.String RD optional, + Json.String RDSEC optional, + Json.String RDBR optional, + Json.String RDSUBBR optional, + Json.String PRM optional, + Json.String POM optional, + Json.String usageRules optional, + Json.String method optional, + Json.String providedBy + } + /** * @desc A type containing user information. * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI). * @member accessPointId Identifier of access point, (reference ETSI TS 129 171). - * @member zoneId Identifier of zone - * @member timestamp + * @member zoneId The identity of the zone the user is currently within, + * @member timestamp Date and time that location was collected * @member resourceURL Self referring URL. * @member locationInfo A type containing location information with latitude, longitude and altitude, in addition the accuracy of the information are provided. + * @member civicInfo Contextual information of a user location * @member contextLocationInfo Contextual information of a user location (e.g. aisle, floor, room number, etc.). * @member ancillaryInfo Reserved for future use - * @see ETSI GS MEC 013 V2.1.1 (2019-09) Clause 6.2.2 Type: UserInfo + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.2 Type: UserInfo */ type record UserInfo { Address address_, AccessPointId accessPointId, ZoneId zoneId, + ResourceURL resourceURL optional, TimeStamp timestamp_, - ResourceURL resourceURL, LocationInfo locationInfo optional, + CivicAddress civicInfo optional, ContextLocationInfo contextLocationInfo optional, AncillaryInfo ancillaryInfo optional } with { @@ -399,6 +600,48 @@ REST_NetAPI_Common]. variant (timestamp_) "name as 'timestamp'"; } // End of type UserInfo + /** + * @desc Represents the relative location in a reference system that is a Cartesian coordinate system and described by a map + * @member mapInfo Indicates a map corresponding to a location area + * @member X Indicates the value (in the unit of meters) on x-axis of the relative location in the Cartesian system + * @member Y Indicates the value (in the unit of meters) on y-axis of the relative location in the Cartesian system + * @member Z Indicates the value (in the unit of meters) on z-axis of the relative location in the Cartesian system for a 3D-Point + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.3 + */ + type record RelativeLocationInfo { + MapInfo mapInfo, + Json.Number X, + Json.Number Y, + Json.Number Z optional + } + + /** + * @desc Indicates the location of the map origin in the local Cartesian coordinate system + * @member latitude Location latitude, expressed in the range -90° to +90° + * @member longitude Location longitude, expressed in the range -180° to +180° + * @member Location altitude relative to the WGS84 ellipsoid surface + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.4 + */ + type record MapInfoOrigin { + Latitude latitude, + Longitude longitude, + Json.Number altitude optional + } + + /** + * @desc This type represents a map that may incorporates an origin + * @member mapId Indicates the ID of the map + * @member Indicates the location of the map origin in the local Cartesian coordinate system + * @member ancillaryMapInfo Ancillary map information may be used to convert coordinates between different coordinate systems + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.4 + */ + type record MapInfo { + Json.String mapId, + MapInfoOrigin origin optional, + AncillaryMapInfo ancillaryMapInfo optional + } + type Json.String AncillaryMapInfo; + /** * @desc A type containing user tracking subscription. * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server @@ -432,82 +675,11 @@ REST_NetAPI_Common]. variant (address_) "name as 'address'"; } - /** - * @desc A type containing zonal presence notification - * @member callbackData CallBackData if passed by the application during the associated ZonalTrafficSubscription and UserTrackingSubscription operation. See - * @member zoneId Identifier of zone - * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) to monitor - * @member interestRealm Interest realm of access point (e.g. geographical area, a type of industry etc.) - * @member userEventType - * @member currentAccessPointId Identifier of access point - * @member previousAccessPointId Identifier of access point - * @member timestamp_ - * @member link Link to other resources that are in relationship with this notification. The server SHOULD include a link to the related subscription. No other links are required or suggested by this specification. - */ - type record ZonalPresenceNotification { - CallbackData callbackData optional, - ZoneId zoneId, - Address address_, - InterestRealm interestRealm optional, - UserEventType userEventType, - CurrentAccessPointId currentAccessPointId, - PreviousAccessPointId previousAccessPointId optional, - TimeStamp timestamp_, - Link link optional - } with { - variant (address_) "name as 'address'"; - variant (timestamp_) "name as 'timestamp'"; - } - - /** - * @desc A type containing zonal traffic subscription - * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server - * @member callbackReference - * @member zoneId Identifier of zone - * @member interestRealm Interest realms of access points within a zone (e.g. geographical area, a type of industry etc.). - * @member userEventCriteria List of user event values to generate notifications for (these apply to zone identifier or all interest realms within zone identifier specified). If this element is missing, a notification is requested to be generated for any change in user event. - * @member duration Period (in seconds) of time notifications are provided for - * @member resourceURL Self referring URL - */ - type record ZonalTrafficSubscription { - ClientCorrelator clientCorrelator optional, - CallbackReference callbackReference, - ZoneId zoneId, - InterestRealm interestRealm optional, - UserEventCriteria userEventCriteria optional, - Duration duration optional, - ResourceURL resourceURL optional - } - /** * @desc Identifier of zone */ type Json.String ZoneId; - /** - * @desc A type containing zone status notification. - * @member callbackData CallBackData if passed by the application during the associated ZoneStatusSubscription operation - * @member zoneId Identifier of zone - * @member accessPointId Identifier of an access point - * @member numberOfUsersInZone This element shall be present when ZoneStatusSubscription includes numberOfUsersZoneThreshold element and the number of users in a zone exceeds the threshold defined in this subscription - * @member numberOfUsersInAP This element shall be present when ZoneStatusSubscription includes numberOfUsersAPThreshold element and the number of users in an access point exceeds the threshold defined in the subscription - * @member operationStatus - * @member timestamp_ - * @member link Link to other resources that are in relationship with this notification - */ - type record ZoneStatusNotification { - CallbackData callbackData optional, - ZoneId zoneId, - AccessPointId accessPointId optional, - NumberOfUsersInZone numberOfUsersInZone optional, - NumberOfUsersInAP numberOfUsersInAP optional, - OperationStatus operationStatus optional, - TimeStamp timestamp_, - Link link optional - } with { - variant (timestamp_) "name as 'timestamp'"; - } - /** * @desc A type containing zone status subscription. * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server @@ -526,7 +698,7 @@ REST_NetAPI_Common]. NumberOfUsersZoneThreshold numberOfUsersZoneThreshold optional, NumberOfUsersAPThreshold numberOfUsersAPThreshold optional, OperationStatus operationStatus optional - } + } // End of type ZoneStatusSubscription /** * @desc A type containing data for notifications, when the area is defined as a circle @@ -555,16 +727,16 @@ REST_NetAPI_Common]. UInt32 duration optional, EnteringLeavingCriteria enteringLeavingCriteria, UInt32 frequency, - Json.Number latitude, + Latitude latitude, Link link optional, - Json.Number longitude, + Longitude longitude, Json.Number radius, Json.AnyURI requester optional, ResourceURL resourceURL optional, Json.Number trackingAccuracy } with { variant (address_) "name as 'address'"; - } + } // End of type CircleNotificationSubscription type enumerated EnteringLeavingCriteria { Entering, @@ -576,6 +748,7 @@ REST_NetAPI_Common]. * @member distance Distance from terminal to a location or between two terminals specified in meters * @member accuracy Accuracy of the provided distance in meters * @member timestamp Date and time that location from which distance is calculated was collected + * @see OMA-TS-REST_NetAPI_TerminalLocation-V1_0_1-20151029-A Clause 5.2.2.5 Type: TerminalDistance */ type record TerminalDistance { Json.Number distance, @@ -587,6 +760,11 @@ REST_NetAPI_Common]. /** * @desc Distance criterium + * @member AllWithinDistance All monitored devices are within the specified distance + * @member AnyWithinDistance Any of monitored devices gets within the specified distance + * @member AllBeyondDistance All monitored devices are beyond the specified distance + * @member AnyBeyondDistance Any of monitored devices gets beyond the specified distance + * @see OMA-TS-REST_NetAPI_TerminalLocation-V1_0_1-20151029-A Clause 5.2.3.2 Enumeration: DistanceCriteria */ type enumerated DistanceCriteria { AllWithinDistance, @@ -596,147 +774,454 @@ REST_NetAPI_Common]. } /** - * @desc A type containing data for distance subscription, with reference to other devices - * @member callbackReference - * @member checkImmediate Check location immediately after establishing notification + * @desc A type containing device address, retrieval status and location information + * @member address_ Address of the terminal to which the location information applies (e.g., 'sip' URI, 'tel' URI, 'acr' URI) + * @member locationRetrievalStatus Status of retrieval for this terminal address + * @member currentLocation Location of terminal + * @member errorInformation Used to indicate a notification termination or cancellation + * @see OMA-TS-REST_NetAPI_TerminalLocation-V1_0_1-20151029-A Clause 5.2.2.1 Type: TerminalLocation + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1A Terminal location data types + */ + type record TerminalLocation { + Address address_, + RetrievalStatus locationRetrievalStatus, + LocationInfo currentLocation optional, + ServiceError errorInformation optional + } with { + variant (address_) "name as 'address'"; + } // End of type TerminalLocation + type record of TerminalLocation TerminalLocationList + + /** + * @desc This type contains a list of subscriptions + * @member href The URI referring to the subscription + * @member subscriptionType Type of the subscription + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.3 Type: NotificationSubscriptionList + */ + type record Subscription { + Json.AnyURI href optional, + Json.String subscriptionType + } + + /** + * @desc This type contains a list of subscriptions + * @member subscription Subscription element + * @member resourceURL Self-referring URL + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.3 Type: NotificationSubscriptionList + */ + type record NotificationSubscriptionList { + Subscription subscription optional, + ResourceURL resourceURL + } + + /** + * @desc This type represents a subscription to the notifications from location server about events related with user location + * @member subscriptionType Shall be set to "UserLocationEventSubscription" * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server - * @member count Maximum number of notifications per individual address. For no maximum, either do not include this element or specify a value of zero. Default value is 0 - * @member criteria - * @member distance Distance between devices that shall be monitored - * @member duration Period of time (in seconds) notifications are provided for. If set to “0” (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications - * @member frequency Maximum frequency (in seconds) of notifications per subscription (can also be considered minimum time between notifications) - * @member link Link to other resources that are in relationship with the resource - * @member monitoredAddress Contains addresses of devices to monitor (e.g., 'sip' URI, 'tel' URI, 'acr' URI) - * @member referenceAddress Indicates address of each device that will be used as reference devices from which the distances towards monitored devices indicated in the Addresses will be monitored (e.g., 'sip' URI, 'tel' URI, 'acr' URI) - * @member requester Identifies the entity that is requesting the information (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) - * @member resourceURL Self referring URL - * @member trackingAccuracy Number of meters of acceptable error in tracking distance + * @member callbackReference URI exposed by the client on which to receive notifications via HTTP + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member _links Hyperlink related to the resource + * @member address Address of user (e.g. 'sip' URI, 'tel' URI, 'acr' URI) to monitor + * @member userEventPara Requirements for user event reporting. + * @member locationEventCriteria List of user event values to generate notifications for (these apply to address specified). + * @member expiryDeadline The expiration time of the subscription determined by the UE Location Subscribe Service + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.4 Type: UserLocationEventSubscription */ - type record DistanceNotificationSubscription { - CallbackReference callbackReference, - Json.Bool checkImmediate, - ClientCorrelator clientCorrelator optional, - UInt32 count optional, - DistanceCriteria criteria, - Json.Number distance, - UInt32 duration optional, - UInt32 frequency, - Link link optional, - Addresses monitoredAddress, - Addresses referenceAddress optional, - Json.AnyURI requester optional, - ResourceURL resourceURL optional, - Json.Number trackingAccuracy - } + type record UserLocationEventSubscription { + Json.String subscriptionType, + Json.String clientCorrelator optional, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links_ optional, + Address address_, + UserEventPara userEventPara optional, + LocationEventCriteria locationEventCriteria optional, + TimeStamp expiryDeadline optional + } with { + variant (links_) "name as '_links'"; + variant (address_) "name as 'address'"; + } // End of type UserLocationEventSubscription /** - * @desc A type containing data for periodic subscription - * @member address_ Address of terminals to monitor (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) - * @member callbackReference + * @desc This type represents a subscription to the notifications from location server about events triggered by timer expiration + * @member subscriptionType Shall be set to "UserLocationEventSubscription" * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server - * @member duration Period of time (in seconds) notifications are provided for. If set to “0” (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications - * @member frequency Maximum frequency (in seconds) of notifications per subscription (can also be considered minimum time between notifications) - * @member link Link to other resources that are in relationship with the resource - * @member monitoredAddress Contains addresses of devices to monitor (e.g., 'sip' URI, 'tel' URI, 'acr' URI) - * @member requestedAccuracy Accuracy of the provided distance in meters - * @member requester Identifies the entity that is requesting the information (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) - * @member resourceURL Self referring URL + * @member callbackReference URI exposed by the client on which to receive notifications via HTTP + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member _links Hyperlink related to the resource + * @member address_ Address of user (e.g. 'sip' URI, 'tel' URI, 'acr' URI) to monitor + * @member periodicEventInfo Information for periodic event reporting + * @member expiryDeadline The expiration time of the subscription determined by the UE Location Subscribe Service + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.5 Type: UserLocationPeriodicSubscription */ - type record PeriodicNotificationSubscription { - Addresses address_, - CallbackReference callbackReference, - ClientCorrelator clientCorrelator optional, - UInt32 duration optional, - UInt32 frequency, - Link link optional, - UInt32 requestedAccuracy, - Json.AnyURI requester optional, - ResourceURL resourceURL optional + type record UserLocationPeriodicSubscription{ + Json.String subscriptionType, + Json.String clientCorrelator optional, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links_ optional, + Address address_, + PeriodicEventInfo periodicEventInfo, + TimeStamp expiryDeadline optional } with { + variant (links_) "name as '_links'"; variant (address_) "name as 'address'"; + } // End of type UserLocationPeriodicSubscription + + /** + * @desc Information for periodic event reporting + * @member reportingAmount Number of event reports + * @member reportingInterval Interval of event reports + * @see ETSI TS 129 572 V16.7.0 Clause 6.1.6.2.24 Type: PeriodicEventInfo + */ + type record PeriodicEventInfo { + ReportingAmount reportingAmount, + ReportingInterval reportingInterval + } // End of type PeriodicEventInfo + + /** + * @desc Number of required periodic event reports. + * Minimum: 1. Maximum: 8639999. + * @see ETSI TS 129 572 V16.7.0 Clause 6.1.6.3.2 Simple data types + */ + type integer ReportingAmount; + + /** + * @desc Event reporting periodic interval in seconds. + * Minimum: 1. Maximum: 8639999. + * @remark ReportingInterval * ReportingAmount shall not exceed 8639999 + * @see ETSI TS 129 572 V16.7.0 Clause 6.1.6.3.2 Simple data types + */ + type integer ReportingInterval; + + /** + * @desc This type represents a subscription to the notifications from location server about user location events happened in the zone + * @desc This type represents a subscription to the notifications from location server about events related with user location + * @member subscriptionType Shall be set to "UserLocationEventSubscription" + * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server + * @member callbackReference URI exposed by the client on which to receive notifications via HTTP + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member _links Hyperlink related to the resource + * @member zoneId Identifier of zone (e.g. zone001) to monitor + * @member reportingCtrl Provides parameters that ctrl the reporting + * @member expiryDeadline The expiration time of the subscription determined by the UE Location Subscribe Service + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.6 Type: ZoneLocationEventSubscription + */ + type record ZoneLocationEventSubscription { + Json.String subscriptionType, + Json.String clientCorrelator optional, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links_ optional, + ZoneId zoneId, + LocationEventCriteria locationEventCriteria optional, + ReportingCtrl reportingCtrl optional, + TimeStamp expiryDeadline optional + } with { + variant (links_) "name as '_links'"; + } // End of type ZoneLocationEventSubscription + + /** + * @desc This type represents a subscription to the notifications from location server about the number of users reaching the threshold or the status of access points changing + * @member subscriptionType Shall be set to "UserLocationEventSubscription" + * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server + * @member callbackReference URI exposed by the client on which to receive notifications via HTTP + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member _links Hyperlink related to the resource + * @member zoneId Identifier of zone (e.g. zone001) to monitor + * @member upperNumberOfUsersZoneThreshold Threshold number of users in a zone which if crossed upward shall cause a notification + * @member lowerNumberOfUsersZoneThreshold Threshold number of users in a zone which if crossed downward shall cause a notification + * @member upperNumberOfUsersAPThreshold Threshold number of users in an access point which if crossed upward shall cause a notification + * @member lowerNumberOfUsersAPThresholdThreshold number of users in an access point which ifcrossed downward shall cause a notification + * @member operationStatus List of operation status values to generate notifications for (these apply to all access points within a zone) + * @member reportingCtrl Provides parameters that ctrl the reporting + * @member expiryDeadline The expiration time of the subscription determined by the UE Location Subscribe Service + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.7 Type: ZoneStatusSubscription + */ + type record ZoneStatusSubscription { + Json.String subscriptionType, + Json.String clientCorrelator optional, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links_ optional, + ZoneId zoneId, + Json.UInteger upperNumberOfUsersZoneThreshold optional, + Json.UInteger lowerNumberOfUsersZoneThreshold optional, + Json.UInteger upperNumberOfUsersAPThreshold optional, + Json.UInteger lowerNumberOfUsersAPThreshold optional, + OperationStatus operationStatus optional, + ReportingCtrl reportingCtrl optional, + TimeStamp expiryDeadline optional + } with { + variant (links_) "name as '_links'"; + } // End of type ZoneStatusSubscription + + /** + * @desc This type represents a subscription to the notifications from location server about user location events happened in the area. + * @member subscriptionType Shall be set to "UserLocationEventSubscription" + * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server + * @member callbackReference URI exposed by the client on which to receive notifications via HTTP + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member _links Hyperlink related to the resource + * @member areaDefine The parameters describing the area to subscribe + * @member trackingAccuracy Number of meters of acceptable error + * @member reportingCtrl Provides parameters that ctrl the reporting + * @member locationEventCriteria List of user event values to generate notifications for (these apply to address specified) + * @member reportingLocationReq This IE shall be set to true if a location estimate is required for each event report + * @member expiryDeadline The expiration time of the subscription determined by the UE Location Subscribe Service + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.8 Type: UserAreaSubscription + */ + type record UserAreaSubscription { + Json.String subscriptionType, + Json.String clientCorrelator optional, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links_ optional, + AreaDefine areaDefine, + Json.Number trackingAccuracy, + LocationEventCriteria locationEventCriteria optional, + ReportingCtrl reportingCtrl optional, + Json.Bool reportingLocationReq optional, + TimeStamp expiryDeadline optional + } with { + variant (links_) "name as '_links'"; + } // End of type UserAreaSubscription + + /** + * @desc This type represents a subscription to the notifications from location server about changes in the geographical relationships between monitored users or between monitored users and reference users + * @member subscriptionType Shall be set to "UserLocationEventSubscription" + * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server + * @member callbackReference URI exposed by the client on which to receive notifications via HTTP + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member _links Hyperlink related to the resource + * @member referenceAddress If specified, indicates address of each user that will be used as reference users from which the distances towards monitored users indicated in the Addresses will be monitored + * @member monitoredAddress Contains addresses of users to monitor (e.g. 'sip' URI, 'tel' URI, 'acr' URI). Reference to a group could be provided here if supported by implementation + * @member distance Distance between users that shall be monitored. The unit is meter + * @member trackingAccuracy Number of meters of acceptable error in tracking distance + * @member criteria Indicates whether the notification should occur when the geographical relationship between monitored and referenced users' changes + * @member checkImmediate Check location immediately after establishing notification + * @member reportingCtrl Provides parameters that ctrl the reporting + * @member locationEventCriteria List of user event values to generate notifications for (these apply to address specified) + * @member expiryDeadline The expiration time of the subscription determined by the UE Location Subscribe Service + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.9 Type: UserDistanceSubscription + */ + type record UserDistanceSubscription { + Json.String subscriptionType, + Json.String clientCorrelator optional, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links_ optional, + Json.AnyURI referenceAddress optional, + Json.AnyURIArray monitoredAddress, + Json.Number distance, + Json.Number trackingAccuracy, + DistanceCriteria criteria, + Json.Bool checkImmediate, + Json.Number trackingAccuracy, + LocationEventCriteria locationEventCriteria optional, + ReportingCtrl reportingCtrl optional, + TimeStamp expiryDeadline optional + } with { + variant (links_) "name as '_links'"; + } // End of type UserDistanceSubscription + + /** + * @desc This type represents a test notification from a location server to determine if the Websocket method is to be utilized for the location server to issue notifications for a subscription, as defined in clause 6.12a of ETSI GS MEC 009 [4] + * @member notificationType Shall be set to "TestNotification" + * @member _links Hyperlink related to the resource + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.3 Type: TestNotification + */ + type record TestNotification { + Json.String notificationType, + LinksSubscription links_ + } with { + variant (links_) "name as '_links'"; } - type record of Json.String Variables; /** - * @desc Used to indicate a notification termination or cancellation - * @member messageId Message identifier, either with prefix SVC or with prefix POL - * @member text Message text, with replacement variables marked with %n, where n is an index into the list of elements, starting at 1 - * @member variables Variables to substitute into text string + * @desc Hyperlink related to the resource + * @member Identifying the subscription for the test notification + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.3 Type: TestNotification + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.4 Type: UserLoctiationEventNotification */ - type record ServiceError { - Json.String messageId, - Json.String text, - Variables variables optional + type record LinksSubscription { + Link subscription } /** - * @desc A type containing device address, retrieval status and location information - * @member address_ Address of the terminal to which the location information applies (e.g., 'sip' URI, 'tel' URI, 'acr' URI) - * @member currentLocation - * @member errorInformation Used to indicate a notification termination or cancellation - * @member locationRetrievalStatus + * @desc This type represents a notification from location server with regards to UE location event. + * @member notificationType Shall be set to "UserLocationEventNotification" + * @member timeStamp TimeStamp + * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) + * @member userLocationEvent The specific event triggering this notification + * @member locationInfo The geographical coordinates where the user is + * @member civicInfo Contextual information of a user location + * @member relativeLocationInfo The relative location in a reference system + * @member zoneId The identity of the zone + * @member accessPointId The identity of the access point + * @member _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.4 Type: UserLoctiationEventNotification */ - type record TerminalLocation { + type record UserLoctiationEventNotification { + Json.String notificationType, + TimeStamp timeStamp optional, Address address_, - LocationInfo currentLocation optional, - ServiceError errorInformation optional, - RetrievalStatus locationRetrievalStatus + LocationEventType userLocationEvent, + LocationInfo locationInfo optional, + CivicAddress civicInfo optional, + RelativeLocationInfo relativeLocationInfo optional, + ZoneId zoneId optional, + AccessPointId accessPointId optional, + Links links_ } with { + variant (links_) "name as '_links'"; variant (address_) "name as 'address'"; - } - type record of TerminalLocation TerminalLocationList + } // End of type UserLoctiationEventNotification /** - * @desc A type containing the notification subscription - * @member callbackData CallbackData if passed by the application in the receiptRequest element during the associated subscription operation - * @member link Link to other resources that are in relationship with the resource - * @member isFinalNotification Set to true if it is a final notification about location change - * @member terminalLocation Collection of the terminal locations + * @desc This type represents a notification from location server with regards to UE location periodic reporting. + * @member notificationType Shall be set to "UserLocationPeriodicNotification" + * @member timeStamp TimeStamp + * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) + * @member userLocationEvent The specific event triggering this notification + * @member locationInfo The geographical coordinates where the user is + * @member civicInfo Contextual information of a user location + * @member relativeLocationInfo The relative location in a reference system + * @member zoneId The identity of the zone + * @member accessPointId The identity of the access point + * @member isFinalNotification Shall be set to true if it is a final notification + * @member _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.5 Type: UserLocationPeriodicNotification */ - type record SubscriptionNotification { - CallbackData callbackData optional, - DistanceCriteria distanceCriteria optional, + type record UserLocationPeriodicNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Address address_, + LocationEventType userLocationEvent, + LocationInfo locationInfo optional, + CivicAddress civicInfo optional, + RelativeLocationInfo relativeLocationInfo optional, + ZoneId zoneId optional, + AccessPointId accessPointId optional, Json.Bool isFinalNotification optional, - Link link optional, - TerminalLocationList terminalLocation - } + Links links_ + } with { + variant (links_) "name as '_links'"; + variant (address_) "name as 'address'"; + } // End of type UserLocationPeriodicNotification /** - * @desc A type containing the subscription cancellation notification - * @member address_ Address of terminal if the error applies to an individual terminal - * @member callbackData CallbackData if passed by the application in the receiptRequest element during the associated subscription operation - * @member link Link to other resources that are in relationship with the resource - * @member reason Used to indicate a notification termination or cancellation + * @desc This type represents a notification from location server with regards to UE location periodic reporting. + * @member notificationType Shall be set to "ZoneLocationEventNotification" + * @member timeStamp TimeStamp + * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) + * @member userLocationEvent The specific event triggering this notification + * @member zoneId The identity of the zone + * @member _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.6 Type: ZoneLocationEventNotification */ - type record SubscriptionCancellationNotification { + type record ZoneLocationEventNotification { + Json.String notificationType, + TimeStamp timeStamp optional, Address address_, - CallbackData callbackData optional, - Link link optional, - ServiceError reason + LocationEventType userLocationEvent, + ZoneId zoneId optional, + Links links_ } with { + variant (links_) "name as '_links'"; variant (address_) "name as 'address'"; + } // End of type ZoneLocationEventNotification + + /** + * @desc This type represents a notification from location server with regards to status changing event or user number threshold event happened in a zone + * @member notificationType Shall be set to "ZoneStatusNotification" + * @member timeStamp TimeStamp + * @member userNumEvent + * @member operationStatus The specific event triggering this notification + * @member zoneId The identity of the zone + * @member accessPointId The identity of the access point + * @member _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.7 Type: ZoneStatusNotification + */ + type record ZoneStatusNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + UserNumEvent userNumEvent optional, + OperationStatus operationStatus optional, + ZoneId zoneId optional, + AccessPointId accessPointId optional, + Links links_ + } with { + variant (links_) "name as '_links'"; + variant (address_) "name as 'address'"; + } // End of type ZoneStatusNotification + + type enumerated UserNumEvent { + OVER_ZONE_UPPER_THD, + UNDER_ZONE_LOWER_THD, + OVER_AP_UPPER_THD, + UNDER_AP_LOWER_THD + } with { + variant "JSON: as number" } /** - * @desc This type contains a list of subscriptions - * @member zonalTrafficSubscription Collection of ZonalTrafficSubscription elements - * @member userTrackingSubscription Collection of UserTrackingSubscription elements - * @member periodicTrackingSubscription Collection of PeriodicNotificationSubscription elements - * @member zoneStatusSubscription Collection of ZoneStatusSubscription elements - * @member circleNotificationSubscription Collection of CircleNotificationSubscription elements - * @member distanceNotificationSubscription Collection of DistanceNotificationSubscription elements - * @member resourceURL Self-referring URL - * @ see ETSI GS MEC 013 V2.1.1 (2019-09) Clause 6.3.3 Type: NotificationSubscriptionList + * @desc This type represents a notification from location server with regards to UE location events happened in an area. + * @member notificationType Shall be set to "UserAreaNotification" + * @member timeStamp TimeStamp + * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) + * @member locationInfo The geographical coordinates where the user is + * @member civicInfo Contextual information of a user location + * @member relativeLocationInfo The relative location in a reference system + * @member userLocationEvent The specific event triggering this notification + * @member _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.8 Type: UserAreaNotification */ - type record NotificationSubscriptionList { - ZonalTrafficSubscription zonalTrafficSubscription optional, - UserTrackingSubscription userTrackingSubscription optional, - PeriodicTrackingSubscription periodicTrackingSubscription optional, - ZoneStatusSubscription zoneStatusSubscription optional, - CircleNotificationSubscription circleNotificationSubscription optional, - DistanceNotificationSubscription distanceNotificationSubscription optional, - ResourceURL resourceURL - } + type record UserAreaNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Address address_, + LocationInfo locationInfo optional, + CivicAddress civicInfo optional, + RelativeLocationInfo relativeLocationInfo optional, + LocationEventType userLocationEvent, + Links links_ + } with { + variant (links_) "name as '_links'"; + variant (address_) "name as 'address'"; + } // End of type UserAreaNotification + + /** + * @desc This type represents a notification from location server with regards to UE location events happened in an area. + * @member notificationType Shall be set to "UserDistanceNotification" + * @member timeStamp TimeStamp + * @member monitoredUsers Indicates the location information related to monitored users + * @member distanceEvent Indicates the distance event triggering the notification + * @member _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.9 Type: UserDistanceNotification + */ + type record UserAreaNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + UserList monitoredUsers, + DistanceCriteria distanceEvent, + Links links_ + } with { + variant (links_) "name as '_links'"; + } // End of type UserDistanceNotification + } with { encode "JSON" } // End of module LocationAPI_TypesAndValues diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn index c9a0eb4..36ab7e9 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn @@ -130,7 +130,7 @@ module TrafficManagementAPI_Functions { { m_session_filter( "10.10.10.10", - {"1010"} + 1010 ) } // FlowFilter )))))); diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn index d4dbaf5..1010b10 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn @@ -76,7 +76,7 @@ module TrafficManagementAPI_Templates { allocationDirection := p_allocationDirection } // End of template mw_bw_info_deltas - template (omit) SessionFilterItems m_session_filter( + template (omit) SessionFilterItem m_session_filter( in template (value) SourceIp p_sourceIp, in template (value) SourcePort p_sourcePort, in template (omit) DstAddress p_dstAddress := omit, @@ -90,7 +90,7 @@ module TrafficManagementAPI_Templates { protocol := p_protocol } // End of template m_session_filter - template SessionFilterItems mw_session_filter( + template SessionFilterItem mw_session_filter( template (present) SourceIp p_sourceIp := ?, template (present) SourcePort p_sourcePort := ?, template DstAddress p_dstAddress := *, @@ -160,6 +160,34 @@ module TrafficManagementAPI_Templates { trafficDirection := p_trafficDirection } // End of template mw_mts_session_info + template (omit) FlowFilterItem m_flow_filter( + in template (value) SourceIp p_sourceIp, + in template (value) SourcePort p_sourcePort, + in template (omit) DstAddress p_dstAddress := omit, + in template (omit) DstPort p_dstPort := omit, + in template (omit) Protocol p_protocol := omit + ) := { + sourceIp := p_sourceIp, + sourcePort := p_sourcePort, + dstAddress := p_dstAddress, + dstPort := p_dstPort, + protocol := p_protocol + } // End of template m_flow_filter + + template FlowFilterItem mw_flow_filter( + template (present) SourceIp p_sourceIp := ?, + template (present) SourcePort p_sourcePort := ?, + template DstAddress p_dstAddress := *, + template DstPort p_dstPort := *, + template Protocol p_protocol := * + ) := { + sourceIp := p_sourceIp, + sourcePort := p_sourcePort, + dstAddress := p_dstAddress, + dstPort := p_dstPort, + protocol := p_protocol + } // End of template mw_flow_filter + template (value) QosD m_qosd( in UInt32 p_minTpt := 128, in UInt32 p_maxLatency := 128, diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn index ad32259..1e83b9d 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn @@ -8,6 +8,7 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Information of bandwidth resource + * @member allocationId Bandwidth allocation instance identifier * @member timeStamp Time stamp to indicate when the corresponding information elements are sent * @member appInsId Application instance identifier * @member sessionFilter Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a single session only @@ -15,8 +16,10 @@ module TrafficManagementAPI_TypesAndValues { * @member fixedBWPriority Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document * @member fixedAllocation Size of requested fixed BW allocation in [bps] * @member allocationDirection The direction of the requested BW allocation + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ type record BwInfo { + AllocationId allocationId optional, TimeStamp timeStamp optional, AppInsId appInsId, BwRequestType requestType, @@ -29,14 +32,17 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Conform to JSON merge patch format and processing rules specified IETF RFC 7396 [8], this type represents the attributes whose value are allowed to be updated with HTTP PATCH method in content format JSON + * @member allocationId Bandwidth allocation instance identifier * @member appInsId Application instance identifier * @member requestType Numeric value (0 - 255) corresponding to specific type of consumer * @member sessionFilter Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION * @member fixedBWPriority Indicates the allocation priority when dealing with several applications or sessions in parallel * @member fixedAllocation Size of requested fixed BW allocation in [bps] * @member allocationDirection The direction of the requested BW allocation + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.3 Type: BwInfoDeltas */ type record BwInfoDeltas { + Json.String allocationId, AppInsId appInsId, BwRequestType requestType, SessionFilter sessionFilter optional, @@ -49,19 +55,28 @@ module TrafficManagementAPI_TypesAndValues { * @desc Time stamp description * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ type record TimeStamp { Seconds seconds, NanoSeconds nanoSeconds } + /** + * @desc Bandwidth allocation instance identifier + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + */ + type Json.String AllocationId; + /** * @desc Application instance identifier + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ type Json.String AppInsId; /** * @desc Numeric value (0 - 255) corresponding to specific type of consumer + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ type enumerated BwRequestType { APPLICATION_SPECIFIC_BW_ALLOCATION (0), @@ -70,6 +85,10 @@ module TrafficManagementAPI_TypesAndValues { variant "JSON: as number" } + /** + * @desc Numeric value (0 - 255) corresponding to specific type of consumer + * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo + */ type enumerated MtsRequestType { APPLICATION_SPECIFIC_MTS_ALLOCATION (0), SESSION_SPECIFIC_MTS_ALLOCATION (1) @@ -79,8 +98,9 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a single session only. In case multiple sessions match sessionFilter the request shall be rejected + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ - type record of SessionFilterItems SessionFilter; + type record of SessionFilterItem SessionFilter; /** * @desc Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a single session only. In case multiple sessions match sessionFilter the request shall be rejected * @member sourceIp Source address identity of session (including range) @@ -88,8 +108,9 @@ module TrafficManagementAPI_TypesAndValues { * @member dstAddress Destination address identity of session (including range) * @member dstPort Destination port identity of session * @member protocol Protocol number + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ - type record SessionFilterItems { + type record SessionFilterItem { SourceIp sourceIp optional, SourcePort sourcePort optional, DstAddress dstAddress optional, @@ -98,7 +119,8 @@ module TrafficManagementAPI_TypesAndValues { } /** - * @desc Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document + * @desc Indicates the allocation priority when dealing with several applications or sessions in parallel. + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ type enumerated FixedBWPriority { reserved @@ -106,22 +128,26 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Size of requested fixed BW allocation in [bps] + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ type Json.String FixedAllocation; /** * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ type UInt32 Seconds; /** * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ type UInt32 NanoSeconds; /** * @desc The direction of the requested BW allocation + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ type enumerated AllocationDirection { Downlink, @@ -131,26 +157,31 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Source address identity of session (including range) + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ type Json.String SourceIp; /** * @desc Source port identity of session + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ - type record of Json.String SourcePort; + type Json.UInteger SourcePort; /** * @desc Destination address identity of session (including range) + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ type Json.String DstAddress; /** * @desc Destination port identity of session + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ - type record of Json.String DstPort; + type Json.UInteger DstPort; /** * @desc Protocol number + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ type Json.String Protocol; @@ -159,6 +190,7 @@ module TrafficManagementAPI_TypesAndValues { * @member timeStamp Time stamp to indicate when the corresponding information elements are sent * @member mtsAccessInfo The information on access network connection as defined below * @member mtsMode Numeric value corresponding to a specific MTS operation supported by the TMS + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo */ type record MtsCapabilityInfo { TimeStamp timeStamp optional, @@ -166,6 +198,10 @@ module TrafficManagementAPI_TypesAndValues { MtsModes mtsMode } + /** + * @desc The information on access network connection as defined below + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo + */ type enumerated MtsMode { LowCost (0), LowLatency (1), @@ -182,6 +218,7 @@ module TrafficManagementAPI_TypesAndValues { * @member accessId Unique identifier for the access network connection * @member accessType Numeric value (0-255) corresponding to specific type of access network * @member metered Numeric value (0-255) + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo */ type record MtsAccessInfo { AccessId accessId, @@ -190,7 +227,16 @@ module TrafficManagementAPI_TypesAndValues { } type record of MtsAccessInfo MtsAccessInfos; + /** + * @desc Unique identifier for the access network connection + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo + */ type UInt32 AccessId; + + /** + * @desc Numeric value (0-255) corresponding to specific type of access network + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo + */ type enumerated AccessType { Unknown (0), IEEE802_11_Based (1), @@ -207,6 +253,11 @@ module TrafficManagementAPI_TypesAndValues { } with { variant "JSON: as number" } + + /** + * @desc Numeric value (0-255) + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo + */ type enumerated Metered { CxNotMetered (0), CxMetered (1), @@ -217,36 +268,84 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc The information on access network connection as defined below + * @member sessionId MTS session instance identifier * @member timeStamp Time stamp to indicate when the corresponding information elements are sent * @member appInsId Application instance identifier + * @member appName Name of the application * @member requestType Numeric value (0 - 255) corresponding to specific type of consumer * @member flowFilter Traffic flow filtering criteria, applicable only * @member qosD QoS requirement description of the MTS session * @member mtsMode Numeric value corresponding to a specific MTS operation * @member trafficDirection The direction of the requested MTS session supported by the TMS + * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo */ type record MtsSessionInfo { + SessionId sessionId optional, TimeStamp timeStamp optional, AppInsId appInsId, + AppName appName optional, MtsRequestType requestType, - FlowFilter flowFilter optional, + FlowFilter flowFilter, QosD qosD, MtsMode mtsMode, TrafficDirection trafficDirection } type record of MtsSessionInfo MtsSessionInfos - type SessionFilter FlowFilter; + /** + * @desc MTS session instance identifier + * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo + */ + type Json.String SessionId; + /** + * @desc Traffic flow filtering criteria, applicable only if when requestType is set as FLOW_SPECIFIC_MTS_SESSION + * @member sourceIp Source address identity of session (including range) + * @member sourcePort Source port identity of session + * @member dstAddress Destination address identity of session (including range) + * @member dstPort Destination port identity of session + * @member protocol Protocol number + * @member dscp DSCP in the IPv4 header or Traffic Class in the IPv6 header + * @member flowlabel Flow Label in the IPv6 header, applicable only if the flow is IPv6 + * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo + */ + type record FlowFilterItem { + SourceIp sourceIp optional, + SourcePort sourcePort optional, + DstAddress dstIp optional, + DstPort dstPort optional, + Protocol protocol optional, + Dscp dscp optional, + Flowlabel flowlabel optional + } + type record of FlowFilterItem FlowFilter; + + /** + * @desc The direction of the requested MTS session supported by the TMS + * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo + */ type AllocationDirection TrafficDirection; /** - * @desc + * @desc DSCP in the IPv4 header or Traffic Class in the IPv6 header + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.5 Type: MtsSessionInfo + */ + type Json.UInteger Dscp; + + /** + * @desc Flow Label in the IPv6 header, applicable only if the flow is IPv6 + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.5 Type: MtsSessionInfo + */ + type Json.UInteger Flowlabel; + + /** + * @desc QoS requirement description of the MTS session, applicable only if mtsMode = 4 (QoS) * @member minTpt Minimal throughput in [kbps] * @member maxLatency Tolerable (one-way) delay in [10 nanoseconds] * @member maxLoss Tolerable packet loss rate in [1/10^x] * @member maxJitter Tolerable jitter in [10 nanoseconds] * @member priority numeric value (0 - 255) corresponding to the traffic priority + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.5 Type: MtsSessionInfo */ type record QosD { UInt32 minTpt optional, diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index 0ebeb92..f4b79b4 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -1,18 +1,18 @@ module LibMec_Pixits { - modulepar charstring PX_ME_APP_Q_ZONE_ID_URI := "/location/v2/queries/zones"; + modulepar charstring PX_ME_APP_Q_ZONE_ID_URI := "/location/v3/queries/zones"; - modulepar charstring PX_ME_APP_Q_USERS_LIST_URI := "/location/v2/queries/users"; + modulepar charstring PX_ME_APP_Q_USERS_LIST_URI := "/location/v3/queries/users"; - modulepar charstring PX_ME_APP_Q_DIST_URI := "/location/v2/subscriptions/distance"; + modulepar charstring PX_ME_APP_Q_DIST_URI := "/location/v3/subscriptions/distance"; - modulepar charstring PX_ME_APP_Q_USERS_LOC_SUB_URI := "/location/v2/subscriptions/userTracking"; + modulepar charstring PX_ME_APP_Q_USERS_LOC_SUB_URI := "/location/v3/subscriptions/userTracking"; - modulepar charstring PX_ME_APP_Q_USERS_TRACK_SUB_URI := "/location/v2/subscriptions/periodic"; + modulepar charstring PX_ME_APP_Q_USERS_TRACK_SUB_URI := "/location/v3/subscriptions/periodic"; - modulepar charstring PX_ME_APP_Q_USERS_INF_SUB_URI := "/location/v2/subscriptions/zonalTraffic"; + modulepar charstring PX_ME_APP_Q_USERS_INF_SUB_URI := "/location/v3/subscriptions/zonalTraffic"; - modulepar charstring PX_ME_APP_Q_AREA_SUB_URI := "/location/v2/subscriptions/area/circle"; + modulepar charstring PX_ME_APP_Q_AREA_SUB_URI := "/location/v3/subscriptions/area/circle"; modulepar charstring PX_ME_APP_Q_UE_IDENTITY_ID_URI := "/ui/v1/"; diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn index 5f713e6..b63663e 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -429,18 +429,6 @@ group ams_api { periodicTrackingSubscription := p_periodic_tracking_subscription } // End of template mw_body_json_periodic_rtracking_subscription - template (value) JsonBody m_body_json_zonal_traffic_subscription( - in template (value) ZonalTrafficSubscription p_zonal_traffic_subscription - ) := { - zonalTrafficSubscription := p_zonal_traffic_subscription - } // End of template m_body_json_zonal_traffic_subscription - - template (present) JsonBody mw_body_json_zonal_traffic_subscription( - template (present) ZonalTrafficSubscription p_zonal_traffic_subscription := ? - ) := { - zonalTrafficSubscription := p_zonal_traffic_subscription - } // End of template mw_body_json_zonal_traffic_subscription - template (value) JsonBody m_body_json_circle_notification_subscription( in template (value) CircleNotificationSubscription p_circle_notification_subscription ) := { @@ -465,30 +453,6 @@ group ams_api { terminalDistance := p_terminal_distance } // End of template mw_body_json_terminal_distance - template (value) JsonBody m_body_json_distance_notification_subscription( - in template (value) DistanceNotificationSubscription p_distance_notification_subscription - ) := { - distanceNotificationSubscription := p_distance_notification_subscription - } // End of template m_body_json_distance_notification_subscription - - template (present) JsonBody mw_body_json_distance_notification_subscription( - template (present) DistanceNotificationSubscription p_distance_notification_subscription := ? - ) := { - distanceNotificationSubscription := p_distance_notification_subscription - } // End of template mw_body_json_distance_notification_subscription - - template (value) JsonBody m_body_json_periodic_notification_subscription( - in template (value) PeriodicNotificationSubscription p_periodic_notification_subscription - ) := { - periodicNotificationSubscription := p_periodic_notification_subscription - } // End of template m_body_json_periodic_notification_subscription - - template (present) JsonBody mw_body_json_periodic_notification_subscription( - template (present) PeriodicNotificationSubscription p_periodic_notification_subscription := ? - ) := { - periodicNotificationSubscription := p_periodic_notification_subscription - } // End of template mw_body_json_periodic_notification_subscription - } // End of group location_api group ue_identity_api { -- GitLab From 7d22b028c45983ec37eb44a37179f57eeb55d06d Mon Sep 17 00:00:00 2001 From: YannGarcia Date: Wed, 17 May 2023 10:19:33 +0200 Subject: [PATCH 06/58] Review typing for MEC 012 --- titan-test-system-framework | 2 +- ...ndOperationGrantingAPI_TypesAndValues.ttcn | 41 +- ...plicationEnablementAPI_TypesAndValues.ttcn | 33 +- .../ttcn/LocationAPI_Templates.ttcn | 60 - .../ttcn/LocationAPI_TypesAndValues.ttcn | 249 ++- .../RnisAPI/ttcn/RnisAPI_Templates.ttcn | 16 +- .../RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn | 1454 ++++++++++++----- .../TrafficManagementAPI_TypesAndValues.ttcn | 93 +- ...XInformationServiceAPI_TypesAndValues.ttcn | 25 +- .../WlanInformationAPI_TypesAndValues.ttcn | 215 ++- .../ttcn/LibHttp_JsonMessageBodyTypes.ttcn | 3 - 11 files changed, 1325 insertions(+), 866 deletions(-) diff --git a/titan-test-system-framework b/titan-test-system-framework index 0a28ff3..163d1cf 160000 --- a/titan-test-system-framework +++ b/titan-test-system-framework @@ -1 +1 @@ -Subproject commit 0a28ff34d9ca15d6ed481dad98485210e4d6e179 +Subproject commit 163d1cfca22b18ceb1d7e24380f46f7fbaa53a97 diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn index 83abeee..ff58f9a 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn @@ -3,9 +3,6 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { // JSON import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; - // LibMec import from LibMec_TypesAndValues all; @@ -58,7 +55,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { */ type record SecurityInfo { OAuth2Info oAuth2Info optional, - UInt8 extentions optional + Json.UInt8 extentions optional } /** @@ -384,7 +381,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { * @see ETSI GS MEC 010-2 Clause 6.2.1.14 Type: LatencyDescriptor */ type record LatencyDescriptor { - UInt32 maxLatency + Json.UInteger maxLatency } /** @@ -415,11 +412,11 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { * @see ETSI GS MEC 010-2 Clause 6.2.1.17 Type: ServiceDependency */ type record ServiceDependency { - Json.String serName, - CategoryRef serCategory optional, - Json.String version, + Json.String serName, + CategoryRef serCategory optional, + Json.String version, TransportDependency serTransportDependencies optional, - Json.String requestedPermissions optional + Json.String requestedPermissions optional } /** @@ -431,8 +428,8 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { */ type record TransportDependency { TransportDescriptor transport, - SerializerType serializers, - Labels labels + SerializerType serializers, + Labels labels } type record length(1..infinity) of Json.String Labels; @@ -449,13 +446,13 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { * @see ETSI GS MEC 010-2 Clause 6.2.1.19 Type: TransportDescriptor */ type record TransportDescriptor { - Json.String name, - Json.String description optional, + Json.String name, + Json.String description optional, TransportType type_, - Json.String protocol, - Json.String version, - SecurityInfo security, - Json.String implSpecificInfo optional + Json.String protocol, + Json.String version, + SecurityInfo security, + Json.String implSpecificInfo optional } with { variant (type_) "name as 'type'"; } @@ -739,8 +736,8 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { */ type record OperateAppRequest { OperationalState changeStateTo, - StopType stopType optional, - UInt32 gracefulStopTimeout optional + StopType stopType optional, + Json.UInteger gracefulStopTimeout optional } type enumerated StopType { @@ -756,7 +753,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { */ type record TerminateAppRequest { TerminationType terminationType, - UInt32 gracefulTerminationTimeout optional + Json.UInteger gracefulTerminationTimeout optional } type StopType TerminationType; @@ -1784,12 +1781,12 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { /** * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC */ - type UInt32 Seconds; + type Json.UInteger Seconds; /** * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC */ - type UInt32 NanoSeconds; + type Json.UInteger NanoSeconds; /** * @desc This type represents the checksum of an application package diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn index f34deb8..f237430 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn @@ -6,9 +6,6 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { // JSON import from Json all; - - // LibCommon - import from LibCommon_BasicTypesAndValues all; // MEC-10-2 import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; @@ -16,7 +13,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc Maximum timeout value in seconds for graceful termination or graceful stop of an application instance. */ - type UInt32 MaxGracefulTimeout; + type Json.UInteger MaxGracefulTimeout; /** * @desc Shall be set to AppTerminationNotification. @@ -159,12 +156,12 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. */ - type UInt32 Seconds; + type Json.UInteger Seconds; /** * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. */ - type UInt32 NanoSeconds; + type Json.UInteger NanoSeconds; /** * @desc Platform Time Source status. 1 = TRACEABLE - time source is locked to the UTC time source. 2 = NONTRACEABLE - time source is not locked to the UTC time source. @@ -300,7 +297,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc Time to live value. */ - type UInt32 Ttl; + type Json.UInteger Ttl; /** * @desc This type represents the general information of a DNS rule @@ -330,7 +327,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc Port portion of the address. */ - type UInt32 Address_Port; + type Json.UInteger Address_Port; /** * @desc A IP address and port pair. @@ -485,7 +482,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { */ type record SecurityInfo { OAuth2Info oAuth2Info optional, - UInt8 extentions optional + Json.UInt8 extentions optional } /** @@ -641,7 +638,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { LocalityType scopeOfLocality optional, Json.Bool consumedLocalOnly optional, Json.Bool isLocal optional, - UInt32 livenessInterval optional, + Json.UInteger livenessInterval optional, ServiceInfo_Link links } with { variant (links) "name as '_links'"; @@ -658,7 +655,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc Authentication key number. */ - type UInt32 AuthenticationKeyNum; + type Json.UInteger AuthenticationKeyNum; /** * @desc NTP authentication option. @@ -672,12 +669,12 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc Acceptable maximum rate of the Delay_Req messages in packets per second. */ - type UInt32 DelayReqMaxRate; + type Json.UInteger DelayReqMaxRate; /** * @desc NTP server local priority. */ - type UInt32 LocalPriority; + type Json.UInteger LocalPriority; /** * @desc Maximum poll interval for NTP messages, in seconds as a power of two. Range 3...17. @@ -710,7 +707,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc PTP Master local priority. */ - type UInt32 NtpServers_PtpMasterLocalPriority; + type Json.UInteger NtpServers_PtpMasterLocalPriority; /** * @desc NTP server detail. @@ -776,7 +773,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc Used to match all IPv4 packets that have the same Differentiated Services Code Point (DSCP). */ - type UInt32 TrafficFilter_DSCP; + type Json.UInteger TrafficFilter_DSCP; /** * @desc Identify the traffic ip address. @@ -793,12 +790,12 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc Used to match all packets that have the same Quality Class Indicator (QCI). */ - type UInt32 TrafficFilter_QCI; + type Json.UInteger TrafficFilter_QCI; /** * @desc Used to match all IPv6 packets that have the same Traffic Class. */ - type UInt32 TrafficFilter_TC; + type Json.UInteger TrafficFilter_TC; /** * @desc Used for tag based traffic rule. @@ -880,7 +877,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc Priority of this traffic rule. If traffic rule conflicts, the one with higher priority take precedence. */ - type UInt32 TrafficRule_Priority; + type Json.UInteger TrafficRule_Priority; /** * @desc Contains the traffic rule state. diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn index 71ac97c..5eb21d4 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn @@ -210,66 +210,6 @@ module LocationAPI_Templates { resourceURL := * } // End of template mw_periodic_tracking_subscription - template (omit) CircleNotificationSubscription m_circle_notification_subscription( - in template (omit) ClientCorrelator p_clientCorrelator := omit, - in template (value) CallbackReference p_callbackReference, - in template (value) Addresses p_address, - in template (value) Latitude p_latitude := PX_UE_COORD_LAT, - in template (value) Longitude p_longitude := PX_UE_COORD_LONG, - in template (value) Json.Number p_radius := 200.0, - in template (value) Json.Number p_trackingAccuracy := 10.0, - in template (value) EnteringLeavingCriteria p_enteringLeavingCriteria := Entering, - in template (value) Json.Bool p_checkImmediate := true, - in template (value) UInt32 p_frequency := 10, - in template (omit) ResourceURL p_resourceURL := omit - ) := { - address_ := p_address, - callbackReference := p_callbackReference, - checkImmediate := p_checkImmediate, - clientCorrelator := p_clientCorrelator, - count := omit, - duration := omit, - enteringLeavingCriteria := p_enteringLeavingCriteria, - frequency := p_frequency, - latitude := p_latitude, - link := omit, - longitude := p_longitude, - radius := p_radius, - requester := omit, - resourceURL := p_resourceURL, - trackingAccuracy := p_trackingAccuracy - } // End of template m_circle_notification_subscription - - template CircleNotificationSubscription mw_circle_notification_subscription( - template ClientCorrelator p_clientCorrelator := *, - template (present) CallbackReference p_callbackReference := ?, - template (present) Addresses p_address := ?, - template (present) Latitude p_latitude := ?, - template (present) Longitude p_longitude := ?, - template (present) Json.Number p_radius := ?, - template (present) Json.Number p_trackingAccuracy := ?, - template (present) EnteringLeavingCriteria p_enteringLeavingCriteria := ?, - template (present) Json.Bool p_checkImmediate := ?, - template (present) UInt32 p_frequency := ?, - template ResourceURL p_resourceURL := * - ) := { - address_ := p_address, - callbackReference := p_callbackReference, - checkImmediate := p_checkImmediate, - clientCorrelator := p_clientCorrelator, - count := *, - duration := *, - enteringLeavingCriteria := p_enteringLeavingCriteria, - frequency := p_frequency, - latitude := p_latitude, - link := *, - longitude := p_longitude, - radius := p_radius, - requester := *, - resourceURL := p_resourceURL, - trackingAccuracy := p_trackingAccuracy - } // End of template m_wcircle_notification_subscription - template (value) TerminalDistance m_terminal_distance(in Json.Number p_distance) := { distance := p_distance, accuracy := omit, diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn index 46cf247..88a2afe 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn @@ -13,18 +13,15 @@ module LocationAPI_TypesAndValues { // JSON import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; - /** * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC */ - type UInt32 Seconds; + type Json.UInteger Seconds; /** * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC */ - type UInt32 NanoSeconds; + type Json.UInteger NanoSeconds; /** * @desc @@ -74,6 +71,15 @@ module LocationAPI_TypesAndValues { OccurrenceInfo occurrenceInfo optional } // End of type UserEventPara + +/** + * @desc Indicates whether event reporting is one time + * @see ETSI TS 129 572 V16.7.0 (2021-08) Clause 6.1.6.3.16 Enumeration: OccurrenceInfo + */ + type enumerated OccurrenceInfo { + ONE_TIME_EVENT, + MULTIPLE_TIME_EVENT + } /** * @desc This type represents the parameters that control the report times and frequency @@ -96,8 +102,8 @@ module LocationAPI_TypesAndValues { * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.7 Type: AreaInfo */ type record AreaInfo { - Shae shape, - Points points, + Shape shape, + Points points, Json.UInteger radius optional } // End of type AreaInfo @@ -142,21 +148,21 @@ module LocationAPI_TypesAndValues { * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.3 Type: LocationInfo */ type record LocationInfo { - Latitude latitude, - Longitude longitude, - Json.Number altitude optional, - UInt32 accuracy optional, - UInt32 accuracySemiMinor optional, - UInt32 accuracyAltitude optional, - UInt32 orientationMajorAxis optional, - UInt32 confidence optional, - UInt32 innerRadius optional, - UInt32 uncertaintyRadius optional, - UInt32 offsetAngle optional, - UInt32 includedAngle optional, - Shape shape, - TimeStamp timestamp_ optional, - Velocity velocity optional + Latitude latitude, + Longitude longitude, + Json.Number altitude optional, + Json.UInteger accuracy optional, + Json.UInteger accuracySemiMinor optional, + Json.UInteger accuracyAltitude optional, + Json.UInteger orientationMajorAxis optional, + Json.UInteger confidence optional, + Json.UInteger innerRadius optional, + Json.UInteger uncertaintyRadius optional, + Json.UInteger offsetAngle optional, + Json.UInteger includedAngle optional, + Shape shape, + TimeStamp timestamp_ optional, + Velocity velocity optional } with { variant (timestamp_) "name as 'timestamp'"; } // End of type LocationInfo @@ -204,11 +210,11 @@ module LocationAPI_TypesAndValues { * @see ETSI GS MEC 013 V3.1.1 (2023-01) Table 6.5.3-1: Definition of type LocationInfo */ type record Velocity { - VelocityType velocityType, + VelocityType velocityType, Json.UInteger bearing, Json.UInteger horizontalSpeed, Json.UInteger uncertainty optional, - Json.Integer verticalSpeed optional, + Json.Integer verticalSpeed optional, Json.UInteger verticalUncertainty optional } // End of type Velocity @@ -229,12 +235,13 @@ module LocationAPI_TypesAndValues { * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1 Zonal presence data types */ type record ZoneInfo { - ZoneId zoneId, - NumberOfAccessPoints numberOfAccessPoints, + ZoneId zoneId, + NumberOfAccessPoints numberOfAccessPoints, NumberOfUnserviceableAccessPoints numberOfUnservicableAccessPoints, - NumberOfUsers numberOfUsers, - ResourceURL resourceURL + NumberOfUsers numberOfUsers, + ResourceURL resourceURL } + type record of ZoneInfo ZoneInfos; /** * @desc Collection of the zone information list. @@ -243,13 +250,12 @@ module LocationAPI_TypesAndValues { * @see OMA-TS-REST_NetAPI_ZonalPresence-V1_0-20160308-C Clause 5.2.2.1 Type: ZoneList * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1 Zonal presence data types */ - type record of ZoneInfo ZoneInfos; type record ZoneList { ZoneInfos zone optional, ResourceURL resourceURL } - type UInt32 DateTimeStamp; // FIXME To be reviewed + type Json.UInteger DateTimeStamp; // FIXME To be reviewed /** * @desc A type containing access point information. @@ -264,14 +270,14 @@ module LocationAPI_TypesAndValues { * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1 Zonal presence data types */ type record AccessPointInfo { - AccessPointId accessPointId, - LocationInfo locationInfo optional, - ConnectionType connectionType, + AccessPointId accessPointId, + LocationInfo locationInfo optional, + ConnectionType connectionType, OperationStatus operationStatus, - NumberOfUsers numberOfUsers, - InterestRealm interestRealm optional, - DateTimeStamp timezone optional, - ResourceURL resourceURL + NumberOfUsers numberOfUsers, + InterestRealm interestRealm optional, + DateTimeStamp timezone optional, + ResourceURL resourceURL } /** @@ -288,9 +294,9 @@ module LocationAPI_TypesAndValues { * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1 Zonal presence data types */ type record AccessPointList { - ZoneId zoneId, + ZoneId zoneId, AccessPointInfos accessPoint optional, - ResourceURL resourceURL + ResourceURL resourceURL } /** @@ -325,8 +331,8 @@ REST_NetAPI_Common]. * @member notifyURL Notify Callback URL */ type record CallbackReference { - NotifyURL notifyURL, - CallbackData callbackData optional, + NotifyURL notifyURL, + CallbackData callbackData optional, NotificationFormat notificationFormat optional } @@ -391,6 +397,7 @@ REST_NetAPI_Common]. ENTERING_AREA_EVENT, LEAVING_AREA_EVENT } + type record of LocationEventType LocationEventCriteria; /** * @desc This enumeration represents the result of a localization associated with a notification @@ -413,7 +420,7 @@ REST_NetAPI_Common]. * @member self_ Self-referring URI */ type record Links { - Link self_ + LinkType self_ } with { variant (self_) "name as 'self'"; } @@ -421,37 +428,37 @@ REST_NetAPI_Common]. /** * @desc The number of access points within the zone */ - type UInt32 NumberOfAccessPoints; + type Json.UInteger NumberOfAccessPoints; /** * @desc Number of inoperable access points within the zone. */ - type UInt32 NumberOfUnserviceableAccessPoints; + type Json.UInteger NumberOfUnserviceableAccessPoints; /** * @desc The number of users currently on the access point. */ - type UInt32 NumberOfUsers; + type Json.UInteger NumberOfUsers; /** * @desc Threshold number of users in an access point which if crossed shall cause a notification. */ - type UInt32 NumberOfUsersAPThreshold; + type Json.UInteger NumberOfUsersAPThreshold; /** * @desc This element shall be present when ZoneStatusSubscription includes numberOfUsersAPThreshold element and the number of users in an access point exceeds the threshold defined in the subscription. */ - type UInt32 NumberOfUsersInAP; + type Json.UInteger NumberOfUsersInAP; /** * @desc Threshold number of users in a zone which if crossed shall cause a notification. */ - type UInt32 NumberOfUsersInZone; + type Json.UInteger NumberOfUsersInZone; /** * @desc Threshold number of users in a zone which if crossed shall cause a notification. */ - type UInt32 NumberOfUsersZoneThreshold; + type Json.UInteger NumberOfUsersZoneThreshold; /** * @desc The operation status of the access point @@ -586,15 +593,15 @@ REST_NetAPI_Common]. * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.2 Type: UserInfo */ type record UserInfo { - Address address_, - AccessPointId accessPointId, - ZoneId zoneId, - ResourceURL resourceURL optional, - TimeStamp timestamp_, - LocationInfo locationInfo optional, - CivicAddress civicInfo optional, + Address address_, + AccessPointId accessPointId, + ZoneId zoneId, + ResourceURL resourceURL optional, + TimeStamp timestamp_, + LocationInfo locationInfo optional, + CivicAddress civicInfo optional, ContextLocationInfo contextLocationInfo optional, - AncillaryInfo ancillaryInfo optional + AncillaryInfo ancillaryInfo optional } with { variant (address_) "name as 'address'"; variant (timestamp_) "name as 'timestamp'"; @@ -623,8 +630,8 @@ REST_NetAPI_Common]. * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.4 */ type record MapInfoOrigin { - Latitude latitude, - Longitude longitude, + Latitude latitude, + Longitude longitude, Json.Number altitude optional } @@ -636,8 +643,8 @@ REST_NetAPI_Common]. * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.4 */ type record MapInfo { - Json.String mapId, - MapInfoOrigin origin optional, + Json.String mapId, + MapInfoOrigin origin optional, AncillaryMapInfo ancillaryMapInfo optional } type Json.String AncillaryMapInfo; @@ -651,11 +658,11 @@ REST_NetAPI_Common]. * @member resourceURL Self referring URL */ type record UserTrackingSubscription { - ClientCorrelator clientCorrelator optional, + ClientCorrelator clientCorrelator optional, CallbackReference callbackReference, - Address address_, + Address address_, UserEventCriteria userEventCriteria optional, - ResourceURL resourceURL optional + ResourceURL resourceURL optional } with { variant (address_) "name as 'address'"; } @@ -665,12 +672,12 @@ REST_NetAPI_Common]. * @member */ type record PeriodicTrackingSubscription { - ClientCorrelator clientCorrelator optional, + ClientCorrelator clientCorrelator optional, CallbackReference callbackReference, - Address address_, - Json.Number frequency, - Json.Number requestedAccuracy, - ResourceURL resourceURL optional + Address address_, + Json.Number frequency, + Json.Number requestedAccuracy, + ResourceURL resourceURL optional } with { variant (address_) "name as 'address'"; } @@ -679,65 +686,6 @@ REST_NetAPI_Common]. * @desc Identifier of zone */ type Json.String ZoneId; - - /** - * @desc A type containing zone status subscription. - * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server - * @member resourceURL Self referring URL - * @member callbackReference - * @member zoneId Identifier of zone - * @member numberOfUsersZoneThreshold Threshold number of users in a zone which if crossed shall cause a notification - * @member numberOfUsersAPThreshold Threshold number of users in an access point which if crossed shall cause a notification - * @member operationStatus List of operation status values to generate notifications for (these apply to all access points within a zone). - */ - type record ZoneStatusSubscription { - ClientCorrelator clientCorrelator optional, - ResourceURL resourceURL optional, - CallbackReference callbackReference, - ZoneId zoneId, - NumberOfUsersZoneThreshold numberOfUsersZoneThreshold optional, - NumberOfUsersAPThreshold numberOfUsersAPThreshold optional, - OperationStatus operationStatus optional - } // End of type ZoneStatusSubscription - - /** - * @desc A type containing data for notifications, when the area is defined as a circle - * @member address Address of terminals to monitor (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) - * @member callbackReference - * @member checkImmediate Check location immediately after establishing notification - * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server - * @member count Maximum number of notifications per individual address. For no maximum, either do not include this element or specify a value of zero. Default value is 0 - * @member duration Period of time (in seconds) notifications are provided for. If set to “0” (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications - * @member enteringLeavingCriteria - * @member frequency Maximum frequency (in seconds) of notifications per subscription (can also be considered minimum time between notifications) - * @member latitude Latitude of center point - * @member link Link to other resources that are in relationship with the resource - * @member longitude Longitude of center point - * @member radius Radius circle around center point in meters - * @member requester Identifies the entity that is requesting the information (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) - * @member resourceURL Self referring URL - * @member trackingAccuracy Number of meters of acceptable error in tracking distance - */ - type record CircleNotificationSubscription { - Addresses address_, - CallbackReference callbackReference, - Json.Bool checkImmediate, - ClientCorrelator clientCorrelator optional, - UInt32 count optional, - UInt32 duration optional, - EnteringLeavingCriteria enteringLeavingCriteria, - UInt32 frequency, - Latitude latitude, - Link link optional, - Longitude longitude, - Json.Number radius, - Json.AnyURI requester optional, - ResourceURL resourceURL optional, - Json.Number trackingAccuracy - } with { - variant (address_) "name as 'address'"; - } // End of type CircleNotificationSubscription - type enumerated EnteringLeavingCriteria { Entering, Leaving @@ -753,7 +701,7 @@ REST_NetAPI_Common]. type record TerminalDistance { Json.Number distance, Json.Number accuracy optional, - TimeStamp timestamp_ optional + TimeStamp timestamp_ optional } with { variant (timestamp_) "name as 'timestamp'"; } @@ -783,15 +731,29 @@ REST_NetAPI_Common]. * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1A Terminal location data types */ type record TerminalLocation { - Address address_, + Address address_, RetrievalStatus locationRetrievalStatus, - LocationInfo currentLocation optional, - ServiceError errorInformation optional + LocationInfo currentLocation optional, + ServiceError errorInformation optional } with { variant (address_) "name as 'address'"; } // End of type TerminalLocation type record of TerminalLocation TerminalLocationList + /** + * @desc Indicate a notification termination or cancellation + * @member messageId Message identifier, either with prefix SVC or with prefix POL + * @member text Message text, with replacement variables marked with %n, where n is an index into the list of elements, starting at 1 + * @member variables Variables to substitute into text string + * @see OMA-TS-REST_NetAPI_Common-V1_0-20180116-A Clause B.1.4 Type: ServiceError + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1A Terminal location data types + */ + type record ServiceError { + Json.String messageId, + Json.String text, + Json.String variables optional + } // End of type ServiceError + /** * @desc This type contains a list of subscriptions * @member href The URI referring to the subscription @@ -811,7 +773,7 @@ REST_NetAPI_Common]. */ type record NotificationSubscriptionList { Subscription subscription optional, - ResourceURL resourceURL + ResourceURL resourceURL } /** @@ -987,7 +949,7 @@ REST_NetAPI_Common]. Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, Links links_ optional, - AreaDefine areaDefine, + AreaInfo areaDefine, Json.Number trackingAccuracy, LocationEventCriteria locationEventCriteria optional, ReportingCtrl reportingCtrl optional, @@ -1029,8 +991,6 @@ REST_NetAPI_Common]. Json.Number trackingAccuracy, DistanceCriteria criteria, Json.Bool checkImmediate, - Json.Number trackingAccuracy, - LocationEventCriteria locationEventCriteria optional, ReportingCtrl reportingCtrl optional, TimeStamp expiryDeadline optional } with { @@ -1057,7 +1017,7 @@ REST_NetAPI_Common]. * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.4 Type: UserLoctiationEventNotification */ type record LinksSubscription { - Link subscription + LinkType subscription } /** @@ -1156,16 +1116,15 @@ REST_NetAPI_Common]. * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.7 Type: ZoneStatusNotification */ type record ZoneStatusNotification { - Json.String notificationType, - TimeStamp timeStamp optional, - UserNumEvent userNumEvent optional, + Json.String notificationType, + TimeStamp timeStamp optional, + UserNumEvent userNumEvent optional, OperationStatus operationStatus optional, - ZoneId zoneId optional, - AccessPointId accessPointId optional, - Links links_ + ZoneId zoneId optional, + AccessPointId accessPointId optional, + Links links_ } with { variant (links_) "name as '_links'"; - variant (address_) "name as 'address'"; } // End of type ZoneStatusNotification type enumerated UserNumEvent { @@ -1212,7 +1171,7 @@ REST_NetAPI_Common]. * @member _links Object containing hyperlinks related to the resource * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.9 Type: UserDistanceNotification */ - type record UserAreaNotification { + type record UserDistanceNotification { Json.String notificationType, TimeStamp timeStamp optional, UserList monitoredUsers, diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn index d31b301..b1d0888 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn @@ -189,14 +189,14 @@ module RnisAPI_Templates { template (present) MeasTaSubscription mw_meas_ta_subscription( template (present) CallbackReference p_callbackReference := ?, template (present) Link p_links := ?, - template (present) FilterCriteriaAssocHo p_filterCriteriaAssocHo := ?, + template (present) FilterCriteriaAssoc p_filterCriteriaAssoc := ?, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "MeasTaSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaAssocHo := p_filterCriteriaAssocHo, - expiryDeadline := p_expiryDeadline + subscriptionType := "MeasTaSubscription", + callbackReference := p_callbackReference, + links := p_links, + filterCriteriaAssoc := p_filterCriteriaAssoc, + expiryDeadline := p_expiryDeadline } // End of template mw_meas_ta_subscription template (present) CaReConfSubscription mw_ca_reconfig_subscription( @@ -269,7 +269,7 @@ module RnisAPI_Templates { template (omit) PlmnInfo m_plmn_info( in AppInstanceId p_appInstanceId, - in template (value) Plmns p_plmn, + in template (value) Plmn_list p_plmn, in template (omit) TimeStamp p_timeStamp := omit ) := { timeStamp := p_timeStamp, @@ -279,7 +279,7 @@ module RnisAPI_Templates { template (present) PlmnInfo mw_plmn_info( template (present) AppInstanceId p_appInstanceId := ?, - template (present) Plmns p_plmn := ?, + template (present) Plmn_list p_plmn := ?, template TimeStamp p_timeStamp := * ) := { timeStamp := p_timeStamp, diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn index 06c1e57..492846a 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn @@ -1,37 +1,29 @@ /** - * @desc The ETSI MEC ISG MEC012 Radio Network Information API described using OpenAPI - * @see http://www.etsi.org/deliver/etsi_gs/MEC/001_099/012/01.01.01_60/gs_mec012v010101p.pdf + * @author ETSI / STF569 / TTF T027 + * @version $Url$ + * $Id$ + * @desc Types ANd Values for ETSI GS MEC 014 V2.2.1 (2022-02) + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. */ module RnisAPI_TypesAndValues { // JSON import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; - - /** - * @desc Represents a time stamp - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.3-1: Attributes of the TimeStamp - */ - type record TimeStamp { - UInt32 seconds, - UInt32 nanoSeconds - } - /** * @desc This type represents the information on Mobile Network(s), which a MEC application instance is associated to. * @member timeStamp Time stamp * @member appInsId Unique identifier for the MEC application instance * @member plmn Public Land Mobile Network Identity - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.2-1: Attributes of the PlmnInfo + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.2-1: Attributes of the PlmnInfo */ type record PlmnInfo { TimeStamp timeStamp optional, AppInstanceId appInstanceId, - Plmns plmn + Plmn_list plmn } type record of PlmnInfo PlmnInfos; @@ -41,7 +33,7 @@ module RnisAPI_TypesAndValues { * @member appInstanceId Unique identifier for the MEC application instance * @member requestId Unique identifier allocated by the service consumer for the RAB Information request * @member cellUserInfo The information on users per cell as defined below - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.3-1: Attributes of the RabInfo + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.3-1: Attributes of the RabInfo */ type record RabInfo { TimeStamp timeStamp optional, @@ -54,7 +46,7 @@ module RnisAPI_TypesAndValues { * @desc The information on users per cell * @member ecgi E-UTRAN CelI Global Identifier * @member ueInfo Information on UEs in the specific cell - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.3-1: Attributes of the RabInfo + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.3-1: Attributes of the RabInfo */ type record RabInfo_CellUserInfo_ { Ecgi ecgi, @@ -62,11 +54,67 @@ module RnisAPI_TypesAndValues { } type record of RabInfo_CellUserInfo_ RabInfo_CellUserInfo; + /** + * @desc Information on UEs in the specific cell + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow. + * @member erabInfo Information on E-RAB as defined below + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.3-1: Attributes of the RabInfo + */ + type record UeInfo_ { + AssociateId associateId optional, + ErabInfo erabInfo + } + type record of UeInfo_ UeInfo; + + /** + * @desc Information on E-RAB + * @member erabId The attribute that uniquely identifies a Radio Access bearer for specific UE as defined in ETSI TS 136 413 + * @member erabQosParameters QoS parameters for the E-RAB + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.3-1: Attributes of the RabInfo + */ + type record ErabInfo_ { + Json.UInteger erabId, + ErabQosParameters erabQosParameters optional + } + type record of ErabInfo_ ErabInfo; + + /** + * @desc QoS parameters for the E-RAB + * @member qci QoS Class Identifier as defined in TS 23.401 + * @member qci_information The QoS information for the E-RAB + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.3-1: Attributes of the RabInfo + */ + type record ErabQosParameters { + Qci qci, + QosInformation qosInformation optional + } + + /** + * @desc QoS Class Identifier as defined in TS 23.401 + */ + type Json.UInteger Qci; + + /** + * @desc The QoS information for the E-RAB + * @member erabGbrDl This IE indicates the maximum downlink E-RAB Bit Rate as defined in TS 23.401 for this bearer + * @member erabGbrUl This IE indicates the maximum uplink E-RAB Bit Rate as defined in TS 23.401 for this bearer + * @member erabGbrDl This IE indicates the guaranteed downlink E-RAB Bit Rate as defined in TS 23.401 for this bearer + * @member erabMbrUl This IE indicates the guaranteed uplink E-RAB Bit Rate as defined in TS 23.401 for this bearer + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.3-1: Attributes of the RabInfo + */ + type record QosInformation_ { + Json.UInteger erabMbrDl, + Json.UInteger erabMbrUl, + Json.UInteger erabGbrDl, + Json.UInteger erabGbrUl + } + type record of QosInformation_ QosInformation; + /** * @desc This type represents the information on S1-U bearer. * @member timeStamp Time stamp * @member S1UeInfo Information on a specific UE - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4-1 Attributes of the S1BearerInfo + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4-1 Attributes of the S1BearerInfo */ type record S1BearerInfo { TimeStamp timeStamp optional, @@ -79,37 +127,21 @@ module RnisAPI_TypesAndValues { * @member associateId 1 to N identifiers to associate the information for a specific UE or flow * @member ecgi E-UTRAN CelI Global Identifier * @member s1BearerInfoDetailed S1 bearer information - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4-1 Attributes of the S1BearerInfo + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4-1 Attributes of the S1BearerInfo */ type record S1UeInfo_ { TempUeId tempUeId optional, - AssociateId associateId, + AssociateId associateId optional, Ecgi ecgi, S1BearerInfoDetailed s1BearerInfoDetailed } type record of S1UeInfo_ S1UeInfo; - /** - * @desc Information on UEs in the specific cell - * @member erabId The element that uniquely identifies a S1 bearer for a specific UE, as defined in ETSI TS 136 413 - * @member enbInfo S1 bearer information on eNB side - * @member sGwInfo S1 bearer information on GW side - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4-1 Attributes of the S1BearerInfo - */ - type record S1BearerInfoDetailed_ { - UInt32 erabId, - S1EnbInfo s1EnbInfo, - SGwInfo sGwInfo - } - type record of S1BearerInfoDetailed_ S1BearerInfoDetailed; - - type record of UInt32 ErabId; - /** * @desc The temporary identifier allocated for the specific UE * @member mmec MMEC as defined in ETSI TS 136 413 * @member mtmsi M-TMSI as defined in ETSI TS 136 413 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4-1 Attributes of the S1BearerInfo + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4-1 Attributes of the S1BearerInfo */ type record TempUeId_ { Mmec mmec, @@ -122,33 +154,49 @@ module RnisAPI_TypesAndValues { type Json.String Mtmsi; /** - * @desc S1 bearer information on eNB side - * @member ipAddress eNB transport layer address of this S1 bearer - * @member tunnelId eNB GTP-U TEID of this S1 bearer - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4-1 Attributes of the S1BearerInfo + * @desc Information on UEs in the specific cell + * @member erabId The element that uniquely identifies a S1 bearer for a specific UE, as defined in ETSI TS 136 413 + * @member enbInfo S1 bearer information on eNB side + * @member sGwInfo S1 bearer information on GW side + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4-1 Attributes of the S1BearerInfo */ - type record S1EnbInfo { - Json.String ipAddress, - Json.String tunnelId + type record S1BearerInfoDetailed_ { + Json.UInteger erabId, + S1EnbInfo s1EnbInfo, + SGwInfo sGwInfo } + type record of S1BearerInfoDetailed_ S1BearerInfoDetailed; + + type record of Json.UInteger ErabId; /** * @desc S1 bearer information on GW side * @member ipAddress SGW transport layer address of this S1 bearer * @member tunnelId SGW GTP-U TEID of this S1 bearer - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4-1 Attributes of the S1BearerInfo + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4-1 Attributes of the S1BearerInfo */ type record SGwInfo { Json.String ipAddress, Json.String tunnelId } + /** + * @desc S1 bearer information on eNB side + * @member ipAddress eNB transport layer address of this S1 bearer + * @member tunnelId eNB GTP-U TEID of this S1 bearer + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4-1 Attributes of the S1BearerInfo + */ + type record S1EnbInfo { // FIXME Check if it is usefull somewhere + Json.String ipAddress, + Json.String tunnelId + } + /** * @desc This type represents the information on the Layer 2 measurements information from one or more eNBs that are associated with the requested MEC application instance. * @member timestamp Time stamp * @member cellInfo The per cell measurement information * @member cellUEInfo The per cell per UE layer 2 measurements information - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4a-1: Attributes of the L2Meas + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4a-1: Attributes of the L2Meas */ type record L2Meas { TimeStamp timeStamp optional, @@ -156,198 +204,7 @@ module RnisAPI_TypesAndValues { L2Meas_CellUEInfo cellUEInfo optional } - /** - * @desc Unique identifier for the mobile edge application instance", - */ - type Json.String AppInstanceId; - - /** - * @desc Unique identifier allocated by the Mobile Edge application for the Information request - */ - type Json.String RequestId; - - /** - * @desc E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413 - * @member ecgi Public Land Mobile Network Identity - * @member cellId E-UTRAN CelI Global Identifier - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.6-1: Attributes of the Ecgi - */ - type record Ecgi { - Plmn plmn, - CellId cellId - } - type record of Ecgi Ecgi_list; - - /** - * @desc New Radio CelI Global Identifier as defined in ETSI TS 138 423 - * @member ecgi Public Land Mobile Network Identity - * @member NrCellId NR CelI Global Identifier - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.6-1: Attributes of the Ecgi - */ - type record NRcgi { - Plmn plmn, - NrCellId nrcellId - } - type record of NRcgi NRcgi_list; - - /** - * @desc Beam level measurement results for a NR cell as defined in ETSI TS 138 331 - * @member resultsSsbIndexes Beam level measurement results based on SS/PBCH related measurements - * @member resultsCsiRsIndexes Beam level measurement results based on CSI-RS related measurements - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.8-1: Attributes of the RsIndexResults - */ - type record RsIndexResults { - ResultsPerSsbIndexList resultsSsbIndexes, - ResultsPerCsiRsIndexList resultsCsiRsIndexes - } - - /** - * @desc Beam level measurement results for a NR cell as defined in ETSI TS 138 331 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.9-1: Attributes of the ResultsPerSsbIndexList - */ - type record ResultsPerSsbIndexList { - ResultsPerSsbIndex resultsPerSsbIndex optional - } - type record ResultsPerSsbIndex { - UInt8 ssbIndex, - MeasQuantityResultsNr ssbResults optional - } - - /** - * @desc Beam level measurement results for a NR cell as defined in ETSI TS 138 331 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.10-1: Attributes of the ResultsPerCsiRsIndexList - */ - type record ResultsPerCsiRsIndexList { - ResultsPerCsiRsIndex resultsPerCsiRsIndex optional - } - type record ResultsPerCsiRsIndex { - UInt8 csiRsIndex, - MeasQuantityResultsNr csiRsResults optional - } - - /** - * @desc Collection of UE reported NR measurement quantity results as defined in ETSI TS 138 331 - @member rsrp Reference Signal Received Power as defined in ETSI TS 138 331 - @member rsrq Reference Signal Received Quality as defined in ETSI TS 138 331 - @member sinr Reference Signal to Interference & Noise Ratio as defined in ETSI TS 138 331 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.11-1: Attributes of the MeasQuantityResultsNr - */ - type record MeasQuantityResultsNr { - UInt8 rsrp optional, - UInt8 rsrq optional, - UInt8 sinr optional - } - - /** - * @desc E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413 - * @member mcc The Mobile Country Code part of PLMN Identity as defined in 3GPP TS 36.413 - * @member mnc The Mobile Network Code part of PLMN Identity as defined in 3GPP TS 36.413 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.5-1: Attributes of the Plmn - */ - type record Plmn { - Json.String mcc, - Json.String mnc - } - type record of Plmn Plmns; - - /** - * @desc The E-UTRAN Cell Identity as a bit string (size (28)), as defined in 3GPP TS 36.413 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.6.2-1: CellId - */ - type Json.String CellId; - - /** - * @desc the NR Cell Identity. Encoded as a bit string (size (36)) as defined in ETSI TS 138 423 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.6.2-1: CellId - */ - type Json.String NrCellId; - - /** - * @desc Information on UEs in the specific cell - * @member associateId 0 to N identifiers to associate the event for a specific UE or flow. - * @member erabInfo Information on E-RAB as defined below - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.3-1: Attributes of the RabInfo - */ - type record UeInfo_ { - AssociateId associateId optional, - ErabInfo erabInfo - } - type record of UeInfo_ UeInfo; - - /** - * @desc Information on UEs in the specific cell - * @member type Numeric value (0-255) corresponding to specified type of identifier - * @member value Value for the identifier - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.4-1: Attributes of the AssociateId - */ - type record AssociateId_ { - AssociateId_type type_, - Json.String value_ - } with { - variant (type_) "name as 'type'"; - variant (value_) "name as 'value'"; - } - type record of AssociateId_ AssociateId; - - /** - * @desc Numeric value (0-255) corresponding to specified type of identifier - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.4-1: Attributes of the AssociateId - */ - type enumerated AssociateId_type { - RESERVED (0), - UE_IPV4_ADDRESS (1), - UE_IPV6_ADDRESS (2), - NATED_IP_ADDRESS (3), - GTP_TEID (4) - } with { - variant "JSON: as number" - } - - /** - * @desc Information on E-RAB - * @member erabId The attribute that uniquely identifies a Radio Access bearer for specific UE as defined in ETSI TS 136 413 - * @member erabQosParameters QoS parameters for the E-RAB - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.3-1: Attributes of the RabInfo - */ - type record ErabInfo_ { - UInt32 erabId, - ErabQosParameters erabQosParameters optional - } - type record of ErabInfo_ ErabInfo; - - /** - * @desc QoS parameters for the E-RAB - * @member qci QoS Class Identifier as defined in TS 23.401 - * @member qci_information The QoS information for the E-RAB - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.3-1: Attributes of the RabInfo - */ - type record ErabQosParameters { - Qci qci, - QosInformation qosInformation optional - } - - /** - * @desc QoS Class Identifier as defined in TS 23.401 - */ - type UInt32 Qci; - - /** - * @desc The QoS information for the E-RAB - * @member erabGbrDl This IE indicates the maximum downlink E-RAB Bit Rate as defined in TS 23.401 for this bearer - * @member erabGbrUl This IE indicates the maximum uplink E-RAB Bit Rate as defined in TS 23.401 for this bearer - * @member erabGbrDl This IE indicates the guaranteed downlink E-RAB Bit Rate as defined in TS 23.401 for this bearer - * @member erabMbrUl This IE indicates the guaranteed uplink E-RAB Bit Rate as defined in TS 23.401 for this bearer - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.3-1: Attributes of the RabInfo - */ - type record QosInformation_ { - UInt32 erabMbrDl, - UInt32 erabMbrUl, - UInt32 erabGbrDl, - UInt32 erabGbrUl - } - type record of QosInformation_ QosInformation; - - type integer UInt100 (0 .. 100) with {variant "unsigned 100 bit"}; + type integer UInt100 (0 .. 100) with {variant "unsigned 32 bit"}; /** * @desc The per cell measurement information @@ -369,7 +226,7 @@ module RnisAPI_TypesAndValues { * @member ul_gbr_pdr_cell It indicates the packet discard rate in percentage of the uplink GBR traffic in a cell, as defined in ETSI TS 136 314 * @member dl_nongbr_pdr_cell It indicates the packet discard rate in percentage of the downlink non-GBR traffic in a cell, as defined in ETSI TS 136 314 * @member ul_nongbr_pdr_cell It indicates the packet discard rate in percentage of the uplink non-GBR traffic in a cell, as defined in ETSI TS 136 314 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4a-1: Attributes of the L2Meas + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4a-1: Attributes of the L2Meas */ type record L2Meas_CellInfo_ { Ecgi ecgi optional, @@ -413,7 +270,7 @@ module RnisAPI_TypesAndValues { * @member ul_gbr_data_volume_ue It indicates the data volume of the uplink GBR traffic of a UE, as defined in ETSI TS 136 314 * @member dl_nongbr_data_volume_ue It indicates the data volume of the downlink non-GBR traffic of a UE, as defined in ETSI TS 136 314 * @member ul_nongbr_data_volume_ue It indicates the data volume of the uplink non-GBR traffic of a UE, as defined in ETSI TS 136 314 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4a-1: Attributes of the L2Meas + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4a-1: Attributes of the L2Meas */ type record L2Meas_CellUEInfo_ { Ecgi ecgi, @@ -438,112 +295,85 @@ module RnisAPI_TypesAndValues { type record of L2Meas_CellUEInfo_ L2Meas_CellUEInfo; /** - * @desc subscription to 5G UE measurement report notifications from Radio Network Information Service for UEs served by NR Cells - * @member subscriptionType Shall be set to "NrMeasRepUeSubscription" - * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @desc Subscription to cell change notifications from Radio Network Information Service + * @member subscriptionType Shall be set to "CellChangeSubscription" + * @member callbackReference URI selected by the service consumerto receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications * @member links Hyperlink related to the resource - * @member filterCriteriaAssocTri List of filtering criteria for the subscription + * @member filterCriteriaAssocHo List of filtering criteria for the subscription * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.11-1: Attributes of the NrMeasRepUeSubscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.2-1: Attributes of the CellChangeSubscription */ - type record NrMeasRepUeSubscription { - Json.String subscriptionType, - CallbackReference callbackReference, - Link links optional, - FilterCriteriaNrMrs filterCriteriaNrMrs, - TimeStamp expiryDeadline optional - } with { - variant (links) "name as '_links'"; - } - - /** - * @desc List of links related to currently existing subscriptions for the service consumer - * @member links List of hyperlinks related to the resource - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.10-1: Attributes of the SubscriptionLinkList - */ - type record SubscriptionLinkList { - SubscriptionLinkList_Link links + type record CellChangeSubscription { + Json.String subscriptionType, + CallbackReference callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Link links optional, + FilterCriteriaAssocHo filterCriteriaAssocHo, + TimeStamp expiryDeadline optional } with { variant (links) "name as '_links'"; } /** * @desc List of hyperlinks related to the resource - * @member self_ - * @member subscription A link to a subscription - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.10-1: Attributes of the SubscriptionLinkList + * @member self_ URI referring to a resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.2-1: Attributes of the CellChangeSubscription */ - type record SubscriptionLinkList_Link { - LinkType self_, - Subscription subscription optional + type record Link { + LinkType self_ } with { variant (self_) "name as 'self'"; } /** - * @desc A link to a subscription - * @member The URI referring to the subscription - * @member Type of the subscription - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.10-1: Attributes of the SubscriptionLinkList + * @desc List of filtering criteria for the subscription + * @member appInstanceId Unique identifier for the MEC application instance + * @member associateId 0 to N identifiers to associate the information for a specific UE or flow + * @member ecgi E-UTRAN CelI Global Identifier + * @member hoStatus Indicate the status of the UE handover procedure + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.2-1: Attributes of the CellChangeSubscription */ - type record Subscription_ { - LinkType href, - Json.String subscriptionType + type record FilterCriteriaAssocHo { + AppInstanceId appInstanceId optional, + AssociateId associateId optional, + Ecgi_list ecgi optional, + HoStatus_list hoStatus optional } - type record of Subscription_ Subscription; /** - * @desc Subscription to UE measurement report notifications from Radio Network Information Service for UEs served by E-UTRA Cells - * @member subscriptionType Shall be set to "MeasRepUeSubscription" - * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information - * @member links Hyperlink related to the resource - * @member filterCriteriaAssocTri List of filtering criteria for the subscription - * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.6-1: Attributes of the MeasRepUeSubscription - */ - type record MeasRepUeSubscription { - Json.String subscriptionType, - CallbackReference callbackReference, - Link links optional, - FilterCriteriaAssocTri filterCriteriaAssocTri, - TimeStamp expiryDeadline optional - } with { - variant (links) "name as '_links'"; - } - - /** - * @desc Subscription to S1-U bearer information notification from Radio Network Information Service - * @member subscriptionType Shall be set to "S1BearerSubscription" - * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information - * @member links Hyperlink related to the resource - * @member eventType Description of the subscribed event - * @member s1BearerSubscriptionCriteria List of filtering criteria for the subscription - * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.9-1: Attributes of the S1BearerSubscription + * @desc Description of the subscribed to event + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.2-1: Attributes of the CellChangeSubscription */ - type record S1BearerSubscription { - Json.String subscriptionType, - CallbackReference callbackReference, - Link links optional, - EventType eventType, - S1BearerSubscriptionCriteria s1BearerSubscriptionCriteria, - TimeStamp expiryDeadline optional + type enumerated HoStatus { + IN_PREPARATION (1), + IN_EXECUTION (2), + COMPLETED (3), + REJECTED (4), + CANCELLED (5) } with { - variant (links) "name as '_links'"; + variant "JSON: as number" } + type record of HoStatus HoStatus_list; /** * @desc Subscription to RAB establishment notifications from Radio Network Information Service * @member subscriptionType Shall be set to "RabEstSubscription" * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications * @member links Hyperlink related to the resource * @member filterCriteriaQci List of filtering criteria for the subscription * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.3-1: Attributes of the RabEstSubscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.3-1: Attributes of the RabEstSubscription */ type record RabEstSubscription { Json.String subscriptionType, CallbackReference callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, Link links optional, RabEstSubscription_FilterCriteriaQci filterCriteriaQci, TimeStamp expiryDeadline optional @@ -551,18 +381,35 @@ module RnisAPI_TypesAndValues { variant (links) "name as '_links'"; } + /** + * @desc List of filtering criteria for the subscription + * @member appInstanceId Unique identifier for the MEC application instance + * @member ecgi E-UTRAN CelI Global Identifier + * @member qci QoS Class Identifier as defined in ETSI TS 123 401 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.3-1: Attributes of the RabEstSubscription + */ + type record RabEstSubscription_FilterCriteriaQci { + AppInstanceId appInstanceId optional, + Ecgi_list ecgi optional, + Qci qci + } + /** * @desc Subscription to RAB modification notifications from Radio Network Information Service * @member subscriptionType Shall be set to "RabModSubscription" * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications * @member links Hyperlink related to the resource * @member filterCriteriaQci List of filtering criteria for the subscription * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.4-1: Attributes of the RabModSubscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.4-1: Attributes of the RabModSubscription */ type record RabModSubscription { Json.String subscriptionType, CallbackReference callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, Link links optional, RabModSubscription_FilterCriteriaQci filterCriteriaQci, TimeStamp expiryDeadline optional @@ -574,14 +421,18 @@ module RnisAPI_TypesAndValues { * @desc Subscription to RAB release notifications from Radio Network Information Service * @member subscriptionType Shall be set to "RabRelSubscription" * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications * @member links Hyperlink related to the resource * @member filterCriteriaQci List of filtering criteria for the subscription * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.5-1: Attributes of the RabRelSubscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.5-1: Attributes of the RabRelSubscription */ type record RabRelSubscription { Json.String subscriptionType, CallbackReference callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, Link links optional, RabModSubscription_FilterCriteriaQci filterCriteriaQci, TimeStamp expiryDeadline optional @@ -589,18 +440,113 @@ module RnisAPI_TypesAndValues { variant (links) "name as '_links'"; } + /** + * @desc List of filtering criteria for the subscription + * @member appInstanceId Unique identifier for the MEC application instance + * @member erabId The attribute that uniquely identifies a Radio Access bearer for specific UE as defined in ETSI TS 136 413 + * @member ecgi E-UTRAN CelI Global Identifier + * @member qci QoS Class Identifier as defined in ETSI TS 123 401 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.4-1: Attributes of the RabModSubscription + */ + type record RabModSubscription_FilterCriteriaQci { + AppInstanceId appInstanceId optional, + Json.UInteger erabId, + Ecgi_list ecgi optional, + Qci qci + } + + /** + * @desc Subscription to UE measurement report notifications from Radio Network Information Service for UEs served by E-UTRA Cells + * @member subscriptionType Shall be set to "MeasRepUeSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteriaAssocTri List of filtering criteria for the subscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.6-1: Attributes of the MeasRepUeSubscription + */ + type record MeasRepUeSubscription { + Json.String subscriptionType, + CallbackReference callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Link links optional, + FilterCriteriaAssocTri filterCriteriaAssocTri, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc List of filtering criteria for the subscription + * @member appInstanceId Unique identifier for the MEC application instance + * @member associateId 0 to N identifiers to associate the information for a specific UE or flow + * @member ecgi E-UTRAN CelI Global Identifier + * @member trigger_ Corresponds to a specific E-UTRAN UE Measurement Report trigger + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.6-1: Attributes of the MeasRepUeSubscription + */ + type record FilterCriteriaAssocTri { + AppInstanceId appInstanceId optional, + AssociateId associateId optional, + Ecgi_list ecgi optional, + Trigger trigger_ optional + } with { + variant (trigger_) "name as 'trigger'"; + } + + /** + * @desc This type represents a subscription to UE timing advance notifications from Radio Network Information Service + * @member subscriptionType Shall be set to "MeasRepUeSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteriaAssoc List of filtering criteria for the subscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.7 Type: MeasTaSubscription + */ + type record MeasTaSubscription { + Json.String subscriptionType, + CallbackReference callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Link links, + FilterCriteriaAssoc filterCriteriaAssoc, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc List of filtering criteria for the subscription + * @member appInstanceId Unique identifier for the MEC application instance + * @member associateId 0 to N identifiers to associate the information for a specific UE or flow + * @member ecgi E-UTRAN CelI Global Identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.7 Type: MeasTaSubscription + */ + type record FilterCriteriaAssoc { + AppInstanceId appInstanceId optional, + AssociateId associateId optional, + Ecgi_list ecgi optional + } + /** * @desc Subscription to UE carrier aggregation reconfiguration notifications from Radio Network Information Service * @member subscriptionType Shall be set to "CaReConfSubscription" * @member callbackReference URI selected by the service consumerto receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications * @member links Hyperlink related to the resource * @member filterCriteriaAssoc List of filtering criteria for the subscription * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.8-1: Attributes of the CaReconfSubscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.8-1: Attributes of the CaReconfSubscription */ type record CaReConfSubscription { Json.String subscriptionType, CallbackReference callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, Link links optional, FilterCriteriaAssoc filterCriteriaAssoc, TimeStamp expiryDeadline optional @@ -609,196 +555,828 @@ module RnisAPI_TypesAndValues { } /** - * @desc Subscription to cell change notifications from Radio Network Information Service - * @member subscriptionType Shall be set to "CellChangeSubscription" - * @member callbackReference URI selected by the service consumerto receive notifications on the subscribed RNIS information + * @desc Subscription to S1-U bearer information notification from Radio Network Information Service + * @member subscriptionType Shall be set to "S1BearerSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications * @member links Hyperlink related to the resource - * @member filterCriteriaAssocHo List of filtering criteria for the subscription + * @member eventType Description of the subscribed event + * @member s1BearerSubscriptionCriteria List of filtering criteria for the subscription * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.2-1: Attributes of the CellChangeSubscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.9-1: Attributes of the S1BearerSubscription */ - type record CellChangeSubscription { - Json.String subscriptionType, - CallbackReference callbackReference, - Link links optional, - FilterCriteriaAssocHo filterCriteriaAssocHo, - TimeStamp expiryDeadline optional + type record S1BearerSubscription { + Json.String subscriptionType, + CallbackReference callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Link links optional, + EventType eventType, + S1BearerSubscriptionCriteria s1BearerSubscriptionCriteria, + TimeStamp expiryDeadline optional } with { variant (links) "name as '_links'"; } /** - * @desc - * @member callbackReference - * @member links - * @member filterCriteria - * @member expiryDeadline + * @desc Description of the subscribed event + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.9-1: Attributes of the S1BearerSubscription */ - type record MeasTaSubscription { - Json.String subscriptionType, - CallbackReference callbackReference, - Link links, - FilterCriteriaAssocHo filterCriteriaAssocHo, - TimeStamp expiryDeadline optional + type enumerated EventType_ { + RESERVED (0), + S1_BEARER_ESTABLISH (1), + S1_BEARER_MODIFY (2), + S1_BEARER_RELEASE (3) } with { - variant (links) "name as '_links'"; + variant "JSON: as number" } - + type record of EventType_ EventType; + /** - * @desc URL selected by the Mobile Edge application to receive notifications on the subscribed RNIS information + * @desc List of filtering criteria for the subscription + * @member associateId 0 to N identifiers to associate the events for a specific UE or a flow + * @member ecgi E-UTRAN CelI Global Identifier + * @member erabId The attribute that uniquely identifies a S1 bearer for a specific UE, as defined in ETSI TS 136 413 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.9-1: Attributes of the S1BearerSubscription */ - type Json.AnyURI CallbackReference; + type record S1BearerSubscriptionCriteria { + AssociateId associateId optional, + Ecgi ecgi optional, + ErabId erabId optional + } /** * @desc List of hyperlinks related to the resource - * @member self_ URI referring to a resource + * @member self_ + * @member subscription A link to a subscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.10-1: Attributes of the SubscriptionLinkList */ - type record Link { - LinkType self_ + type record SubscriptionLinkList_Link { + LinkType self_, + Subscription subscription optional } with { variant (self_) "name as 'self'"; } /** - * @desc URI referring to a resource - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.2-1: Attributes of the LinkType + * @desc A link to a subscription + * @member The URI referring to the subscription + * @member Type of the subscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.10-1: Attributes of the SubscriptionLinkList */ - type record LinkType { - Json.AnyURI href + type record Subscription_ { + LinkType href, + Json.String subscriptionType } + type record of Subscription_ Subscription; /** - * @desc List of filtering criteria for the subscription - * @member appInstanceId Unique identifier for the MEC application instance - * @member associateId 0 to N identifiers to associate the information for a specific UE or flow - * @member ecgi E-UTRAN CelI Global Identifier - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.8-1: Attributes of the CaReconfSubscription + * @desc List of links related to currently existing subscriptions for the service consumer + * @member links List of hyperlinks related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.10-1: Attributes of the SubscriptionLinkList */ - type record FilterCriteriaAssoc { - AppInstanceId appInstanceId, - AssociateId associateId optional, - Ecgi_list ecgi optional + type record SubscriptionLinkList { + SubscriptionLinkList_Link links + } with { + variant (links) "name as '_links'"; } /** - * @desc List of filtering criteria for the subscription - * @member appInstanceId Unique identifier for the MEC application instance - * @member ecgi E-UTRAN CelI Global Identifier - * @member qci QoS Class Identifier as defined in ETSI TS 123 401 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.3-1: Attributes of the RabEstSubscription + * @desc subscription to 5G UE measurement report notifications from Radio Network Information Service for UEs served by NR Cells + * @member subscriptionType Shall be set to "NrMeasRepUeSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteriaAssocTri List of filtering criteria for the subscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.11-1: Attributes of the NrMeasRepUeSubscription */ - type record RabEstSubscription_FilterCriteriaQci { - AppInstanceId appInstanceId optional, - Ecgi_list ecgi optional, - Qci qci + type record NrMeasRepUeSubscription { + Json.String subscriptionType, + CallbackReference callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Link links optional, + FilterCriteriaNrMrs filterCriteriaNrMrs, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; } /** * @desc List of filtering criteria for the subscription * @member appInstanceId Unique identifier for the MEC application instance - * @member erabId The attribute that uniquely identifies a Radio Access bearer for specific UE as defined in ETSI TS 136 413 - * @member ecgi E-UTRAN CelI Global Identifier - * @member qci QoS Class Identifier as defined in ETSI TS 123 401 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.4-1: Attributes of the RabModSubscription + * @member associateId 0 to N identifiers to associate the information for a specific UE or flow + * @member nrcgi NR Cell Global Identier + * @member triggerNr Corresponds to a specific 5G UE Measurement Report trigger + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.11-1: Attributes of the NrMeasRepUeSubscription */ - type record RabModSubscription_FilterCriteriaQci { + type record FilterCriteriaNrMrs { AppInstanceId appInstanceId optional, - UInt32 erabId, - Ecgi_list ecgi optional, - Qci qci + AssociateId associateId optional, + NRcgi_list nrcgi optional, + TriggerNr triggerNr optional } - + /** - * @desc List of filtering criteria for the subscription - * @member appInstanceId Unique identifier for the MEC application instance - * @member associateId 0 to N identifiers to associate the information for a specific UE or flow - * @member ecgi E-UTRAN CelI Global Identifier - * @member hoStatus - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.2-1: Attributes of the CellChangeSubscription + * @desc This type represents configuration for the delivery of subscription notifications over Websockets + * @member websocketUri Set by location server to indicate to the service consumer the Websocket URI to be used for delivering notifications + * @member requestWebsocketUri Set to true by the service consumer to indicate that Websocket delivery is requested + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Clause 6.3.12 Type: WebsockNotifConfig */ - type record FilterCriteriaAssocHo { - AppInstanceId appInstanceId optional, - AssociateId associateId optional, - Ecgi_list ecgi optional, - HoStatus_list hoStatus optional + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional } /** - * @desc List of filtering criteria for the subscription - * @member appInstanceId Unique identifier for the MEC application instance - * @member associateId 0 to N identifiers to associate the information for a specific UE or flow - * @member ecgi E-UTRAN CelI Global Identifier - * @member trigger_ Corresponds to a specific E-UTRAN UE Measurement Report trigger - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.6-1: Attributes of the MeasRepUeSubscription + * @desc Unique identifier for the mobile edge application instance", */ - type record FilterCriteriaAssocTri { - AppInstanceId appInstanceId optional, - AssociateId associateId optional, - Ecgi_list ecgi optional, - Trigger trigger_ optional + type Json.String AppInstanceId; + + /** + * @desc Unique identifier allocated by the Mobile Edge application for the Information request + */ + type Json.String RequestId; + + /** + * @desc This type represents a subscription to 5G UE measurement report notifications from Radio Network Information Service for UEs served by NR Cells + * @member notificationType Shall be set to "CellChangeNotification" + * @member timeStamp Time stamp + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow + * @member srcEcgi E-UTRAN Cell Global Identifier of the source cell + * @member trgEcgi E-UTRAN Cell Global Identifier of the target cell + * @member hoStatus Indicate the status of the UE handover procedure + * @member tempUeId The temporary identifier allocated for the specific UE + * @member links Links to resources related to this notification + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.2-1: Attributes of the CellChangeNotification + */ + type record CellChangeNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + AssociateId associateId, + Ecgi srcEcgi, + Ecgi_list trgEcgi, + HoStatus hoStatus, + TempUeId_ tempUeId, + Link links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a subscription to 5G UE measurement report notifications from Radio Network Information Service for UEs served by NR Cells + * @member notificationType Shall be set to "RabEstNotification"." + * @member timeStamp Time stamp + * @member ecgi E-UTRAN Cell Global Identifier + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow + * @member erabId The attribute that uniquely identifies a Radio Access bearer for specific UE + * @member erabQosParameters QoS parameters for the E-RAB + * @member tempUeId The temporary identifier allocated for the specific UE + * @member links Links to resources related to this notification + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.3-1: Attributes of the RabEstNotification + */ + type record RabEstNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Ecgi ecgi, + AssociateId associateId, + ErabId erabId, + ErabQosParameters erabQosParameters, + TempUeId_ tempUeId, + Link links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a notification from RNIS with regards to RAB modification procedure + * @member notificationType Shall be set to "RabModNotification"." + * @member timeStamp Time stamp + * @member ecgi E-UTRAN Cell Global Identifier + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow + * @member erabId The attribute that uniquely identifies a Radio Access bearer for specific UE + * @member erabQosParameters QoS parameters for the E-RAB + * @member links Links to resources related to this notification + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.4-1: Attributes of the RabModNotification + */ + type record RabModNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Ecgi ecgi, + AssociateId associateId, + ErabId erabId, + ErabQosParameters erabQosParameters, + Link links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a notification from RNIS with regards to RAB release procedure + * @member notificationType Shall be set to "RabModNRabRelNotificationotification"." + * @member timeStamp Time stamp + * @member ecgi E-UTRAN Cell Global Identifier + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow + * @member erabReleaseInfo The release information for the E-RAB + * @member links Links to resources related to this notification + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.5-1: Attributes of the RabRelNotification + */ + type record RabRelNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Ecgi ecgi, + AssociateId associateId, + ErabReleaseInfo erabReleaseInfo, + Link links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc The release information for the E-RAB + * @member erabId The attribute that uniquely identifies a Radio Access bearer for specific UE + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.5-1: Attributes of the RabRelNotification + */ + type record ErabReleaseInfo { + ErabId erabId + } + + /** + * @desc Subscription to UE measurement report notifications from Radio Network Information Service for UEs served by E-UTRA Cells + * @member notificationType Shall be set to "MeasRepUeNotification" + * @member timeStamp Time stamp + * @member ecgi E-UTRAN Cell Global Identifier + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow + * @member rsrp Reference Signal Received Power + * @member rsrpEx Extended Reference Signal Received Power + * @member rsrq Reference Signal Received Quality + * @member rsrqEx Extended Reference Signal Received Quality + * @member sinr Reference Signal "Signal to Interference plus Noise Ratio" + * @member trigger Corresponds to a specific E-UTRAN UE Measurement Report trigger + * @member eutranNeighbourCell This parameter can be repeated to contain information of all the neighbouring cells + * @member carrierAggregationMeasInfo This parameter can be repeated to contain information of all the carriers assign for Carrier Aggregation + * @member heightUe Indicates height of the UE in meters relative to the sea + * @member newRadioMeasInfo 5G New Radio secondary serving cells measurement information + * @member newRadioMeasNeiInfo Measurement quantities concerning the 5G NR neighbours + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record MeasRepUeNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Ecgi ecgi, + AssociateId associateId, + Json.UInt8 rsrp, + Json.UInt8 rsrpEx optional, + Json.UInt8 rsrq, + Json.UInt8 rsrqEx optional, + Json.UInt8 sinr optional, + Trigger trigger_, + EutraNeighbourCellMeasInfo eutraNeighbourCellMeasInfo optional, + CarrierAggregationMeasInfo carrierAggregationMeasInfo optional, + Json.Integer heightUe optional, + NewRadioMeasInfo newRadioMeasInfo optional, + NewRadioMeasNeiInfo newRadioMeasNeiInfo optional, + Link links optional } with { variant (trigger_) "name as 'trigger'"; + variant (links) "name as '_links'"; } /** - * @desc List of filtering criteria for the subscription - * @member appInstanceId Unique identifier for the MEC application instance - * @member associateId 0 to N identifiers to associate the information for a specific UE or flow - * @member nrcgi NR Cell Global Identier + * @desc This parameter can be repeated to contain information of all the neighbouring cells + * @member ecgi E-UTRAN Cell Global Identifier + * @member rsrp Reference Signal Received Power + * @member rsrpEx Extended Reference Signal Received Power + * @member rsrq Reference Signal Received Quality + * @member rsrqEx Extended Reference Signal Received Quality + * @member sinr Reference Signal "Signal to Interference plus Noise Ratio" + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record EutraNeighbourCellMeasInfo_ { + Ecgi ecgi, + Json.UInt8 rsrp optional, + Json.UInt8 rsrpEx optional, + Json.UInt8 rsrq optional, + Json.UInt8 rsrqEx optional, + Json.UInt8 sinr optional + } + type record of EutraNeighbourCellMeasInfo_ EutraNeighbourCellMeasInfo; + + /** + * @desc This parameter can be repeated to contain information of all the carriers assign for Carrier Aggregation + * @member cellIdSrv E-UTRAN Cell Identity of a Secondary serving Cell (SCell) + * @member rsrpSrv Reference Signal Received Power + * @member rsrpSrvEx Extended Reference Signal Received Power + * @member rsrqSrv Reference Signal Received Quality + * @member rsrqSrvEx Extended Reference Signal Received Quality + * @member sinrSrv Reference Signal "Signal to Interference plus Noise Ratio" + * @member cellIdNei E-UTRAN Cell Identity of the best neighbouring cell (NCell) associated with the SCell + * @member rsrpNei Reference Signal Received Power + * @member rsrpNeiEx Extended Reference Signal Received Power + * @member rsrqNei Reference Signal Received Quality + * @member rsrqNeiEx Extended Reference Signal Received Quality + * @member sinrNei Reference Signal "Signal to Interference plus Noise Ratio" + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record CarrierAggregationMeasInfo_ { + CellId cellIdSrv, + Json.UInt8 rsrpSrv optional, + Json.UInt8 rsrpSrvEx optional, + Json.UInt8 rsrqSrv optional, + Json.UInt8 rsrqSrvEx optional, + Json.UInt8 sinrSrv optional, + CellId cellIdNei, + Json.UInt8 rsrpNei optional, + Json.UInt8 rsrpNeiEx optional, + Json.UInt8 rsrqNei optional, + Json.UInt8 rsrqNeiEx optional, + Json.UInt8 sinrNei optional + } + type record of CarrierAggregationMeasInfo_ CarrierAggregationMeasInfo; + + /** + * @desc 5G New Radio secondary serving cells measurement information + * @member nrCarrierFreq ARFCN applicable for a downlink, uplink or bi-directional (TDD) NR carrier frequency + * @member nrSCs Measurement quantities concerning the secondary serving cells + * @member nrBNCs Measurement quantities concerning the best neighbours of the secondary serving cells + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record NewRadioMeasInfo_ { + Json.UInteger nrCarrierFreq, + NrSCs nrSCs, + NrBNCs nrBNCs optional + } + type record of NewRadioMeasInfo_ NewRadioMeasInfo; + + /** + * @desc Measurement quantities concerning the 5G NR neighbours + * @member nrNCellInfo 5G NR neighbour cell info + * @member nrNCellRsrp Reference Signal Received Power measurement + * @member nrNCellRsrq Reference Signal Received Quality measurement + * @member nrNCellRssi Reference signal SINR measurement + * @member rsIndexResults Beam level measurements results of a NR cell + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record NewRadioMeasNeiInfo_ { + NrNCellInfo nrNCellInfo, + Json.UInt8 nrNCellRsrp optional, + Json.UInt8 nrNCellRsrq optional, + Json.UInt8 nrNCellRssi optional, + RsIndexResults rsIndexResults optional + } + type record of NewRadioMeasNeiInfo_ NewRadioMeasNeiInfo; + + /** + * @desc 5G NR neighbour cell info + * @member nrNCellPlmn Public land mobile network identities + * @member nrNCellGId Cell Global Identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record NrNCellInfo_ { + Plmn_list nrNCellPlmn, + NrCellId nrNCellGId + } + type record of NrNCellInfo_ NrNCellInfo; + + /** + * @desc Measurement quantities concerning the secondary serving cells + * @member nrSCellInfo Secondary serving cell(s) info + * @member nrSCellGId Cell Global Identifier + * @member nrSCellRsrp Reference Signal Received Power measurement + * @member nrSCellRsrq Reference Signal Received Quality measurement + * @member nrSCellRssi Reference signal SINR measurement + * @member + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record NrSCs { + NrSCellInfo nrSCellInfo, + Json.UInt8 nrSCellRsrp optional, + Json.UInt8 nrSCellRsrq optional, + Json.UInt8 nrSCellRssi optional + } + + /** + * @desc Secondary serving cell(s) info + * @member nrSCellInfo Secondary serving cell(s) info + * @member nrSCellPlmn Public land mobile network identities + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record NrSCellInfo_ { + Plmn_list nrSCellInfo, + NrCellId_list nrSCellPlmn + } + type record of NrSCellInfo_ NrSCellInfo; + + /** + * @desc Measurement quantities concerning the best neighbours of the secondary serving cells + * @member nrBNCellInfo Best neighbours of the secondary serving cell(s) info + * @member nrBNCellRsrp Reference Signal Received Power measurement + * @member nrBNCellRsrq Reference Signal Received Quality measurement + * @member nrBNCellRssi Reference signal SINR measurement + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + * @member + */ + type record NrBNCs { + NrBNCellInfo nrBNCellInfo, + Json.UInt8 nrBNCellRsrp optional, + Json.UInt8 nrBNCellRsrq optional, + Json.UInt8 nrBNCellRss optional + } + + /** + * @desc Best neighbours of the secondary serving cell(s) info + * @member nrBNCellPlmn Public land mobile network identities + * @member nrBNCellGId Cell Global Identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record NrBNCellInfo_ { + Plmn_list nrBNCellPlmn, + NrCellId nrBNCellGId + } + type record of NrBNCellInfo_ NrBNCellInfo; + + /** + * @desc This type represents a notification from RNIS with regards to UE Timing Advance measurements + * @member notificationType Shall be set to "MeasTaNotification" + * @member timeStamp Time stamp + * @member ecgi E-UTRAN Cell Global Identifier + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow + * @member timingAdvance The timing advance + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.7-1: Attributes of the MeasTaNotification + */ + type record MeasTaNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Ecgi ecgi, + AssociateId associateId, + Json.Integer timingAdvance optional, + Link links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a notification from RNIS with regards to UE carrier aggregation reconfigurations + * @member notificationType Shall be set to "CaReconfNotification" + * @member timeStamp Time stamp + * @member ecgi E-UTRAN Cell Global Identifier + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow + * @member secondaryCellAdd + * @member secondaryCellRemove + * @member carrierAggregationMeasInfo This parameter can be repeated to contain information of all the carriers assign for Carrier Aggregation + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.8-1: Attributes of the CaReconfNotification + */ + type record CaReconfNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Ecgi ecgi, + AssociateId associateId, + SecondaryCellAdd secondaryCellAdd optional, + SecondaryCellRemove secondaryCellRemove optional, + CarrierAggregationMeasInfo_CaReconfNotification + carrierAggregationMeasInfo optional, + Link links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc + * @member ecgi E-UTRAN Cell Global Identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.8-1: Attributes of the CaReconfNotification + */ + type record SecondaryCellAdd_ { + Ecgi ecgi + } + type record of SecondaryCellAdd_ SecondaryCellAdd; + + /** + * @desc + * @member ecgi E-UTRAN Cell Global Identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.8-1: Attributes of the CaReconfNotification + */ + type record SecondaryCellRemove_ { + Ecgi ecgi + } + type record of SecondaryCellRemove_ SecondaryCellRemove; + + /** + * @desc This parameter can be repeated to contain information of all the carriers assign for Carrier Aggregation + * @member cellIdSrv E-UTRAN Cell Identity of a Secondary serving Cell (SCell) + * @member rsrpSrv Reference Signal Received Power + * @member rsrqSrv Reference Signal Received Quality + * @member cellIdNei E-UTRAN Cell Identity of the best neighbouring cell (NCell) associated with the SCell + * @member rsrpNei Reference Signal Received Power + * @member rsrqNei Reference Signal Received Quality + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.8-1: Attributes of the CaReconfNotification + */ + type record CarrierAggregationMeasInfo_CaReconfNotification_ { + CellId cellIdSrv, + Json.UInt8 rsrpSrv optional, + Json.UInt8 rsrqSrv optional, + CellId cellIdNei, + Json.UInt8 rsrpNei optional, + Json.UInt8 rsrqNei optional + } + type record of CarrierAggregationMeasInfo_CaReconfNotification_ CarrierAggregationMeasInfo_CaReconfNotification; + + /** + * @desc This type represents a notification from RNIS with regards to expiry of the existing subscription + * @member notificationType Shall be set to "ExpiryNotification" + * @member timeStamp Time stamp + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.9-1: Attributes of the ExpiryNotification + */ + type record ExpiryNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Link links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a notification from RNIS with regards to expiry of the existing subscription + * @member notificationType Shall be set to "S1BearerNotification" + * @member timeStamp Time stamp + * @member s1Event The subscribed event that triggered this notification in S1BearerSubscription + * @member s1UeInfo Information on specific UE that matches the criteria in S1BearerSubscription + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.10-1 Attributes of the S1BearerNotification + */ + type record S1BearerNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + EventType s1Event, + S1UeInfo_ s1UeInfo, + Link links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a notification from RNIS with regards to 5G UE measurement report for UEs. + * @member notificationType Shall be set to "NrMeasRepUeNotification" + * @member timeStamp Time stamp + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow * @member triggerNr Corresponds to a specific 5G UE Measurement Report trigger - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.11-1: Attributes of the NrMeasRepUeSubscription + * @member servCellMeasInfo This parameter can be repeated to contain information of all the serving cells + * @member nrNeighCellMeasInfo This parameter can be repeated to contain measurement information of all the neighbouring cells + * @member eutraNeighCellMeasInfo This parameter can be repeated to contain measurement information of all the neighbouring cells + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.11-1: Attributes of the NrMeasRepUeNotification */ - type record FilterCriteriaNrMrs { - AppInstanceId appInstanceId optional, - AssociateId associateId optional, - NRcgi_list nrcgi optional, - TriggerNr triggerNr optional + type record NrMeasRepUeNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + AssociateId associateId, + TriggerNr triggerNr, + ServCellMeasInfo servCellMeasInfo optional, + NrNeighCellMeasInfo nrNeighCellMeasInfo optional, + EutraNeighbourCellMeasInfo_NrMeasRepUeNotification_ + eutraNeighCellMeasInfo optional, + Link links optional + } with { + variant (links) "name as '_links'"; } /** - * @desc List of filtering criteria for the subscription - * @member associateId 0 to N identifiers to associate the events for a specific UE or a flow - * @member ecgi E-UTRAN CelI Global Identifier - * @member erabId The attribute that uniquely identifies a S1 bearer for a specific UE, as defined in ETSI TS 136 413 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.9-1: Attributes of the S1BearerSubscription + * @desc This parameter can be repeated to contain information of all the serving cells + * @member nrcgi NR Cell Global Identifier + * @member sCell Measurement information relating to this serving cell + * @member nCell Measurement information relating to the best neighbour of this serving cell + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.11-1: Attributes of the NrMeasRepUeNotification */ - type record S1BearerSubscriptionCriteria { - AssociateId associateId optional, - Ecgi ecgi optional, - ErabId erabId optional + type record ServCellMeasInfo { + Nrcgi nrcgi, + SCell sCell, + NCell nCell optional } /** - * @desc Description of the subscribed to event - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.2-1: Attributes of the CellChangeSubscription + * @desc Measurement information relating to this serving cell + * @member measQuantityResultsSsbCellM easurement quantity results relating to the Synchronization Signal Block + * @member measQuantityResultsCsiRsCell Measurement quantity results relating to the Channel State Information Reference Signal + * @member rsIndexResults Beam level measurement information + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.11-1: Attributes of the NrMeasRepUeNotification */ - type enumerated HoStatus { - IN_PREPARATION (1), - IN_EXECUTION (2), - COMPLETED (3), - REJECTED (4), - CANCELLED (5) + type record SCell { + MeasQuantityResultsNr measQuantityResultsSsbCell optional, + MeasQuantityResultsNr measQuantityResultsCsiRsCell optional, + RsIndexResults rsIndexResults optional + } + + /** + * @desc Measurement information relating to the best neighbour of this serving cell + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.11-1: Attributes of the NrMeasRepUeNotification + */ + type SCell NCell; + + /** + * @desc This parameter can be repeated to contain measurement information of all the neighbouring cells + * @member nrcgi NR Cell Global Identifier + * @member measQuantityResultsSsbCellM easurement quantity results relating to the Synchronization Signal Block + * @member measQuantityResultsCsiRsCell Measurement quantity results relating to the Channel State Information Reference Signal + * @member rsIndexResults Beam level measurement information + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.11-1: Attributes of the NrMeasRepUeNotification + */ + type record NrNeighCellMeasInfo { + Nrcgi nrcgi, + MeasQuantityResultsNr measQuantityResultsSsbCell optional, + MeasQuantityResultsNr measQuantityResultsCsiRsCell optional, + RsIndexResults rsIndexResults optional + } + + /** + * @desc This parameter can be repeated to contain information of all the neighbouring cells + * @member ecgi E-UTRAN Cell Global Identifier + * @member rsrp Reference Signal Received Power + * @member rsrq Reference Signal Received Quality + * @member sinr Reference Signal "Signal to Interference plus Noise Ratio" + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.11-1: Attributes of the NrMeasRepUeNotification + */ + type record EutraNeighbourCellMeasInfo_NrMeasRepUeNotification_ { + Ecgi ecgi, + Json.UInt8 rsrp optional, + Json.UInt8 rsrq optional, + Json.UInt8 sinr optional + } + type record of EutraNeighbourCellMeasInfo_NrMeasRepUeNotification_ EutraNeighbourCellMeasInfo_NrMeasRepUeNotification; + + /** + * @desc This type represents a notification from RNIS with regards to expiry of the existing subscription + * @member notificationType Shall be set to "TestNotification" + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.12-1: Attributes of the TestNotification + */ + type record TestNotification { + Json.String notificationType, + Link links optional } with { - variant "JSON: as number" + variant (links) "name as '_links'"; } - type record of HoStatus HoStatus_list; /** - * @desc Description of the subscribed event - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.9-1: Attributes of the S1BearerSubscription + * @desc the NR Cell Identity. Encoded as a bit string (size (36)) as defined in ETSI TS 138 423 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.6.2-1: CellId */ - type enumerated EventType { - RESERVED (0), - S1_BEARER_ESTABLISH (1), - S1_BEARER_MODIFY (2), - S1_BEARER_RELEASE (3) + type Json.String NrCellId; + type record of NrCellId NrCellId_list; + + /** + * @desc Numeric value (0-255) corresponding to specified type of identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.4-1: Attributes of the AssociateId + */ + type enumerated AssociateId_type { + RESERVED (0), + UE_IPV4_ADDRESS (1), + UE_IPV6_ADDRESS (2), + NATED_IP_ADDRESS (3), + GTP_TEID (4) } with { variant "JSON: as number" } + + /** + * @desc URL selected by the Mobile Edge application to receive notifications on the subscribed RNIS information + */ + type Json.AnyURI CallbackReference; + + /** + * @desc URI referring to a resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.2-1: Attributes of the LinkType + */ + type record LinkType { + Json.AnyURI href + } + + /** + * @desc Represents a time stamp + * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.3-1: Attributes of the TimeStamp + */ + type record TimeStamp { + Json.UInteger seconds, + Json.UInteger nanoSeconds + } + + /** + * @desc Information on UEs in the specific cell + * @member type Numeric value (0-255) corresponding to specified type of identifier + * @member value Value for the identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.4-1: Attributes of the AssociateId + */ + type record AssociateId_ { + AssociateId_type type_, + Json.String value_ + } with { + variant (type_) "name as 'type'"; + variant (value_) "name as 'value'"; + } + type record of AssociateId_ AssociateId; + + /** + * @desc E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413 + * @member mcc The Mobile Country Code part of PLMN Identity as defined in 3GPP TS 36.413 + * @member mnc The Mobile Network Code part of PLMN Identity as defined in 3GPP TS 36.413 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.5-1: Attributes of the Plmn + */ + type record Plmn { + Json.String mcc, + Json.String mnc + } + type record of Plmn Plmn_list; + + /** + * @desc E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413 + * @member ecgi Public Land Mobile Network Identity + * @member cellId E-UTRAN CelI Global Identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.5-1: Attributes of the Ecgi + */ + type record Ecgi { + Plmn plmn, + CellId cellId + } + type record of Ecgi Ecgi_list; + + /** + * @desc New Radio CelI Global Identifier as defined in ETSI TS 138 423 + * @member ecgi Public Land Mobile Network Identity + * @member NrCellId NR CelI Global Identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.6-1: Attributes of the Ecgi + */ + type record Nrcgi { + Plmn plmn, + NrCellId nrcellId + } + type record of Nrcgi NRcgi_list; + + /** + * @desc Beam level measurement results for a NR cell as defined in ETSI TS 138 331 + * @member resultsSsbIndexes Beam level measurement results based on SS/PBCH related measurements + * @member resultsCsiRsIndexes Beam level measurement results based on CSI-RS related measurements + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.8-1: Attributes of the RsIndexResults + */ + type record RsIndexResults { + ResultsPerSsbIndexList resultsSsbIndexes, + ResultsPerCsiRsIndexList resultsCsiRsIndexes + } + + /** + * @desc Beam level measurement results for a NR cell as defined in ETSI TS 138 331 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.9-1: Attributes of the ResultsPerSsbIndexList + */ + type record ResultsPerSsbIndexList { + ResultsPerSsbIndex resultsPerSsbIndex optional + } + type record ResultsPerSsbIndex { + UInt8 ssbIndex, + MeasQuantityResultsNr ssbResults optional + } + + /** + * @desc Beam level measurement results for a NR cell as defined in ETSI TS 138 331 + * @member resultsPerCsiRsIndex + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.10-1: Attributes of the ResultsPerCsiRsIndexList + */ + type record ResultsPerCsiRsIndexList { + ResultsPerCsiRsIndex resultsPerCsiRsIndex optional + } + type record ResultsPerCsiRsIndex_ { + UInt8 csiRsIndex, + MeasQuantityResultsNr csiRsResults optional + } + type record of ResultsPerCsiRsIndex_ ResultsPerCsiRsIndex; + + /** + * @desc Collection of UE reported NR measurement quantity results as defined in ETSI TS 138 331 + * @member rsrp Reference Signal Received Power as defined in ETSI TS 138 331 + * @member rsrq Reference Signal Received Quality as defined in ETSI TS 138 331 + * @member sinr Reference Signal to Interference & Noise Ratio as defined in ETSI TS 138 331 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.11-1: Attributes of the MeasQuantityResultsNr + */ + type record MeasQuantityResultsNr { + UInt8 rsrp optional, + UInt8 rsrq optional, + UInt8 sinr optional + } + /** + * @desc The E-UTRAN Cell Identity as a bit string (size (28)), as defined in 3GPP TS 36.413 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.6.2-1: CellId + */ + type Json.String CellId; + /** * @desc Unique identifier for the mobile edge application instance - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.6.3-1: Enumeration Trigger + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.6.3-1: Enumeration Trigger */ type enumerated Trigger { NOT_AVAILABLE (0), @@ -832,7 +1410,7 @@ module RnisAPI_TypesAndValues { /** * @desc specified triggers for a 5G UE Measurement Report. Full details can be found in ETSI TS 138 331 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.6.4-1: Enumeration TriggerNr + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.6.4-1: Enumeration TriggerNr */ type enumerated TriggerNr { NOT_AVAILABLE (0), diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn index 1e83b9d..4c11591 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn @@ -2,9 +2,6 @@ module TrafficManagementAPI_TypesAndValues { // JSON import from Json all; - - // LibCommon - import from LibCommon_BasicTypesAndValues all; /** * @desc Information of bandwidth resource @@ -137,13 +134,13 @@ module TrafficManagementAPI_TypesAndValues { * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ - type UInt32 Seconds; + type Json.UInteger Seconds; /** * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ - type UInt32 NanoSeconds; + type Json.UInteger NanoSeconds; /** * @desc The direction of the requested BW allocation @@ -193,9 +190,9 @@ module TrafficManagementAPI_TypesAndValues { * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo */ type record MtsCapabilityInfo { - TimeStamp timeStamp optional, + TimeStamp timeStamp optional, MtsAccessInfos mtsAccessInfo, - MtsModes mtsMode + MtsModes mtsMode } /** @@ -203,11 +200,11 @@ module TrafficManagementAPI_TypesAndValues { * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo */ type enumerated MtsMode { - LowCost (0), - LowLatency (1), + LowCost (0), + LowLatency (1), HighThroughput (2), - Redundancy (3), - QoS (4) + Redundancy (3), + QoS (4) } with { variant "JSON: as number" } @@ -221,9 +218,9 @@ module TrafficManagementAPI_TypesAndValues { * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo */ type record MtsAccessInfo { - AccessId accessId, + AccessId accessId, AccessType accessType, - Metered metered + Metered metered } type record of MtsAccessInfo MtsAccessInfos; @@ -231,25 +228,25 @@ module TrafficManagementAPI_TypesAndValues { * @desc Unique identifier for the access network connection * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo */ - type UInt32 AccessId; + type Json.UInteger AccessId; /** * @desc Numeric value (0-255) corresponding to specific type of access network * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo */ type enumerated AccessType { - Unknown (0), - IEEE802_11_Based (1), - ThreeGPP_Based (2), - Fixed_Access (3), - IEEE802_11abg (11), - IEEE802_11abgn (12), - IEEE802_11abgnac (13), - IEEE802_11abgnacax (14), - IEEE802_11bgn (15), + Unknown (0), + IEEE802_11_Based (1), + ThreeGPP_Based (2), + Fixed_Access (3), + IEEE802_11abg (11), + IEEE802_11abgn (12), + IEEE802_11abgnac (13), + IEEE802_11abgnacax (14), + IEEE802_11bgn (15), ThreeGPP_GERAN_UTRA (31), - ThreeGPP_E_UTRA (32), - Three3GPP_NR (33) + ThreeGPP_E_UTRA (32), + Three3GPP_NR (33) } with { variant "JSON: as number" } @@ -260,8 +257,8 @@ module TrafficManagementAPI_TypesAndValues { */ type enumerated Metered { CxNotMetered (0), - CxMetered (1), - Unknown (2) + CxMetered (1), + Unknown (2) } with { variant "JSON: as number" } @@ -280,14 +277,14 @@ module TrafficManagementAPI_TypesAndValues { * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo */ type record MtsSessionInfo { - SessionId sessionId optional, - TimeStamp timeStamp optional, - AppInsId appInsId, - AppName appName optional, - MtsRequestType requestType, - FlowFilter flowFilter, - QosD qosD, - MtsMode mtsMode, + SessionId sessionId optional, + TimeStamp timeStamp optional, + AppInsId appInsId, + Json.String appName optional, + MtsRequestType requestType, + FlowFilter flowFilter, + QosD qosD, + MtsMode mtsMode, TrafficDirection trafficDirection } type record of MtsSessionInfo MtsSessionInfos @@ -310,13 +307,13 @@ module TrafficManagementAPI_TypesAndValues { * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo */ type record FlowFilterItem { - SourceIp sourceIp optional, + SourceIp sourceIp optional, SourcePort sourcePort optional, DstAddress dstIp optional, - DstPort dstPort optional, - Protocol protocol optional, - Dscp dscp optional, - Flowlabel flowlabel optional + DstPort dstPort optional, + Protocol protocol optional, + Dscp dscp optional, + Flowlabel flowlabel optional } type record of FlowFilterItem FlowFilter; @@ -348,17 +345,17 @@ module TrafficManagementAPI_TypesAndValues { * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.5 Type: MtsSessionInfo */ type record QosD { - UInt32 minTpt optional, - UInt32 maxLatency optional, - UInt32 maxLoss optional, - UInt32 maxJitter optional, - Priority priority optional + Json.UInteger minTpt optional, + Json.UInteger maxLatency optional, + Json.UInteger maxLoss optional, + Json.UInteger maxJitter optional, + Priority priority optional } type enumerated Priority { - Low (0), - Medium (1), - High (2), + Low (0), + Medium (1), + High (2), Critical (3) } with { variant "JSON: as number" diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn index 076dd00..ffb8c99 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn @@ -13,9 +13,6 @@ module V2XInformationServiceAPI_TypesAndValues { // JSON import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; - /** * @desc E-UTRAN Cell Identity as a bit string (size (28)) * @see ETSI TS 136 413 @@ -74,12 +71,12 @@ module V2XInformationServiceAPI_TypesAndValues { /** * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC */ - type UInt32 Seconds; + type Json.UInteger Seconds; /** * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC */ - type UInt32 NanoSeconds; + type Json.UInteger NanoSeconds; /** * @desc Time stamp description @@ -176,8 +173,8 @@ module V2XInformationServiceAPI_TypesAndValues { type record RouteInfo { LocationInfo location, TimeStamp time optional, - UInt8 rsrp optional, - UInt8 rsrq optional + Json.UInt8 rsrp optional, + Json.UInt8 rsrq optional } type record of RouteInfo RouteInfoList; @@ -273,11 +270,11 @@ module V2XInformationServiceAPI_TypesAndValues { * @see MEC030 Clause 6.4.3 Type: ProvChgUuMbmsNotification */ type record ProvChgUuMbmsNotification { - LocationInfo locationInfo, + LocationInfo locationInfo, UuMbmsNeighbourCellInfoList neighbourCellInfo optional, - Json.String notificationType, - TimeStamp timeStamp optional, - V2xServerUsd v2xServerUsd optional + Json.String notificationType, + TimeStamp timeStamp optional, + V2xServerUsd v2xServerUsd optional } /** @@ -428,7 +425,7 @@ module V2XInformationServiceAPI_TypesAndValues { type record ProInfoUuMbms { LocationInfo locationInfo, UuMbmsNeighbourCellInfoList neighbourCellInfo optional, - V2xServerUsd v2xServerUsd + V2xServerUsd v2xServerUsd } type record of ProInfoUuMbms ProInfoUuMbmsList; @@ -483,7 +480,7 @@ module V2XInformationServiceAPI_TypesAndValues { */ type record UuUnicastProvisioningInfo { ProInfoUuUnicastList proInfoUuUnicast, - TimeStamp timeStamp optional + TimeStamp timeStamp optional } /** @@ -542,7 +539,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @see MEC030 Clause 6.3.5 Type: V2xMsgSubscription */ type record V2xMsgSubscriptionFilterCriteria { - MsgTypeList msgType optional, + MsgTypeList msgType optional, StdOrganization stdOrganization } diff --git a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn index 35effc6..6bb930d 100644 --- a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn @@ -13,18 +13,15 @@ module WlanInformationAPI_TypesAndValues { // JSON import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; - /** * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC */ - type UInt32 Seconds; + type Json.UInteger Seconds; /** * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC */ - type UInt32 NanoSeconds; + type Json.UInteger NanoSeconds; /** * @desc Time stamp description @@ -62,14 +59,14 @@ module WlanInformationAPI_TypesAndValues { * @member aselCap ASEL capabilities * @see ETSI GS MEC 028 Clause 6.5.14 Type: HtCapabilities */ - type integer UInt128 with {variant "unsigned 128 bit"}; + type integer UInt128 with {variant "unsigned 32 bit"}; type record HtCapabilities { - UInt16 htCapabilityInfo, - UInt8 ampduParameters, + Json.UInt16 htCapabilityInfo, + Json.UInt8 ampduParameters, UInt128 supportedMcsSet, - UInt16 htExtendedCap, - UInt32 txBeamFormCap, - UInt8 aselCap + Json.UInt16 htExtendedCap, + Json.UInteger txBeamFormCap, + Json.UInt8 aselCap } /** @@ -79,8 +76,8 @@ module WlanInformationAPI_TypesAndValues { * @see ETSI GS MEC 028 Clause 6.5.15 Type: VhtCapabilities */ type record VhtCapabilities { - UInt32 vhtCapInfo, - UInt64 vhtMcsNss + Json.UInteger vhtCapInfo, + Json.UInteger vhtMcsNss } /** @@ -91,9 +88,9 @@ module WlanInformationAPI_TypesAndValues { * @see ETSI GS MEC 028 Clause 6.5.16 Type: HeCapabilities */ type record HeCapabilities { - UInt8 heMacCapInfo, - UInt8 hePhyCapinfo, - UInt8 supportedHeMcsNssSet + Json.UInt8 heMacCapInfo, + Json.UInt8 hePhyCapinfo, + Json.UInt8 supportedHeMcsNssSet } /** @@ -107,12 +104,12 @@ module WlanInformationAPI_TypesAndValues { * @see ETSI GS MEC 028 Clause 6.5.17 Type: DmgCapabilities */ type record DmgCapabilities { - UInt64 dmgStaCapInfo, - UInt16 dmgApOrPcpCapInfo, - UInt16 dmgStaBeamTrackTimeLimit, - UInt8 extScMcsCap, - UInt8 maxNrBasicAmsduSubframes, - UInt8 maxNrShortAmsduSubframes + Json.UInteger dmgStaCapInfo, + Json.UInt16 dmgApOrPcpCapInfo, + Json.UInt16 dmgStaBeamTrackTimeLimit, + Json.UInt8 extScMcsCap, + Json.UInt8 maxNrBasicAmsduSubframes, + Json.UInt8 maxNrShortAmsduSubframes } /** @@ -124,9 +121,9 @@ module WlanInformationAPI_TypesAndValues { * @see ETSI GS MEC 028 Clause 6.5.18 Type: EdmgCapabilities */ type record EdmgCapabilities { - UInt8 ampduParameters, - UInt16 trnParameters, - UInt32 supportedMcs + Json.UInt8 ampduParameters, + Json.UInt16 trnParameters, + Json.UInteger supportedMcs } /** @@ -157,12 +154,12 @@ module WlanInformationAPI_TypesAndValues { * @see ETSI GS MEC 028 Clause 6.5.6 Type: WanMetrics */ type record WanMetrics { - UInt8 wanInfo, - UInt32 downlinkSpeed, - UInt32 uplinkSpeed, - UInt8 downlinkLoad, - UInt8 uplinkLoad, - UInt16 lmd + Json.UInt8 wanInfo, + Json.UInteger downlinkSpeed, + Json.UInteger uplinkSpeed, + Json.UInt8 downlinkLoad, + Json.UInt8 uplinkLoad, + Json.UInt16 lmd } /** @@ -173,9 +170,9 @@ module WlanInformationAPI_TypesAndValues { * @see ETSI GS MEC 028 Clause 6.5.7 Type: BssLoad */ type record BssLoad { - UInt16 staCount, - UInt8 channelUtilization, - UInt16 availAdmCap + Json.UInt16 staCount, + Json.UInt8 channelUtilization, + Json.UInt16 availAdmCap } /** @@ -188,11 +185,11 @@ module WlanInformationAPI_TypesAndValues { * @see ETSI GS MEC 028 Clause 6.5.8 Type: ExtBssLoad */ type record ExtBssLoad { - UInt16 muMimoStaCount, - UInt8 spatStreamUnderUtil, - UInt8 obsSec20MhzUtil, - UInt8 obsSec40MhzUtil, - UInt8 obsSec80MhzUtil + Json.UInt16 muMimoStaCount, + Json.UInt8 spatStreamUnderUtil, + Json.UInt8 obsSec20MhzUtil, + Json.UInt8 obsSec40MhzUtil, + Json.UInt8 obsSec80MhzUtil } /** @@ -208,14 +205,14 @@ module WlanInformationAPI_TypesAndValues { * @see ETSI GS MEC 028 Clause 6.5.19 Type: GeoLocation */ type record GeoLocation { - UInt8 latUncertainty, - UInt64 lat, - UInt8 longUncertainty, - UInt64 long, - UInt8 altitudeType optional, - UInt8 altitudeUncertainty optional, - UInt32 altitude optional, - UInt8 datum + Json.UInt8 latUncertainty, + Json.UInteger lat, + Json.UInt8 longUncertainty, + Json.UInteger long, + Json.UInt8 altitudeType optional, + Json.UInt8 altitudeUncertainty optional, + Json.UInteger altitude optional, + Json.UInt8 datum } /** @@ -335,11 +332,11 @@ module WlanInformationAPI_TypesAndValues { StaIdentity staId, Json.String measurementId, Json.String bssid, - UInt32 bssidInfo, - UInt8 operatingClass, - UInt8 channel, - UInt8 phyType, - UInt8 bssTransitionCandidatePreference optional + Json.UInteger bssidInfo, + Json.UInt8 operatingClass, + Json.UInt8 channel, + Json.UInt8 phyType, + Json.UInt8 bssTransitionCandidatePreference optional } type record of NeighborReportItem NeighborReport; @@ -413,10 +410,10 @@ module WlanInformationAPI_TypesAndValues { type record ChannelLoadItem { StaIdentity staId optional, Json.String measurementId, - UInt8 operatingClass, - UInt8 channel, - UInt8 measurementDuration, - UInt8 channelLoad + Json.UInt8 operatingClass, + Json.UInt8 channel, + Json.UInt8 measurementDuration, + Json.UInt8 channelLoad } type record of ChannelLoadItem ChannelLoad; @@ -430,11 +427,11 @@ module WlanInformationAPI_TypesAndValues { * @see ETSI GS MEC 028 Clause 6.5.40 Type: OBssLoad */ type record OBssLoad { - UInt16 allocatedTrafficSelfMean, - UInt16 allocatedTrafficSelfStdDev optional, - UInt16 allocatedTrafficShareMean, - UInt16 allocatedTrafficShareStdDev optional, - UInt8 overlap optional + Json.UInt16 allocatedTrafficSelfMean, + Json.UInt16 allocatedTrafficSelfStdDev optional, + Json.UInt16 allocatedTrafficShareMean, + Json.UInt16 allocatedTrafficShareStdDev optional, + Json.UInt8 overlap optional } /** @@ -459,8 +456,8 @@ module WlanInformationAPI_TypesAndValues { * @see ETSI GS MEC 028 Clause 6.5.41 Type: MeasurementInfo */ type record MeasurementInfo { - UInt16 measurementDuration optional, - UInt16 randomInterval optional, + Json.UInt16 measurementDuration optional, + Json.UInt16 randomInterval optional, ChannelLoadConfig channelLoadConf optional, BeaconRequestConfig beaconRequestConf optional, StaStatisticsConfig staStatisticsConf optional, @@ -480,13 +477,13 @@ module WlanInformationAPI_TypesAndValues { * @see ETSI GS MEC 028 Clause 6.5.34 Type: StaStatisticsGroupZeroData */ type record StaStatisticsGroupZeroData { - UInt32 transmittedFragmentCount, - UInt32 groupTransmittedFrameCount, - UInt32 failedCount, - UInt32 receivedFragmentCount, - UInt32 groupReceivedFrameCount, - UInt32 fcsErrorCount, - UInt32 transmittedFrameCount, + Json.UInteger transmittedFragmentCount, + Json.UInteger groupTransmittedFrameCount, + Json.UInteger failedCount, + Json.UInteger receivedFragmentCount, + Json.UInteger groupReceivedFrameCount, + Json.UInteger fcsErrorCount, + Json.UInteger transmittedFrameCount, ReportingReasonStaCounters reportingReasonStaCounters optional } @@ -502,12 +499,12 @@ module WlanInformationAPI_TypesAndValues { * @see ETSI GS MEC 028 Clause 6.5.35-1: Attributes of the StaStatisticsGroupOneData */ type record StaStatisticsGroupOneData { - UInt32 retryCount, - UInt32 multipleRetryCount, - UInt32 frameDuplicateCount, - UInt32 rtsSuccessCount, - UInt32 rtsFailureCount, - UInt32 ackFailureCount, + Json.UInteger retryCount, + Json.UInteger multipleRetryCount, + Json.UInteger frameDuplicateCount, + Json.UInteger rtsSuccessCount, + Json.UInteger rtsFailureCount, + Json.UInteger ackFailureCount, ReportingReasonStaCounters reportingReasonStaCounters optional } @@ -531,19 +528,19 @@ module WlanInformationAPI_TypesAndValues { * @see ETSI GS MEC 028 Clause 6.5.36-1: Attributes of the StaStatisticsGroup2to9Data */ type record StaStatisticsGroup2to9Data { - UInt32 qosTransmittedFragmentCount, - UInt32 qosFailedCount, - UInt32 qosRetryCount, - UInt32 qosMultipleRetryCount, - UInt32 qosFrameDuplicateCount, - UInt32 qosRTSSuccessCount, - UInt32 qosRTSFailureCount, - UInt32 qosAckFailureCount, - UInt32 qosReceivedFragmentCount, - UInt32 qosTransmittedFrameCount, - UInt32 qosDiscardedFrameCount, - UInt32 qosMPDUsReceivedCount, - UInt32 qosRetriesReceivedCount, + Json.UInteger qosTransmittedFragmentCount, + Json.UInteger qosFailedCount, + Json.UInteger qosRetryCount, + Json.UInteger qosMultipleRetryCount, + Json.UInteger qosFrameDuplicateCount, + Json.UInteger qosRTSSuccessCount, + Json.UInteger qosRTSFailureCount, + Json.UInteger qosAckFailureCount, + Json.UInteger qosReceivedFragmentCount, + Json.UInteger qosTransmittedFrameCount, + Json.UInteger qosDiscardedFrameCount, + Json.UInteger qosMPDUsReceivedCount, + Json.UInteger qosRetriesReceivedCount, ReportingReasonQoSCounters reportingReasonQoSCounters optional } @@ -562,12 +559,12 @@ module WlanInformationAPI_TypesAndValues { StaIdentity staId optional, Json.String measurementId, Json.String measurementDuration, - UInt8 groupIdentity, + Json.UInt8 groupIdentity, StaStatisticsGroupZeroData groupZeroData optional, StaStatisticsGroupOneData groupOneData optional, StaStatisticsGroup2to9Data group2to9Data optional } - type UInt8 StatisticsGroupData; // Note defined, see ETSI GS MEC 028 Clause 6.5.13 Type: StaStatistics + type Json.UInt8 StatisticsGroupData; // Note defined, see ETSI GS MEC 028 Clause 6.5.13 Type: StaStatistics /** * @desc Information on the Received Signal Strength Indicator (RSSI) of a client station @@ -575,7 +572,7 @@ module WlanInformationAPI_TypesAndValues { * @see ETSI GS MEC 028 Clause 6.5.21 Type: Rssi */ type record Rssi { - UInt8 rssi + Json.UInt8 rssi } /** @@ -587,8 +584,8 @@ module WlanInformationAPI_TypesAndValues { */ type record StaDataRate { StaIdentity staId optional, - UInt32 staLastDataDownlinkRate optional, - UInt32 staLastDataUplinkRate optional + Json.UInteger staLastDataDownlinkRate optional, + Json.UInteger staLastDataUplinkRate optional } type record of StaDataRate StaDataRates; @@ -616,8 +613,8 @@ module WlanInformationAPI_TypesAndValues { */ type record ChannelLoadConfig { ApIdentity apId, - UInt32 cChannelId, - UInt32 channelLoad + Json.UInteger cChannelId, + Json.UInteger channelLoad } /** @@ -632,11 +629,11 @@ module WlanInformationAPI_TypesAndValues { */ type record BeaconRequestConfig { StaIdentity staId, - UInt32 channelId, - UInt32 measurementMode, + Json.UInteger channelId, + Json.UInteger measurementMode, BssIds bssId, SsIds ssId optional, - UInt32 reportingCondition + Json.UInteger reportingCondition } type record of Json.String BssIds; type record of Json.String SsIds; @@ -652,10 +649,10 @@ module WlanInformationAPI_TypesAndValues { */ type record StaStatisticsConfig { StaIdentity staId, - UInt32 groupIdentity, + Json.UInteger groupIdentity, boolean triggeredReport, - UInt32 triggerTimeout, - UInt16 triggerCondition + Json.UInteger triggerTimeout, + Json.UInt16 triggerCondition } /** @@ -669,7 +666,7 @@ module WlanInformationAPI_TypesAndValues { type record BeaconReportItem { StaIdentity staId, Json.String measurementId, - UInt32 channelId, + Json.UInteger channelId, BssIds bssId, SsIds ssId optional } @@ -690,7 +687,7 @@ module WlanInformationAPI_TypesAndValues { type record ApInfo { TimeStamp timeStamp optional, ApIdentity apId, - UInt32 channel optional, + Json.UInteger channel optional, WlanCapabilities wlanCap optional, WanMetrics wanMetrics optional, BssLoad bssLoad optional, @@ -717,7 +714,7 @@ module WlanInformationAPI_TypesAndValues { type record StaInfo { TimeStamp timeStamp optional, StaIdentity staId, - UInt32 channel optional, + Json.UInteger channel optional, ApAssociated apAssociated optional, Rssi rssi optional, StaDataRate staDataRate optional, @@ -771,8 +768,8 @@ module WlanInformationAPI_TypesAndValues { * @see ETSI GS MEC 028 Clause 6.3.3 Type: StaDataRateSubscription */ type record NotificationEvent { - UInt8 trigger_, - UInt8 threshold + Json.UInt8 trigger_, + Json.UInt8 threshold } with { variant (trigger_) "name as 'trigger'"; } @@ -797,7 +794,7 @@ module WlanInformationAPI_TypesAndValues { WebsockNotifConfig websockNotifConfig optional, LinkTypes links optional, ApIdentity apId, - UInt8 notificationPeriod optional, + Json.UInt8 notificationPeriod optional, NotificationEvent notificationEvent optional, TimeStamp expiryDeadline optional } with { @@ -825,7 +822,7 @@ module WlanInformationAPI_TypesAndValues { WebsockNotifConfig websockNotifConfig optional, LinkTypes links optional, StaIdentities staId, - UInt8 notificationPeriod optional, + Json.UInt8 notificationPeriod optional, NotificationEvent notificationEvent optional, TimeStamp expiryDeadline optional } with { diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index 75ff0a7..1e1312f 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -38,11 +38,8 @@ module LibHttp_JsonMessageBodyTypes { AccessPointList accessPointList, UserTrackingSubscription userTrackingSubscription, PeriodicTrackingSubscription periodicTrackingSubscription, - ZonalTrafficSubscription zonalTrafficSubscription, CircleNotificationSubscription circleNotificationSubscription, TerminalDistance terminalDistance, - DistanceNotificationSubscription distanceNotificationSubscription, - PeriodicNotificationSubscription periodicNotificationSubscription, LibMec_TypesAndValues.ProblemDetails problemDetails, UeIdentityTagInfo ueIdentityTagInfo, RnisAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList, -- GitLab From 673418dca9b800e8d5f686cd5a0d87d118c2c2a4 Mon Sep 17 00:00:00 2001 From: YannGarcia Date: Wed, 17 May 2023 10:49:50 +0200 Subject: [PATCH 07/58] Review typing for MEC 014 --- titan-test-system-framework | 2 +- .../ttcn/UEidentityAPI_TypesAndValues.ttcn | 15 ++++++--------- .../ttcn/LibHttp_JsonMessageBodyTypes.ttcn | 1 - .../ttcn/LibHttp_JsonTemplates.ttcn | 12 ------------ 4 files changed, 7 insertions(+), 23 deletions(-) diff --git a/titan-test-system-framework b/titan-test-system-framework index 163d1cf..554d6b6 160000 --- a/titan-test-system-framework +++ b/titan-test-system-framework @@ -1 +1 @@ -Subproject commit 163d1cfca22b18ceb1d7e24380f46f7fbaa53a97 +Subproject commit 554d6b6b3ce1e51d88267a3c946cd30caac97a55 diff --git a/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn index 14e9cb1..0bc3c96 100644 --- a/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn @@ -1,5 +1,5 @@ /** - * @author ETSI / STF569 + * @author ETSI / STF569 / TTF T027 * @version $URL$ * $Id$ * @desc Module containing types and values for UeIdentiyAPI protocol @@ -13,13 +13,10 @@ module UEidentityAPI_TypesAndValues { // JSON import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; - /** * @desc Information of UE identity tag used in UE Identity feature * @member ueIdentityTags 1 to N tags presented by a ME Application instance to a ME Platform - * @see ETSI GS MEC 014 Clause 7.2 Global definitions and resource structure + * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type record UeIdentityTagInfo { UeIdentityTags ueIdentityTags @@ -27,13 +24,13 @@ module UEidentityAPI_TypesAndValues { /** * @desc Specific tag presented by a ME Application instance to a ME Platform - * @see ETSI GS MEC 014 Clause 6.2.2 Type: UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type Json.String UeIdentityTag; /** * @desc Status of the resource ueIdentityTagInfo - * @see ETSI GS MEC 014 Clause 6.2.2 Type: UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type enumerated State { UNREGISTERED, @@ -45,7 +42,7 @@ module UEidentityAPI_TypesAndValues { * @desc ME Application instance to a ME Platform * @member ueIdentityTag Specific tag presented by a ME Application instance to a ME Platform * @member state Status of the resource ueIdentityTagInfo - * @see ETSI GS MEC 014 Clause 6.2.2 Type: UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type record UeIdentityTagItem { Json.String ueIdentityTag, @@ -54,7 +51,7 @@ module UEidentityAPI_TypesAndValues { /** * @desc 1 to N tags presented by a ME Application instance to a ME Platform - * @see ETSI GS MEC 014 Clause 6.2.2 Type: UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type record of UeIdentityTagItem UeIdentityTags; diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index 1e1312f..7d0d715 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -38,7 +38,6 @@ module LibHttp_JsonMessageBodyTypes { AccessPointList accessPointList, UserTrackingSubscription userTrackingSubscription, PeriodicTrackingSubscription periodicTrackingSubscription, - CircleNotificationSubscription circleNotificationSubscription, TerminalDistance terminalDistance, LibMec_TypesAndValues.ProblemDetails problemDetails, UeIdentityTagInfo ueIdentityTagInfo, diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn index b63663e..660b1a0 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -429,18 +429,6 @@ group ams_api { periodicTrackingSubscription := p_periodic_tracking_subscription } // End of template mw_body_json_periodic_rtracking_subscription - template (value) JsonBody m_body_json_circle_notification_subscription( - in template (value) CircleNotificationSubscription p_circle_notification_subscription - ) := { - circleNotificationSubscription := p_circle_notification_subscription - } // End of template m_body_json_circle_notification_subscription - - template (present) JsonBody mw_body_json_circle_notification_subscription( - template (present) CircleNotificationSubscription p_circle_notification_subscription := ? - ) := { - circleNotificationSubscription := p_circle_notification_subscription - } // End of template mw_body_json_circle_notification_subscription - template (value) JsonBody m_body_json_terminal_distance( in template (value) TerminalDistance p_terminal_distance ) := { -- GitLab From 401ba139cb07542c8914d4836d68a56e08632c54 Mon Sep 17 00:00:00 2001 From: YannGarcia Date: Wed, 17 May 2023 11:20:31 +0200 Subject: [PATCH 08/58] Review typing for MEC 016 --- ...pplicationInterfaceAPI_TypesAndValues.ttcn | 328 +++++++++--------- .../ttcn/UEidentityAPI_TypesAndValues.ttcn | 2 +- 2 files changed, 172 insertions(+), 158 deletions(-) diff --git a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn index 07bb4c7..fd3a04d 100644 --- a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn @@ -1,5 +1,5 @@ /** - * @author ETSI / TTF T012 + * @author ETSI / TTF T012 / TTF T027 * @version $Url$ * $Id$ * @desc Types ANd Values for ETSI GS MEC 016 V2.2.1 (2020-04) @@ -14,84 +14,26 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { // JSON import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; - - /** - * @desc Required service continuity mode for this application. - */ - type enumerated ServiceCount { - SERVICE_CONTINUITY_NOT_REQUIRED (0), - SERVICE_CONTINUITY_REQUIRED (1) - } with { - variant "JSON: as number" - } - /** - * @desc Characteristics of the application - * @member memory The maximum size in Mbytes of the memory resource expected to be used by the MEC application instance in the MEC system - * @member storageThe maximum size in Mbytes of the storage resource expected to be used by the MEC application instance in the MEC system - * @member latency The target round trip time in milliseconds supported by the MEC system for the MEC application instance - * @member bandwidth The required connection bandwidth in kbit/s for the use of the MEC application instance - * @member serviceCont Required service continuity mode for this application - * @see ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList - */ - type record AppCharcs { - UInt32 memory optional, - UInt32 storage optional, - UInt32 latency optional, - UInt32 bandwidth optional, - ServiceCount serviceCont optional - } - - /** - * @desc elements comprising the civic address - * @member caType Describe the content type of caValue. The value of caType shall comply with section 3.4 of IETF RFC 4776 - * @member caValue Content of civic address element corresponding to the caType. The format caValue shall comply with section 3.4 of IETF RFC 4776 + * @desc Information on available applications + * @member appList List of user applications available to the device application + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList */ - type record CivicAddressElement { - Json.Integer caType, - Json.String caValue - } - - type record Geometry { - Json.String type_, - Coordinates coordinates - } with { - variant (type_) "name as 'type'"; - } - type record of Json.Number Coordinate; - type record of Coordinate Coordinates; - type record Property { - Json.String key, - Json.String value_ - } with { - variant (value_) "name as 'value'"; - } - type record of Property Properties; - type record Polygon { - Json.String type_, - Geometry geometry, - Properties properties, - Json.String this_ - } with { - variant (type_) "name as 'type'"; - variant (this_) "name as 'this'"; + type record ApplicationList { + AppList appList optional } /** - * @desc Identifies the locations of the MEC application - * @member countryCode The two-letter ISO 3166 [7] country code in capital letters. Shall be present in case the "area" attribute is absent - * @member civicAddressElement Zero or more elements comprising the civic address - * @member area Geographic area. Shall be absent if the "civicAddressElement" attribute is present - * @see ETSI GS MEC 016 Clause 6.5.2 Type: LocationConstraints + * @desc Information on available applications + * @member appInfo List of user applications available to the device application + * @member vendorSpecificExt Extension for vendor specific information + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList */ - type record LocationConstraints { - Json.String countryCode optional, - CivicAddressElement civicAddressElement optional, - Polygon area optional + type record AppListItem { + ApplicationList_AppInfo appInfo, + VendorSpecificExt vendorSpecificExt optional } - type record of LocationConstraints LocationConstraintsList; + type record of AppListItem AppList; /** * @desc Information on available applications @@ -103,61 +45,74 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member appDescription Human readable description of the MEC application * @member appLocation Identifies the locations of the MEC application * @member appCharcs Characteristics of the application - * @see ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList */ type record ApplicationList_AppInfo { - Json.String appDId, - Json.String appName, - Json.String appProvider, - Json.String appSoftVersion optional, - Json.String appDVersion, - Json.String appDescription optional, + Json.String appDId, + Json.String appName, + Json.String appProvider, + Json.String appSoftVersion optional, + Json.String appDVersion, + Json.String appDescription optional, LocationConstraintsList appLocation optional, - AppCharcs appCharcs optional + AppCharcs appCharcs optional } /** * @desc Extension for vendor specific information * @member vendorId Vendor identifier + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList */ type record VendorSpecificExt { Json.String vendorId } /** - * @desc Information on available applications - * @member appInfo List of user applications available to the device application - * @member vendorSpecificExt Extension for vendor specific information - * @see ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList + * @desc Characteristics of the application + * @member memory The maximum size in Mbytes of the memory resource expected to be used by the MEC application instance in the MEC system + * @member storageThe maximum size in Mbytes of the storage resource expected to be used by the MEC application instance in the MEC system + * @member latency The target round trip time in milliseconds supported by the MEC system for the MEC application instance + * @member bandwidth The required connection bandwidth in kbit/s for the use of the MEC application instance + * @member serviceCont Required service continuity mode for this application + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList */ - type record AppListItem { - ApplicationList_AppInfo appInfo, - VendorSpecificExt vendorSpecificExt optional + type record AppCharcs { + Json.UInteger memory optional, + Json.UInteger storage optional, + Json.UInteger latency optional, + Json.UInteger bandwidth optional, + ServiceCount serviceCont optional } - type record of AppListItem AppList; /** - * @desc Information on available applications - * @member appList List of user applications available to the device application - * @see ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList + * @desc Required service continuity mode for this application + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList */ - type record ApplicationList { - AppList appList optional + type enumerated ServiceCount { + SERVICE_CONTINUITY_NOT_REQUIRED (0), + SERVICE_CONTINUITY_REQUIRED (1) + } with { + variant "JSON: as number" } /** - * @desc user application instance information - * @member appInstanceId Identifier of the user application instance - * @member referenceURI Address of the user application instance - * @member appLocation Location of the user application instance - * @see ETSI GS MEC 016 Clause 6.2.3 Type: AppContext + * @desc Information on application context created by the MEC system + * @member contextId Uniquely identifies the application context in the MEC system + * @member associateDevAppId Uniquely identifies the device application + * @member callbackReference Assigned by the device application to receive application lifecycle related notifications + * @member appLocationUpdates Used by the device application to request to receive notifications at the callbackReference URI relating to location availability for user application instantiation + * @member appAutoInstantiation Provides indication to the MEC system that instantiation of the requested application is desired should a requested appLocation become available that was not at the time of the request + * @member appInfo + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.3 Type: AppContext */ - type record UserAppInstanceInfo { - Json.String appInstanceId optional, - Json.AnyURI referenceURI optional, - LocationConstraints appLocation optional + type record AppContext { + Json.String contextId optional, + Json.String associateDevAppId, + Json.AnyURI callbackReference optional, + boolean appLocationUpdates optional, + boolean appAutoInstantiation optional, + ApplicationContext_AppInfo appInfo } - type record of UserAppInstanceInfo UserAppInstanceInfoList; /** * @desc Information on available applications @@ -169,48 +124,44 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member appDescription Human readable description of the MEC application * @member userAppInstanceInfo List of user application instance information * @member appPackageSource URI of the application package - * @see ETSI GS MEC 016 Clause 6.2.3 Type: AppContext + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.3 Type: AppContext */ type record ApplicationContext_AppInfo { - Json.String appDId, - Json.String appName, - Json.String appProvider, - Json.String appSoftVersion optional, - Json.String appDVersion, - Json.String appDescription optional, + Json.String appDId, + Json.String appName, + Json.String appProvider, + Json.String appSoftVersion optional, + Json.String appDVersion, + Json.String appDescription optional, UserAppInstanceInfoList userAppInstanceInfo optional, - Json.AnyURI appPackageSource optional + Json.AnyURI appPackageSource optional } /** - * @desc Information on application context created by the MEC system - * @member contextId Uniquely identifies the application context in the MEC system - * @member associateDevAppId Uniquely identifies the device application - * @member callbackReference Assigned by the device application to receive application lifecycle related notifications - * @member appLocationUpdates Used by the device application to request to receive notifications at the callbackReference URI relating to location availability for user application instantiation - * @member appAutoInstantiation Provides indication to the MEC system that instantiation of the requested application is desired should a requested appLocation become available that was not at the time of the request - * @member appInfo - * @see ETSI GS MEC 016 Clause 6.2.3 Type: AppContext + * @desc user application instance information + * @member appInstanceId Identifier of the user application instance + * @member referenceURI Address of the user application instance + * @member appLocation Location of the user application instance + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.3 Type: AppContext */ - type record AppContext { - Json.String contextId optional, - Json.String associateDevAppId, - Json.AnyURI callbackReference optional, - boolean appLocationUpdates optional, - boolean appAutoInstantiation optional, - ApplicationContext_AppInfo appInfo + type record UserAppInstanceInfo { + Json.String appInstanceId optional, + Json.AnyURI referenceURI optional, + LocationConstraints appLocation optional } + type record of UserAppInstanceInfo UserAppInstanceInfoList; /** - * @desc - * @member appLocation Shall only be included in the response, where it indicates a location constraint available in the MEC system - - * @see ETSI GS MEC 016 Clause 6.2.4 Type: ApplicationLocationAvailability + * @desc Information on locations available instantiation of new user application instances + * @member associateDevAppId Uniquely identifies the device application + * @member appInfo + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.4 Type: ApplicationLocationAvailability */ - type record AvailableLocations { - LocationConstraints appLocation optional + type record ApplicationLocationAvailability { + Json.String associateDevAppId, + ApplicationLocationAvailability_AppInfo appInfo } - type record of AvailableLocations AvailableLocationsList; + /** * @desc * @member appDId Identifier of this MEC application descriptor @@ -221,29 +172,28 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member appDescription Human readable description of the MEC application * @member availableLocations MEC application location constraints * @member appPackageSource URI of the application package. Shall be included in the request - * @see ETSI GS MEC 016 Clause 6.2.4 Type: ApplicationLocationAvailability + * @seeETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.4 Type: ApplicationLocationAvailability */ type record ApplicationLocationAvailability_AppInfo { - Json.String appDId, - Json.String appName, - Json.String appProvider, - Json.String appSoftVersion optional, - Json.String appDVersion, - Json.String appDescription optional, + Json.String appDId, + Json.String appName, + Json.String appProvider, + Json.String appSoftVersion optional, + Json.String appDVersion, + Json.String appDescription optional, AvailableLocationsList availableLocations optional, - Json.AnyURI appPackageSource optional + Json.AnyURI appPackageSource optional } /** - * @desc Information on locations available instantiation of new user application instances - * @member associateDevAppId Uniquely identifies the device application - * @member appInfo - * @see ETSI GS MEC 016 Clause 6.2.4 Type: ApplicationLocationAvailability + * @desc + * @member appLocation Shall only be included in the response, where it indicates a location constraint available in the MEC system + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.4 Type: ApplicationLocationAvailability */ - type record ApplicationLocationAvailability { - Json.String associateDevAppId, - ApplicationLocationAvailability_AppInfo appInfo + type record AvailableLocations { + LocationConstraints appLocation optional } + type record of AvailableLocations AvailableLocationsList; /** * @desc Notification from the UALCMP regarding a change in address of a user application instance @@ -251,7 +201,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member contextId Uniquely identifies the application context in the MEC system * @member appInstanceId Identifier of the user application instance * @member referenceURI Address of the user application. Used as the reference URI for the application - * @see ETSI GS MEC 016 Clause 6.4.2 Type: AddressChangeNotification + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.2 Type: AddressChangeNotification */ type record AddressChangeNotification { Json.String notificationType, @@ -262,9 +212,9 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { /** * @desc Notification from the UALCMP regarding the deletion of an application context by the MEC system - * @member notificationType Shall be set to "AddressChangeNotification" + * @member notificationType Shall be set to "ApplicationContextDeleteNotification" * @member contextId Uniquely identifies the application context in the MEC system - * @see ETSI GS MEC 016 Clause 6.4.3 Type: ApplicationContextDeleteNotification + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.3 Type: ApplicationContextDeleteNotification */ type record ApplicationContextDeleteNotification { Json.String notificationType, @@ -273,10 +223,10 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { /** * @desc Notification from the UALCMP regarding an update to an application change by the MEC system - * @member notificationType Shall be set to "AddressChangeNotification" + * @member notificationType Shall be set to "ApplicationContextUpdateNotification" * @member contextId Uniquely identifies the application context in the MEC system * @member userAppInstanceInfo List of user application instance information - * @see ETSI GS MEC 016 Clause 6.4.4 Type: ApplicationContextDeleteNotification + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.4 Type: ApplicationContextUpdateNotification */ type record ApplicationContextUpdateNotification { Json.String notificationType, @@ -286,17 +236,81 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { /** * @desc Notification from the UALCMP regarding the availability of a location that was requested in the Application context create that could not be fulfilled at the time of the request - * @member notificationType Shall be set to "AddressChangeNotification" + * @member notificationType Shall be set to "ApplicationLocationAvailabilityNotification" * @member contextId Uniquely identifies the application context in the MEC system * @member availableLocations Locations available to the MEC application - * @see ETSI GS MEC 016 Clause 6.4.5 Type: ApplicationLocationAvailabilityNotification + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.5 Type: ApplicationLocationAvailabilityNotification */ type record ApplicationLocationAvailabilityNotification { - Json.String notificationType, - Json.String contextId, + Json.String notificationType, + Json.String contextId, AvailableLocationsList availableLocations } + /** + * @desc Identifies the locations of the MEC application + * @member countryCode The two-letter ISO 3166 [7] country code in capital letters. Shall be present in case the "area" attribute is absent + * @member civicAddressElement Zero or more elements comprising the civic address + * @member area Geographic area. Shall be absent if the "civicAddressElement" attribute is present + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + */ + type record LocationConstraints { + Json.String countryCode optional, + CivicAddressElement civicAddressElement optional, + Polygon area optional + } + type record of LocationConstraints LocationConstraintsList; + + /** + * @desc Elements comprising the civic address + * @member caType Describe the content type of caValue. The value of caType shall comply with section 3.4 of IETF RFC 4776 + * @member caValue Content of civic address element corresponding to the caType. The format caValue shall comply with section 3.4 of IETF RFC 4776 + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + */ + type record CivicAddressElement { + Json.Integer caType, + Json.String caValue + } + + /** + * @desc + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + */ + type record Polygon { + Json.String type_, + Geometry geometry, + Properties properties, + Json.String this_ + } with { + variant (type_) "name as 'type'"; + variant (this_) "name as 'this'"; + } + + /** + * @desc + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + */ + type record Geometry { + Json.String type_, + Coordinates coordinates + } with { + variant (type_) "name as 'type'"; + } + type record of Json.Number Coordinate; + type record of Coordinate Coordinates; + + /** + * @desc + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + */ + type record Property { + Json.String key, + Json.String value_ + } with { + variant (value_) "name as 'value'"; + } + type record of Property Properties; + } with { encode "JSON" } // End of module DeviceApplicationInterfaceAPI_TypesAndValues diff --git a/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn index 0bc3c96..5b1af3a 100644 --- a/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn @@ -2,7 +2,7 @@ * @author ETSI / STF569 / TTF T027 * @version $URL$ * $Id$ - * @desc Module containing types and values for UeIdentiyAPI protocol + * @desc Module containing types and values for ETSI GS MEC 014 V3.1.1 (2023-06) * @copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. -- GitLab From 18cf1f99eb543faf21a7776664dc2f307ec05a3f Mon Sep 17 00:00:00 2001 From: YannGarcia Date: Wed, 17 May 2023 12:58:38 +0200 Subject: [PATCH 09/58] Upgrade Dockerfile.stfubuntu with Ubuntu 20.04 --- virtualization/docker-dev/Dockerfile.stfubuntu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtualization/docker-dev/Dockerfile.stfubuntu b/virtualization/docker-dev/Dockerfile.stfubuntu index 337f237..57104b3 100644 --- a/virtualization/docker-dev/Dockerfile.stfubuntu +++ b/virtualization/docker-dev/Dockerfile.stfubuntu @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 MAINTAINER ETSI STF -- GitLab From 200f4f131fa212a5ce99bb06c583dc9bf3889927 Mon Sep 17 00:00:00 2001 From: YannGarcia Date: Mon, 22 May 2023 09:08:58 +0200 Subject: [PATCH 10/58] Review typing for MEC 021 --- ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn | 28 -- .../ApplicationMobilityServiceAPI/module.mk | 1 + ...tionMobilityServiceAPI_TypesAndValues.ttcn | 378 +++++++++++++++++- .../ttcn/LocationAPI_TypesAndValues.ttcn | 14 +- .../RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn | 2 +- 5 files changed, 382 insertions(+), 41 deletions(-) diff --git a/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn index dc4eb50..2ac176f 100644 --- a/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn +++ b/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn @@ -13,13 +13,6 @@ type record AppMobilityServiceInfo { String appMobilityServiceId } -type record of RegistrationInfo RegistrationInfos; -type record RegistrationInfo { - ServiceConsumerId serviceConsumerId, - DeviceInformations deviceInformation optional, - UInt32 expiryTime optional -} - type record RegistrationRequest { ServiceConsumerId serviceConsumerId, @@ -35,12 +28,6 @@ type record RegistrationRequestWithError { } -type record of ServiceConsumerId ServiceConsumerIds; -type record ServiceConsumerId { - String appInstanceId optional, - String mepId optional -} - type record ServiceConsumerIdWithError { String appId optional, String mepId optional @@ -53,11 +40,6 @@ type record ServiceConsumer { String mepId optional } -type record of DeviceInformation DeviceInformations; -type record DeviceInformation { - String associateId -} - type Json.AnyURI links; @@ -152,16 +134,6 @@ type record AdjacentAppInfoSubscription_ { } - /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type UInt32 Seconds; - - /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type UInt32 NanoSeconds; - // // // diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/module.mk b/ttcn/LibMec/ApplicationMobilityServiceAPI/module.mk index 46b5cab..f675678 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/module.mk +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/module.mk @@ -5,3 +5,4 @@ sources := \ ttcn/ApplicationMobilityServiceAPI_Templates.ttcn \ ttcn/ApplicationMobilityServiceAPI_Functions.ttcn \ +modules := ../../RnisAPI diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn index 4c4bf95..47770e4 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn @@ -1,10 +1,313 @@ +/** + * @author ETSI / STF569 / TTF T027 + * @version $Url$ + * $Id$ + * @desc Types and Values for ETSI GS MEC 021 V3.1.1 (2023-10) + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + */ module ApplicationMobilityServiceAPI_TypesAndValues { // JSON import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; + // MEC 012 + import from RnisAPI_TypesAndValues all; + + /** + * @desc This data type represents the registration information used in the registration API of Application Mobility Service + * @member appMobilityServiceId The identifier of registered Application Mobility Service + * @member serviceConsumerId The identifier of service consumer requesting the Application Mobility Service + * @member deviceInformation Specifies the device served by the application instance which is registering the Application Mobility Service + * @member expiryTime Indicates the time of Application Mobility Service expiration from the time of registration accepted + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.2-1: Attributes of RegistrationInfo + */ + type record RegistrationInfo { + Json.String appMobilityServiceId + ServiceConsumerId serviceConsumerId, + DeviceInformation deviceInformation optional, + UInt32 expiryTime optional + } + type record of RegistrationInfo RegistrationInfos; + + /** + * @desc The identifier of service consumer requesting the Application Mobility Service + * @member appInstanceId Represents the identifier of the application instance registering the Application Mobility Service + * @member mepId Represents the identifier of the MEC platform registering the Application Mobility Service + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.2-1: Attributes of RegistrationInfo + */ + type record ServiceConsumerId { + Json.String appInstanceId optional, + Json.String mepId optional + } + type record of ServiceConsumerId ServiceConsumerIds; + + /** + * @desc Specifies the device served by the application instance which is registering the Application Mobility Service + * @member associateId Represents the identifier of the device + * @member appMobilityServiceLevel If the application is stateful, this attribute shall be included + * @member contextTransferState If present, it represents the state of transferring the user context to another application instance + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.2-1: Attributes of RegistrationInfo + */ + type record DeviceInformation_ { + Json.String associateId, + AppMobilityServiceLevel appMobilityServiceLevel optional, + ContextTransferState contextTransferState optional + } + type record of DeviceInformation_ DeviceInformation; + + /** + * @desc Represents the state of transferring the user context to another application instance + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.2-1: Attributes of RegistrationInfo + */ + type enumerated ContextTransferState { + NOT_TRANSFERRED, + USER_CONTEXT_TRANSFER_COMPLETED + } with { + variant "JSON: as number" + } + + /** + * @desc This data type represents the adjacent application instance information of the adjacent_app_instances resource + * @member appInstanceId Identifier of the application instance + * @member appDId Identifier of the application descriptor + * @member appInstanceCommLink It specifies the communication interface of application instance + * @member mecHostInformation The MEC host where the application instance is running on + * @member registeredInstanceId Identifier of the application instance that registers to the AMS, which is instantiated from the application descriptor identified by the attribute "appDId" + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.3-1: Attributes of AdjacentAppInstanceInfo + */ + type record AdjacentAppInstanceInfo { + Json.String appInstanceId, + Json.String appDId, + CommunicationInterface appInstanceCommLink, + MECHostInformation mecHostInformation optional, + Json.String registeredInstanceId optional + } + + /** + * @desc This type represents a subscription to mobility procedure notifications from AMS + * @member subscriptionType Shall be set to "MobilityProcedureSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteria List of filtering criteria for the subscription + * @member expiryDeadline Identifies a boundary after which the subscription will expire + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.2-1: Attributes of the MobilityProcedureSubscription + */ + type record MobilityProcedureSubscription { + SubscriptionType subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteria filterCriteria, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + type record of MobilityProcedureSubscription MobilityProcedureSubscriptions; + + /** + * @desc Hyperlink related to the resource + * @member self_ Self-referring URI + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.2-1: Attributes of the MobilityProcedureSubscription + */ + type record Links { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + /** + * @desc List of filtering criteria for the subscription + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.2-1: Attributes of the MobilityProcedureSubscription + */ + type record FilterCriteria { + Json.String appInstanceId optional, + AssociateIdList associateId optional, + MobilityStatusType mobilityStatus + } + type record of FilterCriteria FilterCriterias; + + /** + * @desc This type represents a subscription to notification about the change on adjacent application instance information from AMS + * @member subscriptionType Shall be set to "AdjacentAppInfoSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteria List of filtering criteria for the subscription + * @member expiryDeadline Identifies a boundary after which the subscription will expire + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.3-1: Attributes of the AdjacentAppInfoSubscription + */ + type record AdjacentAppInfoSubscription { + SubscriptionType subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + AdjacentFilterCriteria filterCriteria, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + type record of AdjacentAppInfoSubscription AdjacentAppInfoSubscriptions; + + /** + * @desc List of filtering criteria for the subscription + * @member appInstanceId Identifier of the application instance that registers to the Application Mobility Service + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.3-1: Attributes of the AdjacentAppInfoSubscription + */ + type record AdjacentFilterCriteria { + Json.String appInstanceId optional + } + + /** + * @desc This type represents a list of links related to currently existing subscriptions for the service consumer + * @member links The URI referring to the subscription + * @member subscription The service consumer's subscriptions + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.4-1: Attributes of the SubscriptionLinkList + */ + type record SubscriptionLinkList { + Links links, + Subscription subscription + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc The service consumer's subscriptions + * @member href The URI referring to the subscription + * @member subscriptionType Type of the subscription + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.4-1: Attributes of the SubscriptionLinkList + */ + type record Subscription { + Json.AnyURI href, + Json.String subscriptionType + } + + /** + * @desc This type represents a notification from AMS with regards to mobility procedure + * @member notificationType Shall be set to "MobilityProcedureNotification" + * @member timeStamp Date and time of the generation of the notification + * @member associateId 1 to N identifiers to associate the information for specific UE(s) and flow(s) + * @member mobilityStatus Indicate the status of the UE mobility + * @member targetAppInfo Identifiers to associate the information of target application instance + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.2-1: Attributes of the MobilityProcedureNotification + */ + type record MobilityProcedureNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + AssociateId associateId, + MobilityStatus mobilityStatus, + TargetAppInfo targetAppInfo optional, + Links_Notification links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Identifiers to associate the information of target application instance + * @member appInstanceId Identifiers of the target application instance + * @member CommunicationInterface It specifies the communication interface of the application instance + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.2-1: Attributes of the MobilityProcedureNotification + */ + type record TargetAppInfo { + Json.String appInstanceId String 1 . + CommunicationInterface commInterface optional + } + + /** + * @desc Indicate the status of the UE mobility + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.2-1: Attributes of the MobilityProcedureNotification + */ + type enumerated MobilityStatus { + INTERHOST_MOVEOUT_TRIGGERED (1), + INTERHOST_MOVEOUT_COMPLETED (2), + INTERHOST_MOVEOUT_FAILED (3) + } with { + variant "JSON: as number" + } + + /** + * @desc Object containing hyperlinks related to the resource + * @member subscription Link to the related subscription + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.2-1: Attributes of the MobilityProcedureNotification + */ + type record Links_Notification { + LinkType subscription + } + + /** + * @desc This type represents a notification from AMS with regards to change on adjacent application instances information + * @member notificationType Shall be set to "MobilityProcedureNotification" + * @member timeStamp Date and time of the generation of the notification + * @member adjacentAppInfo 0 to N identifiers to associate the information for adjacent application instances + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.3-1: Attributes of the AdjacentAppInfoNotification + */ + type record AdjacentAppInfoNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + AdjacentAppInfo adjacentAppInfo optional, + Links_Notification links + } with { + variant (links) "name as '_links'"; + } + + type record of TargetAppInfo AdjacentAppInfo; + + /** + * @desc This data type represents a notification from AMS with regards to expiry of the existing subscription + * @member notificationType Shall be set to "ExpiryNotification" + * @member timeStamp Date and time of the generation of the notification + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.4-1: Attributes of the ExpiryNotification + */ + type record ExpiryNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Links_Notification links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This data type represents the Application Mobility Service level information used in the Application Mobility Service APIs + * @member appMobilityServiceLevel Provides an option for the application instance (server) to communicate with the application client before relocating this application instance to another MEC host + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.5-1: Attributes of AppMobilityServiceLevel + */ + type record AppMobilityServiceLevel { + AppMobilityServiceLevelEnmu appMobilityServiceLevel + } + + /** + * @desc Provides an option for the application instance (server) to communicate with the application client before relocating this application instance to another MEC host + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.5-1: Attributes of AppMobilityServiceLevel + */ + type enumerated AppMobilityServiceLevelEnmu { + APP_MOBILITY_NOT_ALLOWED (1), + APP_MOBILITY_WITH_CONFIRMATION (2), + APP_MOBILITY_WITHOUT_CONFIRMATION (3) + } with { + variant "JSON: as number" + } + + /** + * @desc This data type represents a notification from AMS with regards to expiry of the existing subscription + * @member notificationType Shall be set to "TestNotification" + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.6-1: Attributes of the TestNotification + */ + type record TestNotification { + Json.String notificationType, + Links_Notification links + } with { + variant (links) "name as '_links'"; + } /** * @desc This type represents the communication interface of an application instance @@ -22,12 +325,77 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @see ETSI GS MEC 021 Clause 7.5.2 Type: CommunicationInterface */ type record IpAddress { - Json.String host, - UInt32 port_ + Json.String host, + Json.UInteger port_ } with { variant (port_) "name as 'port'"; } - type record length(1..infinity) of IpAddress IpAddresses; + /** + * @desc + * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @see ETSI GS MEC 021 Clause 7.5.3 Type: TimeStamp + */ + type record TimeStamp { + Seconds seconds, + NanoSeconds nanoSeconds + } + + /** + * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + */ + type Json.UInteger Seconds; + + /** + * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + */ + type Json.UInteger NanoSeconds; + + /** + * @desc This type represents a type of link + * @member href URI referring to a resource + * @see ETSI GS MEC 021 Clause 7.5.4 Type: LinkType + */ + type record LinkType { + Json.AnyURI href + } + + /** + * @desc The type represents the parameters of MEC host information + * @member hostName Human-readable name of MEC host + * @member hostId Deployment-specific information to identify a MEC host + * @see ETSI GS MEC 021 Table 7.5.5-1: Attributes of MECHostInformation + */ + type record IpAddress { + Json.String hostName optional, + KeyValuePairs hostId + } + + /** + * @desc This data type represents a list of key-value pairs + * @member key_name + * @member key_value + * @see ETSI GS MEC 010-2 Clause 6.2.5.3 Type: KeyValuePairs + */ + type record KeyValuePairs { + Json.String key_name, + anytype key_value // FIXME To be refined + } + + /** + * @desc This type represents configuration for the delivery of subscription notifications over Websockets + * @member websocketUri Set by location server to indicate to the service consumer the Websocket URI to be used for delivering notifications + * @member requestWebsocketUri Set to true by the service consumer to indicate that Websocket delivery is requested + * @see ETSI GS MEC 021 Clause 7.5.7 Type: WebsockNotifConfig + */ + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional + } + +} with { + extension "anytype integer, float, boolean, universal charstring"; + encode "JSON" } // End of module ApplicationMobilityServiceAPI_TypesAndValues diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn index 88a2afe..6f5c286 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn @@ -30,7 +30,7 @@ module LocationAPI_TypesAndValues { * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.2 Type: TimeStamp */ type record TimeStamp { - Seconds seconds, + Seconds seconds, NanoSeconds nanoSeconds } @@ -41,7 +41,7 @@ module LocationAPI_TypesAndValues { * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.5 Type: UserList */ type record UserList { - UserInfos user optional, + UserInfos user optional, ResourceURL resourceURL optional } type record of UserInfo UserInfos; @@ -54,7 +54,7 @@ module LocationAPI_TypesAndValues { */ type record WebsockNotifConfig { Json.AnyURI websocketUri optional, - Json.Bool requestWebsocketUri optional + Json.Bool requestWebsocketUri optional } /** @@ -65,10 +65,10 @@ module LocationAPI_TypesAndValues { * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.5 Type: UserEventPara */ type record UserEventPara { - Json.Bool reportingLocationReq optional, + Json.Bool reportingLocationReq optional, AccessPointList accessPointList optional, - ZoneId zoneId optional, - OccurrenceInfo occurrenceInfo optional + ZoneId zoneId optional, + OccurrenceInfo occurrenceInfo optional } // End of type UserEventPara @@ -179,7 +179,7 @@ module LocationAPI_TypesAndValues { ELLIPSOID_POINT_UNCERT_CIRCLE (5), ELLIPSOID_POINT_UNCERT_ELLIPSE (6), POLYGON (7) - } with { + } with { variant "JSON: as number" } diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn index 492846a..7915800 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn @@ -2,7 +2,7 @@ * @author ETSI / STF569 / TTF T027 * @version $Url$ * $Id$ - * @desc Types ANd Values for ETSI GS MEC 014 V2.2.1 (2022-02) + * @desc Types ANd Values for ETSI GS MEC 012 V2.2.1 (2022-02) * @copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. -- GitLab From 667b2e1d50399c1152c558c27ae6d243b7ce980e Mon Sep 17 00:00:00 2001 From: YannGarcia Date: Mon, 22 May 2023 09:15:24 +0200 Subject: [PATCH 11/58] Review typing for MEC 021 --- ttcn/LibMec/{Ams => Ams_ToBeRemoved}/module.mk | 0 .../{Ams => Ams_ToBeRemoved}/ttcn/Ams_EncdecDeclarations.ttcn | 0 ttcn/LibMec/{Ams => Ams_ToBeRemoved}/ttcn/Ams_Pics.ttcn | 0 ttcn/LibMec/{Ams => Ams_ToBeRemoved}/ttcn/Ams_Pixits.ttcn | 0 ttcn/LibMec/{Ams => Ams_ToBeRemoved}/ttcn/Ams_Templates.ttcn | 0 ttcn/LibMec/{Ams => Ams_ToBeRemoved}/ttcn/Ams_TypesAndValues.ttcn | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename ttcn/LibMec/{Ams => Ams_ToBeRemoved}/module.mk (100%) rename ttcn/LibMec/{Ams => Ams_ToBeRemoved}/ttcn/Ams_EncdecDeclarations.ttcn (100%) rename ttcn/LibMec/{Ams => Ams_ToBeRemoved}/ttcn/Ams_Pics.ttcn (100%) rename ttcn/LibMec/{Ams => Ams_ToBeRemoved}/ttcn/Ams_Pixits.ttcn (100%) rename ttcn/LibMec/{Ams => Ams_ToBeRemoved}/ttcn/Ams_Templates.ttcn (100%) rename ttcn/LibMec/{Ams => Ams_ToBeRemoved}/ttcn/Ams_TypesAndValues.ttcn (100%) diff --git a/ttcn/LibMec/Ams/module.mk b/ttcn/LibMec/Ams_ToBeRemoved/module.mk similarity index 100% rename from ttcn/LibMec/Ams/module.mk rename to ttcn/LibMec/Ams_ToBeRemoved/module.mk diff --git a/ttcn/LibMec/Ams/ttcn/Ams_EncdecDeclarations.ttcn b/ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_EncdecDeclarations.ttcn similarity index 100% rename from ttcn/LibMec/Ams/ttcn/Ams_EncdecDeclarations.ttcn rename to ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_EncdecDeclarations.ttcn diff --git a/ttcn/LibMec/Ams/ttcn/Ams_Pics.ttcn b/ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_Pics.ttcn similarity index 100% rename from ttcn/LibMec/Ams/ttcn/Ams_Pics.ttcn rename to ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_Pics.ttcn diff --git a/ttcn/LibMec/Ams/ttcn/Ams_Pixits.ttcn b/ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_Pixits.ttcn similarity index 100% rename from ttcn/LibMec/Ams/ttcn/Ams_Pixits.ttcn rename to ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_Pixits.ttcn diff --git a/ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn b/ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_Templates.ttcn similarity index 100% rename from ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn rename to ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_Templates.ttcn diff --git a/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn b/ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_TypesAndValues.ttcn similarity index 100% rename from ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn rename to ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_TypesAndValues.ttcn -- GitLab From e859d41290a09fc1ffa6c5598987e145830c8c69 Mon Sep 17 00:00:00 2001 From: YannGarcia Date: Mon, 22 May 2023 14:07:53 +0200 Subject: [PATCH 12/58] Review typing for MEC 028 --- ttcn/AtsMec_Rnis/module.mk | 1 - .../ApplicationMobilityServiceAPI/module.mk | 2 +- ...tionMobilityServiceAPI_TypesAndValues.ttcn | 33 +- ...ormApplicationEnablementAPI_Templates.ttcn | 2 + .../ttcn/LocationAPI_Templates.ttcn | 2 + .../RnisAPI/ttcn/RnisAPI_Templates.ttcn | 170 +- .../RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn | 2 +- .../ttcn/TrafficManagementAPI_Templates.ttcn | 42 +- .../V2XInformationServiceAPI_Templates.ttcn | 8 +- .../ttcn/WlanInformationAPI_Functions.ttcn | 4 +- .../ttcn/WlanInformationAPI_Templates.ttcn | 68 +- .../WlanInformationAPI_TypesAndValues.ttcn | 1471 ++++++++++------- 12 files changed, 1034 insertions(+), 771 deletions(-) diff --git a/ttcn/AtsMec_Rnis/module.mk b/ttcn/AtsMec_Rnis/module.mk index 6402c87..015a416 100644 --- a/ttcn/AtsMec_Rnis/module.mk +++ b/ttcn/AtsMec_Rnis/module.mk @@ -15,7 +15,6 @@ modules := ../LibCommon \ ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ ../LibMec/TrafficManagementAPI \ ../LibMec/LocationAPI \ - ../LibMec/RnisAPI \ ../LibMec/UEAppInterfaceAPI \ ../LibMec/UEidentityAPI \ ../LibMec/V2XInformationServiceAPI \ diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/module.mk b/ttcn/LibMec/ApplicationMobilityServiceAPI/module.mk index f675678..37bd881 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/module.mk +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/module.mk @@ -5,4 +5,4 @@ sources := \ ttcn/ApplicationMobilityServiceAPI_Templates.ttcn \ ttcn/ApplicationMobilityServiceAPI_Functions.ttcn \ -modules := ../../RnisAPI +modules := ../RnisAPI diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn index 47770e4..f2410a9 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn @@ -25,10 +25,10 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.2-1: Attributes of RegistrationInfo */ type record RegistrationInfo { - Json.String appMobilityServiceId + Json.String appMobilityServiceId, ServiceConsumerId serviceConsumerId, DeviceInformation deviceInformation optional, - UInt32 expiryTime optional + Json.UInteger expiryTime optional } type record of RegistrationInfo RegistrationInfos; @@ -98,7 +98,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.2-1: Attributes of the MobilityProcedureSubscription */ type record MobilityProcedureSubscription { - SubscriptionType subscriptionType, + Json.String subscriptionType, Json.AnyURI callbackReference optional, Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, @@ -122,12 +122,11 @@ module ApplicationMobilityServiceAPI_TypesAndValues { } /** * @desc List of filtering criteria for the subscription + * @member appInstanceId Identifier of the application instance that registers to the Application Mobility Service * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.2-1: Attributes of the MobilityProcedureSubscription */ type record FilterCriteria { - Json.String appInstanceId optional, - AssociateIdList associateId optional, - MobilityStatusType mobilityStatus + Json.String appInstanceId optional } type record of FilterCriteria FilterCriterias; @@ -143,7 +142,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.3-1: Attributes of the AdjacentAppInfoSubscription */ type record AdjacentAppInfoSubscription { - SubscriptionType subscriptionType, + Json.String subscriptionType, Json.AnyURI callbackReference optional, Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, @@ -201,7 +200,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { type record MobilityProcedureNotification { Json.String notificationType, TimeStamp timeStamp optional, - AssociateId associateId, + AssociateId_ associateId, MobilityStatus mobilityStatus, TargetAppInfo targetAppInfo optional, Links_Notification links @@ -216,7 +215,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.2-1: Attributes of the MobilityProcedureNotification */ type record TargetAppInfo { - Json.String appInstanceId String 1 . + Json.String appInstanceId, CommunicationInterface commInterface optional } @@ -312,7 +311,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { /** * @desc This type represents the communication interface of an application instance * @member ipAddresses Entry point information of the service as one or more pairs of IP address and port - * @see ETSI GS MEC 021 Clause 7.5.2 Type: CommunicationInterface + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Clause 7.5.2 Type: CommunicationInterface */ type record CommunicationInterface { IpAddresses ipAddresses optional @@ -322,7 +321,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @desc Entry point information of the service as one or more pairs of IP address and port * @member host Host portion of the address * @member port Port portion of the address - * @see ETSI GS MEC 021 Clause 7.5.2 Type: CommunicationInterface + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Clause 7.5.2 Type: CommunicationInterface */ type record IpAddress { Json.String host, @@ -336,7 +335,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @desc * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see ETSI GS MEC 021 Clause 7.5.3 Type: TimeStamp + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Clause 7.5.3 Type: TimeStamp */ type record TimeStamp { Seconds seconds, @@ -356,7 +355,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { /** * @desc This type represents a type of link * @member href URI referring to a resource - * @see ETSI GS MEC 021 Clause 7.5.4 Type: LinkType + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Clause 7.5.4 Type: LinkType */ type record LinkType { Json.AnyURI href @@ -366,9 +365,9 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @desc The type represents the parameters of MEC host information * @member hostName Human-readable name of MEC host * @member hostId Deployment-specific information to identify a MEC host - * @see ETSI GS MEC 021 Table 7.5.5-1: Attributes of MECHostInformation + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.5.5-1: Attributes of MECHostInformation */ - type record IpAddress { + type record MECHostInformation { Json.String hostName optional, KeyValuePairs hostId } @@ -377,7 +376,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @desc This data type represents a list of key-value pairs * @member key_name * @member key_value - * @see ETSI GS MEC 010-2 Clause 6.2.5.3 Type: KeyValuePairs + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Clause 6.2.5.3 Type: KeyValuePairs */ type record KeyValuePairs { Json.String key_name, @@ -388,7 +387,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @desc This type represents configuration for the delivery of subscription notifications over Websockets * @member websocketUri Set by location server to indicate to the service consumer the Websocket URI to be used for delivering notifications * @member requestWebsocketUri Set to true by the service consumer to indicate that Websocket delivery is requested - * @see ETSI GS MEC 021 Clause 7.5.7 Type: WebsockNotifConfig + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Clause 7.5.7 Type: WebsockNotifConfig */ type record WebsockNotifConfig { Json.AnyURI websocketUri optional, diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn index fd90167..2c149ed 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn @@ -56,6 +56,7 @@ module EdgePlatformApplicationEnablementAPI_Templates { in template (value) EndPointInfo_UriList p_uris ) := { uris := p_uris, + fqdn := omit, addresses := omit, alternative := omit } // End of template m_end_point_uris @@ -64,6 +65,7 @@ module EdgePlatformApplicationEnablementAPI_Templates { template (present) EndPointInfo_UriList p_uris := ? ) := { uris := p_uris, + fqdn := *, addresses := *, alternative := * } // End of template mw_end_point_uris diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn index 5eb21d4..f7e52a2 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn @@ -23,6 +23,7 @@ module LocationAPI_Templates { resourceURL := p_resource_url, timestamp_ := p_timestamp, locationInfo := omit, + civicInfo := omit, contextLocationInfo := omit, ancillaryInfo := omit } // End of template m_user_info @@ -40,6 +41,7 @@ module LocationAPI_Templates { resourceURL := p_resource_url, timestamp_ := p_timestamp, locationInfo := *, + civicInfo := *, contextLocationInfo := *, ancillaryInfo := * } // End of template mw_user_info diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn index b1d0888..f568100 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn @@ -59,19 +59,25 @@ module RnisAPI_Templates { template (omit) CellChangeSubscription m_cell_change_subscription( in template (value) CallbackReference p_callbackReference, in template (value) FilterCriteriaAssocHo p_filterCriteriaAssocHo, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) Link p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - subscriptionType := "CellChangeSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaAssocHo := p_filterCriteriaAssocHo, - expiryDeadline := p_expiryDeadline + subscriptionType := "CellChangeSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaAssocHo := p_filterCriteriaAssocHo, + expiryDeadline := p_expiryDeadline } // End of template m_cell_change_subscription template (omit) CellChangeSubscription m_cell_change_subscription_wrong_subscription_type( in template (value) CallbackReference p_callbackReference, in template (value) FilterCriteriaAssocHo p_filterCriteriaAssocHo, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) Link p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) modifies m_cell_change_subscription := { @@ -82,13 +88,17 @@ module RnisAPI_Templates { template (present) CallbackReference p_callbackReference := ?, template (present) Link p_links := ?, template (present) FilterCriteriaAssocHo p_filterCriteriaAssocHo := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "CellChangeSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaAssocHo := p_filterCriteriaAssocHo, - expiryDeadline := p_expiryDeadline + subscriptionType := "CellChangeSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaAssocHo := p_filterCriteriaAssocHo, + expiryDeadline := p_expiryDeadline } // End of template mw_cell_change_subscription } // End of group subscriptions @@ -98,118 +108,154 @@ module RnisAPI_Templates { template (omit) RabEstSubscription m_rab_est_subscription( in template (value) CallbackReference p_callbackReference, in template (value) RabEstSubscription_FilterCriteriaQci p_filterCriteriaQci, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) Link p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - subscriptionType := "RabEstSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaQci := p_filterCriteriaQci, - expiryDeadline := p_expiryDeadline + subscriptionType := "RabEstSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaQci := p_filterCriteriaQci, + expiryDeadline := p_expiryDeadline } // End of template m_rab_est_subscription template (present) RabEstSubscription mw_rab_est_subscription( template (present) CallbackReference p_callbackReference := ?, template (present) Link p_links := ?, template (present) RabEstSubscription_FilterCriteriaQci p_filterCriteriaQci := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "RabEstSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaQci := p_filterCriteriaQci, - expiryDeadline := p_expiryDeadline + subscriptionType := "RabEstSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaQci := p_filterCriteriaQci, + expiryDeadline := p_expiryDeadline } // End of template mw_rab_est_subscription template (omit) RabModSubscription m_rab_mod_subscription( in template (value) CallbackReference p_callbackReference, in template (value) RabModSubscription_FilterCriteriaQci p_filterCriteriaQci, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) Link p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - subscriptionType := "RabModSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaQci := p_filterCriteriaQci, - expiryDeadline := p_expiryDeadline + subscriptionType := "RabModSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaQci := p_filterCriteriaQci, + expiryDeadline := p_expiryDeadline } // End of template m_rab_mod_subscription template (present) RabModSubscription mw_rab_mod_subscription( template (present) CallbackReference p_callbackReference := ?, template (present) Link p_links := ?, template (present) RabModSubscription_FilterCriteriaQci p_filterCriteriaQci := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "RabModSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaQci := p_filterCriteriaQci, - expiryDeadline := p_expiryDeadline + subscriptionType := "RabModSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaQci := p_filterCriteriaQci, + expiryDeadline := p_expiryDeadline } // End of template mw_rab_mod_subscription template (omit) RabRelSubscription m_rab_rel_subscription( in template (value) CallbackReference p_callbackReference, in template (value) RabModSubscription_FilterCriteriaQci p_filterCriteriaQci, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) Link p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - subscriptionType := "RabRelSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaQci := p_filterCriteriaQci, - expiryDeadline := p_expiryDeadline + subscriptionType := "RabRelSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaQci := p_filterCriteriaQci, + expiryDeadline := p_expiryDeadline } // End of template m_rab_rel_subscription template (present) RabRelSubscription mw_rab_rel_subscription( template (present) CallbackReference p_callbackReference := ?, template (present) Link p_links := ?, template (present) RabModSubscription_FilterCriteriaQci p_filterCriteriaQci := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "RabRelSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaQci := p_filterCriteriaQci, - expiryDeadline := p_expiryDeadline + subscriptionType := "RabRelSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaQci := p_filterCriteriaQci, + expiryDeadline := p_expiryDeadline } // End of template mw_rab_rel_subscription template (present) MeasRepUeSubscription mw_meas_rep_ue_subscription( template (present) CallbackReference p_callbackReference := ?, template (present) Link p_links := ?, template (present) FilterCriteriaAssocTri p_filterCriteriaAssocTri := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "MeasRepUeSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaAssocTri := p_filterCriteriaAssocTri, - expiryDeadline := p_expiryDeadline + subscriptionType := "MeasRepUeSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaAssocTri := p_filterCriteriaAssocTri, + expiryDeadline := p_expiryDeadline } // End of template mw_meas_rep_ue_subscription template (present) MeasTaSubscription mw_meas_ta_subscription( template (present) CallbackReference p_callbackReference := ?, template (present) Link p_links := ?, template (present) FilterCriteriaAssoc p_filterCriteriaAssoc := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "MeasTaSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaAssoc := p_filterCriteriaAssoc, - expiryDeadline := p_expiryDeadline + subscriptionType := "MeasTaSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaAssoc := p_filterCriteriaAssoc, + expiryDeadline := p_expiryDeadline } // End of template mw_meas_ta_subscription template (present) CaReConfSubscription mw_ca_reconfig_subscription( template (present) CallbackReference p_callbackReference := ?, template (present) Link p_links := ?, template (present) FilterCriteriaAssoc p_filterCriteriaAssoc := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "CaReConfSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaAssoc := p_filterCriteriaAssoc, - expiryDeadline := p_expiryDeadline + subscriptionType := "CaReConfSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaAssoc := p_filterCriteriaAssoc, + expiryDeadline := p_expiryDeadline } // End of template mw_ca_reconfig_subscription template (present) S1BearerSubscription mw_s1_bearer_subscription( @@ -217,14 +263,18 @@ module RnisAPI_Templates { template (present) Link p_links := ?, template (present) EventType p_eventType := ?, template (present) S1BearerSubscriptionCriteria p_s1BearerSubscriptionCriteria := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "S1BearerSubscription", - callbackReference := p_callbackReference, - links := p_links, - eventType := p_eventType, + subscriptionType := "S1BearerSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + eventType := p_eventType, s1BearerSubscriptionCriteria := p_s1BearerSubscriptionCriteria, - expiryDeadline := p_expiryDeadline + expiryDeadline := p_expiryDeadline } // End of template mw_s1_bearer_subscription } // End of group notifications diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn index 7915800..ab52234 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn @@ -204,7 +204,7 @@ module RnisAPI_TypesAndValues { L2Meas_CellUEInfo cellUEInfo optional } - type integer UInt100 (0 .. 100) with {variant "unsigned 32 bit"}; + type integer UInt100 with {variant "unsigned 100 bit"}; /** * @desc The per cell measurement information diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn index 1010b10..372367f 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn @@ -15,9 +15,11 @@ module TrafficManagementAPI_Templates { in BwRequestType p_requestType, in FixedAllocation p_fixedAllocation, in AllocationDirection p_allocationDirection, + in template (omit) AllocationId p_allocationId := omit, in template (omit) SessionFilter p_sessionFilter := omit, in template (omit) FixedBWPriority p_fixedBWPriority := omit ) := { + allocationId := p_allocationId, timeStamp := omit, appInsId := p_appInsId, requestType := p_requestType, @@ -32,9 +34,11 @@ module TrafficManagementAPI_Templates { template (present) BwRequestType p_requestType := ?, template (present) FixedAllocation p_fixedAllocation := ?, template (present) AllocationDirection p_allocationDirection := ?, + template AllocationId p_allocationId := *, template SessionFilter p_sessionFilter := *, template FixedBWPriority p_fixedBWPriority := * ) := { + allocationId := p_allocationId, timeStamp := *, appInsId := p_appInsId, requestType := p_requestType, @@ -47,11 +51,13 @@ module TrafficManagementAPI_Templates { template (omit) BwInfoDeltas m_bw_info_deltas( in AppInsId p_appInsId := PX_APP_INSTANCE_ID, in BwRequestType p_requestType, + in template (omit) AllocationId p_allocationId := omit, in template (omit) SessionFilter p_sessionFilter := omit, in template (omit) FixedAllocation p_fixedAllocation := omit, in template (omit) AllocationDirection p_allocationDirection := omit, in template (omit) FixedBWPriority p_fixedBWPriority := omit ) := { + allocationId := p_allocationId, appInsId := p_appInsId, requestType := p_requestType, sessionFilter := p_sessionFilter, @@ -66,8 +72,10 @@ module TrafficManagementAPI_Templates { template (present) SessionFilter p_sessionFilter := ?, template (present) FixedAllocation p_fixedAllocation := ?, template (present) AllocationDirection p_allocationDirection := ?, + template AllocationId p_allocationId := *, template FixedBWPriority p_fixedBWPriority := * ) := { + allocationId := p_allocationId, appInsId := p_appInsId, requestType := p_requestType, sessionFilter := p_sessionFilter, @@ -130,29 +138,37 @@ module TrafficManagementAPI_Templates { in template (value) QosD p_qosD, in template (value) MtsMode p_mtsMode, in template (value) TrafficDirection p_trafficDirection, + in template (omit) SessionId p_sessionId := omit, + in template (omit) Json.String p_appName := omit, in template (omit) FlowFilter p_flowFilter := omit, in template (omit) TimeStamp p_timeStamp := omit ) := { + sessionId := p_sessionId, timeStamp := p_timeStamp, appInsId := p_appInsId, + appName := p_appName, requestType := p_requestType, flowFilter := p_flowFilter, qosD := p_qosD, mtsMode := p_mtsMode, trafficDirection := p_trafficDirection } // End of template m_mts_session_info - + template MtsSessionInfo mw_mts_session_info( template (present) AppInsId p_appInsId := ?, template (present) MtsRequestType p_requestType := ?, template (present) QosD p_qosD := ?, template (present) MtsMode p_mtsMode := ?, template (present) TrafficDirection p_trafficDirection := ?, + template SessionId p_sessionId := *, + template Json.String p_appName := *, template FlowFilter p_flowFilter := *, template TimeStamp p_timeStamp := * ) := { + sessionId := p_sessionId, timeStamp := p_timeStamp, appInsId := p_appInsId, + appName := p_appName, requestType := p_requestType, flowFilter := p_flowFilter, qosD := p_qosD, @@ -163,29 +179,37 @@ module TrafficManagementAPI_Templates { template (omit) FlowFilterItem m_flow_filter( in template (value) SourceIp p_sourceIp, in template (value) SourcePort p_sourcePort, - in template (omit) DstAddress p_dstAddress := omit, + in template (omit) DstAddress p_dstIp := omit, in template (omit) DstPort p_dstPort := omit, - in template (omit) Protocol p_protocol := omit + in template (omit) Protocol p_protocol := omit, + in template (omit) Dscp p_dscp := omit, + in template (omit) Flowlabel p_flowlabel := omit ) := { sourceIp := p_sourceIp, sourcePort := p_sourcePort, - dstAddress := p_dstAddress, + dstIp := p_dstIp, dstPort := p_dstPort, - protocol := p_protocol + protocol := p_protocol, + dscp := p_dscp, + flowlabel := p_flowlabel } // End of template m_flow_filter template FlowFilterItem mw_flow_filter( template (present) SourceIp p_sourceIp := ?, template (present) SourcePort p_sourcePort := ?, - template DstAddress p_dstAddress := *, + template DstAddress p_dstIp := *, template DstPort p_dstPort := *, - template Protocol p_protocol := * + template Protocol p_protocol := *, + template Dscp p_dscp := omit, + template Flowlabel p_flowlabel := omit ) := { sourceIp := p_sourceIp, sourcePort := p_sourcePort, - dstAddress := p_dstAddress, + dstIp := p_dstIp, dstPort := p_dstPort, - protocol := p_protocol + protocol := p_protocol, + dscp := p_dscp, + flowlabel := p_flowlabel } // End of template mw_flow_filter template (value) QosD m_qosd( diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn index f031f64..4459508 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn @@ -103,8 +103,8 @@ module V2XInformationServiceAPI_Templates { template (omit) RouteInfo m_route_info( in template (value) LocationInfo p_location, in template (omit) TimeStamp p_time := omit, - in template (omit) UInt8 p_rsrp := omit, - in template (omit) UInt8 p_rsrq := omit + in template (omit) Json.UInt8 p_rsrp := omit, + in template (omit) Json.UInt8 p_rsrq := omit ) := { location := p_location, time := p_time, @@ -115,8 +115,8 @@ module V2XInformationServiceAPI_Templates { template RouteInfo mw_route_info( template (present) LocationInfo p_location := ?, template TimeStamp p_time := *, - template UInt8 p_rsrp := *, - template UInt8 p_rsrq := * + template Json.UInt8 p_rsrp := *, + template Json.UInt8 p_rsrq := * ) := { location := p_location, time := p_time, diff --git a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Functions.ttcn b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Functions.ttcn index 0be7d86..39cee60 100644 --- a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Functions.ttcn +++ b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Functions.ttcn @@ -140,9 +140,9 @@ module WlanInformationAPI_Functions { { m_sta_identity( PX_MAC_ID, - PX_SSID, + { PX_SSID }, -, - PX_IP_ADDRESS + { PX_IP_ADDRESS } ) }, PX_MEASUREMENT_ID, diff --git a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Templates.ttcn b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Templates.ttcn index 982baed..828ad59 100644 --- a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Templates.ttcn +++ b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Templates.ttcn @@ -123,8 +123,8 @@ module WlanInformationAPI_Templates { in template (value) ApIdentity p_apId, in template (omit) Json.Bool p_requestTestNotification := omit, in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, - in template (omit) LinkTypes p_links := omit, - in template (omit) UInt8 p_notificationPeriod := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.UInt8 p_notificationPeriod := omit, in template (omit) NotificationEvent p_notificationEvent := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { @@ -144,8 +144,8 @@ module WlanInformationAPI_Templates { in template (value) ApIdentity p_apId, in template (omit) Json.Bool p_requestTestNotification := omit, in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, - in template (omit) LinkTypes p_links := omit, - in template (omit) UInt8 p_notificationPeriod := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.UInt8 p_notificationPeriod := omit, in template (omit) NotificationEvent p_notificationEvent := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { @@ -165,8 +165,8 @@ module WlanInformationAPI_Templates { template (present) ApIdentity p_apId := ?, template Json.Bool p_requestTestNotification := *, template WebsockNotifConfig p_websockNotifConfig := *, - template LinkTypes p_links := *, - template UInt8 p_notificationPeriod := *, + template Links p_links := *, + template Json.UInt8 p_notificationPeriod := *, template NotificationEvent p_notificationEvent := *, template TimeStamp p_expiryDeadline := * ) := { @@ -183,12 +183,12 @@ module WlanInformationAPI_Templates { template (omit) StaDataRateSubscription m_sta_data_rate_subscription( in template (value) Json.AnyURI p_callbackReference, - in template (value) StaIdentities p_staId, + in template (value) StaIdentityList p_staId, in template (omit) Json.Bool p_requestTestNotification := omit, in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, - in template (omit) LinkTypes p_links := omit, - in template (omit) UInt8 p_notificationPeriod := omit, - in template (omit) NotificationEvent p_notificationEvent := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.UInt8 p_notificationPeriod := omit, + in template (omit) NotificationEvent_StaDataRateSubscription p_notificationEvent := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { subscriptionType := "StaDataRateSubscription", @@ -204,12 +204,12 @@ module WlanInformationAPI_Templates { template (omit) StaDataRateSubscription m_sta_data_rate_subscription_invalid( in template (value) Json.AnyURI p_callbackReference, - in template (value) StaIdentities p_staId, + in template (value) StaIdentityList p_staId, in template (omit) Json.Bool p_requestTestNotification := omit, in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, - in template (omit) LinkTypes p_links := omit, - in template (omit) UInt8 p_notificationPeriod := omit, - in template (omit) NotificationEvent p_notificationEvent := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.UInt8 p_notificationPeriod := omit, + in template (omit) NotificationEvent_StaDataRateSubscription p_notificationEvent := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { subscriptionType := "InvalidStaDataRateSubscription", @@ -225,12 +225,12 @@ module WlanInformationAPI_Templates { template (present) StaDataRateSubscription mw_sta_data_rate_subscription( template (present) Json.AnyURI p_callbackReference := ?, - template (present) StaIdentities p_staId := ?, + template (present) StaIdentityList p_staId := ?, template Json.Bool p_requestTestNotification := *, template WebsockNotifConfig p_websockNotifConfig := *, - template LinkTypes p_links := *, - template UInt8 p_notificationPeriod := *, - template NotificationEvent p_notificationEvent := *, + template Links p_links := *, + template Json.UInt8 p_notificationPeriod := *, + template NotificationEvent_StaDataRateSubscription p_notificationEvent := *, template TimeStamp p_expiryDeadline := * ) := { subscriptionType := "StaDataRateSubscription", @@ -246,9 +246,9 @@ module WlanInformationAPI_Templates { template (omit) StaIdentity m_sta_identity( in Json.String p_macId, - in template (omit) Json.String p_ssid := omit, + in template (omit) SsidList p_ssid := omit, in template (omit) Json.String p_aid := omit, - in template (omit) Json.String p_ipAddress := omit + in template (omit) IpAddressList p_ipAddress := omit ) := { macId := p_macId, ssid := p_ssid, @@ -258,9 +258,9 @@ module WlanInformationAPI_Templates { template (present) StaIdentity mw_sta_identity( template (present) Json.String p_macId := ?, - template Json.String p_ssid := *, + template SsidList p_ssid := *, template Json.String p_aid := *, - template Json.String p_ipAddress := * + template IpAddressList p_ipAddress := * ) := { macId := p_macId, ssid := p_ssid, @@ -269,7 +269,7 @@ module WlanInformationAPI_Templates { } // End of template mw_sta_identity template (omit) SubscriptionLinkList m_subscription_link_list( - in template (value) LinkTypes p_links, + in template (value) Links p_links, in template (omit) Subscription p_subscription := omit ) := { links := p_links, @@ -277,7 +277,7 @@ module WlanInformationAPI_Templates { } // End of template m_subscription_link_list template (present) SubscriptionLinkList mw_subscription_link_list( - template (present) LinkTypes p_links := ?, + template (present) Links p_links := ?, template Subscription p_subscription := * ) := { links := p_links, @@ -305,7 +305,7 @@ module WlanInformationAPI_Templates { } // End of template mw_ap_identity template (omit) MeasurementConfigLinkList m_measurement_config_list( - in template (omit) LinkTypes p_links := omit, + in template (omit) Links p_links := omit, in template (value) MeasurementConfig_MeasurementConfigLinkList p_measurementConfig ) := { links := p_links, @@ -313,7 +313,7 @@ module WlanInformationAPI_Templates { } // End of template m_measurement_config_list template (present) MeasurementConfigLinkList mw_measurement_config_list( - template LinkTypes p_links := *, + template Links p_links := *, template (present) MeasurementConfig_MeasurementConfigLinkList p_measurementConfig := ? ) := { links := p_links, @@ -337,8 +337,8 @@ module WlanInformationAPI_Templates { } // End of template mw_measurement_config_link_list template (omit) MeasurementConfig m_measurement_config( - in template (omit) LinkTypes p_links := omit, - in template (value) StaIdentities p_staId, + in template (omit) Links p_links := omit, + in template (value) StaIdentityList p_staId, in Json.String p_measurementId, in template (value) MeasurementInfo p_measurementInfo ) := { @@ -349,8 +349,8 @@ module WlanInformationAPI_Templates { } // End of template m_measurement_config template (present) MeasurementConfig mw_measurement_config( - template LinkTypes p_links := *, - template (present) StaIdentities p_staId := ?, + template Links p_links := *, + template (present) StaIdentityList p_staId := ?, template (present) Json.String p_measurementId := ?, template (present) MeasurementInfo p_measurementInfo := ? ) := { @@ -361,8 +361,8 @@ module WlanInformationAPI_Templates { } // End of template mw_measurement_config template (omit) MeasurementInfo m_measurement_info( - in template (omit) UInt16 p_measurementDuration := omit, - in template (omit) UInt16 p_randomInterval:= omit, + in template (omit) Json.UInt16 p_measurementDuration := omit, + in template (omit) Json.UInt16 p_randomInterval:= omit, in template (omit) ChannelLoadConfig p_channelLoadConf := omit, in template (omit) BeaconRequestConfig p_beaconRequestConf := omit, in template (omit) StaStatisticsConfig p_staStatisticsConf := omit, @@ -377,8 +377,8 @@ module WlanInformationAPI_Templates { } // End of template m_measurement_info template MeasurementInfo mw_measurement_info( - template UInt16 p_measurementDuration := *, - template UInt16 p_randomInterval:= *, + template Json.UInt16 p_measurementDuration := *, + template Json.UInt16 p_randomInterval:= *, template ChannelLoadConfig p_channelLoadConf := *, template BeaconRequestConfig p_beaconRequestConf := *, template StaStatisticsConfig p_staStatisticsConf := *, diff --git a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn index 6bb930d..212da04 100644 --- a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn @@ -1,8 +1,8 @@ /** - * @author ETSI / TTF T012 + * @author ETSI / TTF T012 // TTF T027 * @version $Url$ * $Id$ - * @desc Types ANd Values for ETSI GS MEC 028 V2.1.1 (2020-06) + * @desc Types And Values for ETSI GS MEC 028 V2.3.1 (2022-07) * @copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. @@ -14,118 +14,368 @@ module WlanInformationAPI_TypesAndValues { import from Json all; /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @desc This type represents the information on Access Points available from the WLAN Access Information Service. + * @member timeStamp TimeStamp + * @member apId Identifier(s) to uniquely specify the Access Point whose information is exposed within this data type + * @member channel Channel configured for the Access Point + * @member wlanCap WLAN capabilities of Access Point + * @member wanMetrics WAN Metrics element provides information about the WAN link connecting an IEEE 802.11 Access Node and the Internet + * @member bssLoad BSS Load attribute contains information on the current STA population and traffic levels in the BSS + * @member extBssLoad Extended BSS Load attribute contains more detailed information on the current STA population and traffic levels in the BSS + * @member apLocation The location on the Access Point + * @see ETSI GS MEC 028 V2.3.1 Clause 6.2.2 Type: ApInfo */ - type Json.UInteger Seconds; + type record ApInfo { + TimeStamp timeStamp optional, + ApIdentity apId, + Json.UInteger channel optional, + WlanCapabilities wlanCap optional, + WanMetrics wanMetrics optional, + BssLoad bssLoad optional, + ExtBssLoad extBssLoad optional, + OBssLoad oBssLoad optional, + ApLocation apLocation optional + } + type record of ApInfo ApInfoList; /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @desc Information on wireless stations available from the WLAN Access Information Service + * @member timeStamp TimeStamp + * @member staId Identifier(s) to uniquely specify station whose information is exposed within this data type + * @member channel Channel configured for the Access Point + * @member apAssociated Information about the Access Point that this Client Station is associated to + * @member rssi Receive Signal Strength Indicator + * @member staDataRate Station Data Rate + * @member staStatistics Statistics as defined in IEEE 802.11-2016 for the client station collected over measurement duration + * @member beaconReport Beacon Report as defined in Wi-Fi Agile Multiband Specification + * @member neighborReport Information about neighbor Access Points seen by the station + * @member channelLoad Channel Load reports as seen by the station + * @see ETSI GS MEC 028 V2.3.1 Table 6.2.3-1: Attributes for StaInfo */ - type Json.UInteger NanoSeconds; + type record StaInfo { + TimeStamp timeStamp optional, + StaIdentity staId, + Json.UInteger channel optional, + ApAssociated apAssociated optional, + Rssi rssi optional, + StaDataRate staDataRate optional, + StaStatistics staStatistics optional, + BeaconReport beaconReport optional, + NeighborReport neighborReport optional, + ChannelLoad channelLoad optional + + } + type record of StaInfo StaInfoList; /** - * @desc Time stamp description - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see MEC030 Clause 6.5.2 Type: TimeStamp + * @desc Different measurements configuration available from the WLAN Access Information Service + * @member _links Hyperlink related to the resource + * @member staId Identifier(s) to uniquely specify the target client station(s) for the measurement configuration + * @member measurementId Identifier of this measurement configuration + * @member measurementInfo Information used to configure this measurement + * @see ETSI GS MEC 028 V2.3.1 Table 6.2.4-1: Attributes for MeasurementConfig */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds + type record MeasurementConfig { + Links links optional, + StaIdentityList staId, + Json.String measurementId, + MeasurementInfo measurementInfo + } with { + variant (links) "name as '_links'"; } - type record of Json.String SsidList; - type record of Json.String IpAddressList; /** - * @desc Identifiers determining a specific Access Point - * @member bssid Basic Service Set Identifier (BSSID) is a unique Identifier assigned to an Access Point (as network interface controller) for communications at the data link layer of a network segment - * @member ssid Service Set Identifier to identify logical networks including Basic Service Set and Extended Service Set - * @member ipAddress IPv4 or IPv6 address allocated for the Access Point - * @see ETSI GS MEC 028 Clause 6.5.3 Type: ApIdentity + * @desc Hyperlink related to the resource + * @member self_ Self-referring URI + * @see ETSI GS MEC 028 V2.3.1 Table 6.2.4-1: Attributes for MeasurementConfig */ - type record ApIdentity { - Json.String bssid, - SsidList ssid optional, - IpAddressList ipAddress optional + type record Links { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + /** + * @desc The different measurement configurations available from the WLAN Access Information Service + * @member _links Hyperlink related to the resource + * @member measurementConfig + * @see ETSI GS MEC 028 V2.3.1 Table 6.2.5-1: Attributes of the MeasurementConfigLinkList + */ + type record MeasurementConfigLinkList { + Links links optional, + MeasurementConfig_MeasurementConfigLinkList measurementConfig + } with { + variant (links) "name as '_links'"; } /** - * @desc information on HT capabilities of an Access Point - * @member htCapabilityInfo HT Capability Information - * @member ampduParameters A-MPDU parameters - * @member supportedMcsSet Supported MCS set - * @member htExtendedCap Extended HT Capabilities - * @member txBeamFormCap Transmit Beamforming Capabilities - * @member aselCap ASEL capabilities - * @see ETSI GS MEC 028 Clause 6.5.14 Type: HtCapabilities + * @desc + * @member href The URI referring to a measurement configuration + * @member measurementId Unique identifier allocated by the service consumer to identify measurement reports associated with this measurement configuration + * @see ETSI GS MEC 028 V2.3.1 Table 6.2.5-1: Attributes of the MeasurementConfigLinkList */ - type integer UInt128 with {variant "unsigned 32 bit"}; - type record HtCapabilities { - Json.UInt16 htCapabilityInfo, - Json.UInt8 ampduParameters, - UInt128 supportedMcsSet, - Json.UInt16 htExtendedCap, - Json.UInteger txBeamFormCap, - Json.UInt8 aselCap + type record MeasurementConfig_MeasurementConfigLinkList { + Json.AnyURI href, + Json.String measurementId } /** - * @desc Information on VHT Capabilities of an Access Point - * @member vhtCapInfo VHT capabilities Info - * @member vhtMcsNss Supported VHT-MCS and NSS Set - * @see ETSI GS MEC 028 Clause 6.5.15 Type: VhtCapabilities + * @desc Subscription to get updates on client stations that are associated to an Access Point + * @member subscriptionType Shall be set to "AssocStaSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed WLAN information + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification on the callbackReference URI to determine if it is reachable by the WAIS for notifications + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the WAIS and the service consumer for notifications, either in place of the callbackReference URI or if it is not reachable via the test notification + * @member _links Hyperlink related to the resource + * @member apId Identifier(s) to uniquely specify the target Access Point for the subscription + * @member notificationPeriod Set for periodic notification reporting + * @member notificationEvent Set for trigger-based event notification reporting + * @member expiryDeadline The expiration time of the subscription determined by the WLAN Access Information Service + * @see ETSI GS MEC 028 V2.3.1 Table 6.3.2-1: Attributes of the AssocStaSubscription */ - type record VhtCapabilities { - Json.UInteger vhtCapInfo, - Json.UInteger vhtMcsNss + type record AssocStaSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + ApIdentity apId, + Json.UInt8 notificationPeriod optional, + NotificationEvent notificationEvent optional, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; } + type record of AssocStaSubscription AssocStaSubscriptionList; /** - * @desc Information on VHT Capabilities of an Access Point - * @member heMacCapInfo MAC capabilities of an Access Point - * @member hePhyCapinfo PHY capabilities of an Access Point - * @member supportedHeMcsNssSet Supported MCS and NSS Set - * @see ETSI GS MEC 028 Clause 6.5.16 Type: HeCapabilities + * @desc Set for trigger-based event notification reporting + * @member trigger_ Trigger for the notification + * @member threshold Number of connected stations threshold for trigger-based event reporting + * @see ETSI GS MEC 028 V2.3.1 Table 6.3.2-1: Attributes of the AssocStaSubscription */ - type record HeCapabilities { - Json.UInt8 heMacCapInfo, - Json.UInt8 hePhyCapinfo, - Json.UInt8 supportedHeMcsNssSet + type record NotificationEvent { + Json.UInt8 trigger_, + Json.UInt8 threshold + } with { + variant (trigger_) "name as 'trigger'"; } /** - * @desc Information on DMG Capabilities of an Access Point - * @member dmgStaCapInfo DMG station capabilities information - * @member dmgApOrPcpCapInfo DMG AP or PCP capabilities information - * @member dmgStaBeamTrackTimeLimit DMG station beam tracking time limit - * @member extScMcsCap Extended SC MCS capabilities - * @member maxNrBasicAmsduSubframes Number of basic A-MSDU subframes in A-MSDU - * @member maxNrShortAmsduSubframes Number of short A-MSDU subframes in A-MSDU - * @see ETSI GS MEC 028 Clause 6.5.17 Type: DmgCapabilities + * @desc Subscription to get updates on the Data Rate of targeted client station(s) + * @member subscriptionType Shall be set to "AssocStaSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed WLAN information + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification on the callbackReference URI to determine if it is reachable by the WAIS for notifications + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the WAIS and the service consumer for notifications, either in place of the callbackReference URI or if it is not reachable via the test notification + * @member _links Hyperlink related to the resource + * @member staId Identifier(s) to uniquely specify the target client station(s) for the subscription + * @member notificationPeriod Set for periodic notification reporting + * @member notificationEvent Set for trigger-based event notification reporting + * @member expiryDeadline The expiration time of the subscription determined by the WLAN Access Information Service + * @see ETSI GS MEC 028 V2.3.1 Table 6.3.3-1: Attributes of the StaDataRateSubscription */ - type record DmgCapabilities { - Json.UInteger dmgStaCapInfo, - Json.UInt16 dmgApOrPcpCapInfo, - Json.UInt16 dmgStaBeamTrackTimeLimit, - Json.UInt8 extScMcsCap, - Json.UInt8 maxNrBasicAmsduSubframes, - Json.UInt8 maxNrShortAmsduSubframes + type record StaDataRateSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + StaIdentityList staId, + Json.UInt8 notificationPeriod optional, + NotificationEvent_StaDataRateSubscription notificationEvent optional, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + type record of StaDataRateSubscription StaDataRateSubscriptionList; + + /** + * @desc Set for trigger-based event notification reporting + * @member trigger_ Trigger for the notification + * @member threshold Number of connected stations threshold for trigger-based event reporting + * @member downlinkRateThreshold Downlink data rate threshold for StaDataRate reporting + * @member uplinkRateThreshold Uplink data rate threshold for StaDataRate reporting + * @see ETSI GS MEC 028 V2.3.1 Table 6.3.3-1: Attributes of the StaDataRateSubscription + */ + type record NotificationEvent_StaDataRateSubscription { + Json.UInt8 trigger_, + Json.UInteger downlinkRateThreshold optional, + Json.UInteger uplinkRateThreshold + } with { + variant (trigger_) "name as 'trigger'"; } /** - * @desc Information on EDMG Capabilities of an Access Point - * @member ampduParameters A-MPDU parameters - * @member trnParameters Training parameters - * @member supportedMcs Supported MCS - * @member reserved - * @see ETSI GS MEC 028 Clause 6.5.18 Type: EdmgCapabilities + * @desc List of links related to currently existing subscriptions for the service consumer + * @member links List of hyperlinks related to the resource + * @member subscription + * @see ETSI GS MEC 028 V2.3.1 Table 6.3.4-1: Attributes of the SubscriptionLinkList */ - type record EdmgCapabilities { - Json.UInt8 ampduParameters, - Json.UInt16 trnParameters, - Json.UInteger supportedMcs + type record SubscriptionLinkList { + Links links, + Subscription subscription optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc + * @member href The URI referring to the subscription + * @member subscriptionType Type of the subscription + * @see ETSI GS MEC 028 V2.3.1 Table 6.3.4-1: Attributes of the SubscriptionLinkLis + */ + type record Subscription_ { + Json.AnyURI href, + Json.String subscriptionType + } + type record of Subscription_ Subscription; + + /** + * @desc This type represents a subscription to get measurement reports (Channel Load, Beacon Request, STA Statistics, or Neighbor Report) from targeted client station(s) + * @member subscriptionType Shall be set to "MeasurementReportSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed WLAN information + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification on the callbackReference URI to determine if it is reachable by the WAIS for notifications + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the WAIS and the service consumer for notifications, either in place of the callbackReference URI or if it is not reachable via the test notification + * @member _links Hyperlink related to the resource + * @member staId Identifier(s) to uniquely specify the target client station(s) for the subscription + * @member measurementId Unique identifier allocated by the service consumer to identify measurement reports associated with this measurement subscription + * @member measurementInfo Information used to configure this measurement + * @member expiryDeadline The expiration time of the subscription determined by the WLAN Access Information Service + * @see ETSI GS MEC 028 V2.3.1 Table 6.3.5-1: Attributes of the MeasurementReportSubscription + */ + type record MeasurementReportSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + StaIdentityList staId, + Json.String measurementId, + Json.String measurementInfo, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + type record of StaDataRateSubscription StaDataRateSubscriptionList; + + /** + * @desc Notification from WLAN Access Information Service with regards to client stations associated to the targeted Access Point + * @member notificationType Shall be set to "AssocStaNotification" + * @member timeStamp Time stamp + * @member apId Identifier(s) to uniquely specify the Access Point to which the client stations are associated + * @member staId Identifier(s) to uniquely specify the client station(s) associated + * @see ETSI GS MEC 028 V2.3.1 Table 6.4.2-1: Attributes of the AssocStaNotification + */ + type record AssocStaNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + ApIdentity apId, + StaIdentityList staId optional + } + + /** + * @desc Notification from WLAN Information service with regards to Data Rates of the subscribed client stations + * @member notificationType Shall be set to "StaDataRateNotification" + * @member timeStamp Time stamp + * @member staDataRate Data rates of a client station + * @see ETSI GS MEC 028 V2.3.1 Table 6.4.3-1: Attributes of the StaDataRateNotification + */ + type record StaDataRateNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + StaDataRateList staDataRate optional + } + + /** + * @desc Notification from WLAN Access Information service with regards to expiry of an existing subscription + * @member notificationType Shall be set to "ExpiryNotification" + * @member links Hyperlink related to the resource + * @member expiryDeadlineTime stamp + * @see ETSI GS MEC 028 V2.3.1 Table 6.4.4-1: Attributes of the ExpiryNotification + */ + type record ExpiryNotification { + Json.String notificationType, + Links links, + TimeStamp expiryDeadline + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Hyperlink related to the resource + * @member subscription URI identifying the subscription which has expired + * @see ETSI GS MEC 028 V2.3.1 Table 6.4.4-1: Attributes of the ExpiryNotification + */ + type record Links_Notification { + LinkType subscription + } + + /** + * @desc This type represents a notification from WLAN Access Information service with regards to Measurement Reports of the subscribed client stations + * @member notificationType Shall be set to "MeasurementReportNotification" + * @member timeStamp Time stamp + * @member staStatistics STA Statistics Report as defined in IEEE 802.11-2016 [8] + * @member beaconReport Beacon Report as defined in IEEE 802.11-2016 [8] + * @member neighborReport Neighbor Report providing information about neighbor Access Points seen by the station as defined in IEEE 802.11-2016 [8] + * @member channelLoad Channel Load reports as seen by the station as defined in IEEE 802.11-2016 [8] + * @see ETSI GS MEC 028 V2.3.1 Table 6.4.5-1: Attributes of the MeasurementReportNotification + */ + type record MeasurementReportNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + StaStatistics staStatistics optional, + BeaconReport beaconReport optional, + NeighborReport neighborReport optional, + ChannelLoad channelLoad optional + } + + /** + * @desc This data type represents a notification from AMS with regards to expiry of the existing subscription + * @member notificationType Shall be set to "TestNotification" + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 028 V2.3.1 V3.1.1 (2023-10) Table 6.4.6-1: Attributes of the TestNotification + */ + type record TestNotification { + Json.String notificationType, + Links_Notification links + } with { + variant (links) "name as '_links'"; } + /** + * @desc Time stamp description + * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.2-1: Attributes of the TimeStamp + */ + type record TimeStamp { + Seconds seconds, + NanoSeconds nanoSeconds + } + + /** + * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + */ + type Json.UInteger Seconds; + + /** + * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + */ + type Json.UInteger NanoSeconds; + + /** + * @desc Identifiers determining a specific Access Point + * @member bssid Basic Service Set Identifier (BSSID) is a unique Identifier assigned to an Access Point (as network interface controller) for communications at the data link layer of a network segment + * @member ssid Service Set Identifier to identify logical networks including Basic Service Set and Extended Service Set + * @member ipAddress IPv4 or IPv6 address allocated for the Access Point + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.3-1: Attributes of the ApIdentity + */ + type record ApIdentity { + Json.String bssid, + SsidList ssid optional, + IpAddressList ipAddress optional + } + type record of Json.String SsidList; + type record of Json.String IpAddressList; + /** * @desc WLAN capabilities of the Access Point * @member ht Information about Access Point HT capabilities @@ -133,13 +383,13 @@ module WlanInformationAPI_TypesAndValues { * @member he Information about Access Point HE capabilities * @member dmg Information about Access Point DMG capabilities * @member edmg Information about Access Point EDMG capabilities - * @see ETSI GS MEC 028 Clause 6.5.4 Type: WlanCapabilities + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.4-1: Attributes of the WlanCapabilities */ type record WlanCapabilities { - HtCapabilities ht optional, - VhtCapabilities vht optional, - HeCapabilities he optional, - DmgCapabilities dmg optional, + HtCapabilities ht optional, + VhtCapabilities vht optional, + HeCapabilities he optional, + DmgCapabilities dmg optional, EdmgCapabilities edmg optional } @@ -151,45 +401,209 @@ module WlanInformationAPI_TypesAndValues { * @member downlinkLoad 1-octet positive integer representing the current percentage loading of the downlink WAN connection * @member uplinkLoad 1-octet positive integer representing the current percentage loading of the uplink WAN connection * @member lmd The LMD (Load Measurement Duration) - * @see ETSI GS MEC 028 Clause 6.5.6 Type: WanMetrics + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.6-1: Attributes of the WanMetrics + */ + type record WanMetrics { + Json.UInt8 wanInfo, + Json.UInteger downlinkSpeed, + Json.UInteger uplinkSpeed, + Json.UInt8 downlinkLoad, + Json.UInt8 uplinkLoad, + Json.UInt16 lmd + } + + /** + * @desc Load of a BSS + * @member staCount Indicates the total number of STAs currently associated with this BSS + * @member channelUtilization The percentage of time + * @member availAdmCap Available Admission Capacity that specifies the remaining amount of medium time available via explicit admission control, in units of 32 μs/s + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.7-1: Attributes of the BssLoad + */ + type record BssLoad { + Json.UInt16 staCount, + Json.UInt8 channelUtilization, + Json.UInt16 availAdmCap + } + + /** + * @desc Extended BSS Load information + * @member muMimoStaCount Indicates the total number of STAs currently associated with this BSS that have a 1 in the MU Beamformee Capable field of their VHT Capabilities element + * @member spatStreamUnderUtil The percentage of time that the AP has underutilized spatial domain resources for given busy time of the medium + * @member obsSec20MhzUtil Observable loading on each of the secondary 20 MHz channel + * @member obsSec40MhzUtil Observable loading on each of the secondary 40 MHz channel + * @member obsSec80MhzUtil Observable loading on each of the secondary 80 MHz channel + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.8-1: Attributes of the ExtBssLoad + */ + type record ExtBssLoad { + Json.UInt16 muMimoStaCount, + Json.UInt8 spatStreamUnderUtil, + Json.UInt8 obsSec20MhzUtil, + Json.UInt8 obsSec40MhzUtil, + Json.UInt8 obsSec80MhzUtil + } + + /** + * @desc Location information of the Access Point + * @member geolocation Geospatial Location of the AP + * @member civicLocation Civic Location of the AP + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.9-1: Attributes of the ApLocation + */ + type record ApLocation { + GeoLocation geolocation optional, + CivicLocation civicLocation optional + } + + /** + * @desc Information about neighbor Access Points + * @member staId Identifier to uniquely specify the station whose information is exposed within this report + * @member measurementId Measurement ID of the Measurement configuration applied to this Neighbor Report + * @member bssid BSS Id of the Access Point that is being reported + * @member bssidInfo Additional information related to Access Point that is being reported + * @member operatingClass The channel set of the AP indicated by this BSSID + * @member channel The channel currently used by this Access Point + * @member phyType PHY type of the AP indicated by this BSSID. It is an integer value coded according to the value of the dot11PHYType + * @member bssTransitionCandidatePreference Relative value indicating the preferred ordering for this BSS as a transition candidate for roaming + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.10-1: Attributes of the NeighborReport + */ + type record NeighborReportItem { + StaIdentity staId optional, + Json.String measurementId, + Json.String bssid, + Json.UInteger bssidInfo, + Json.UInt8 operatingClass, + Json.UInt8 channel, + Json.UInt8 phyType, + Json.UInt8 bssTransitionCandidatePreference optional + } + type record of NeighborReportItem NeighborReport; + + /** + * @desc Identifiers determining a specific client station + * @member macId Unique identifier assigned to station (as network interface controller) for communications at the data link layer of a network segment + * @member ssid Service Set Identifier to identify logical networks + * @member aid Number which identifies a particular association between a station and an Access Point + * @member ipAddress IPv4 or IPv6 address allocated for the station + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.11-1: Attributes of the StaIdentity + */ + type record StaIdentity { + Json.String macId, + SsidList ssid optional, + Json.String aid optional, + IpAddressList ipAddress optional + } + type record of StaIdentity StaIdentityList; + + /** + * @desc Information for the Access Point that the client station is associated to + * @member bssid Basic Service Set Identifier (BSSID) is a unique identifier assigned to the Access Point (as network interface controller) for communications at the data link layer of a network segment. + * @member ssid Service Set Identifier to identify logical networks + * @member assocId Unique number which identifies a particular association between the station and Access Point + * @member ipAddress IPv4 or IPv6 address allocated for the Access Point + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.12-1: Attributes of the ApAssociated + */ + type record ApAssociated { + Json.String bssid, + SsidList ssid optional, + Json.String assocId optional, + IpAddressList ipAddress optional + } + + /** + * @desc Information statistics of the client station + * @member staId Identifier to uniquely specify the station whose information is exposed within this report + * @member measurementId Measurement ID of the Measurement configuration applied to this STA Statistics Report + * @member measurementDuration Duration over which the Statistics Group Data was measured in time units of 1024 µs + * @member groupIdentity Indicates the requested statistics group describing the Statistics Group Data + * @member groupZeroData STA Statistics Data for Group Identity = 0 + * @member groupOneData STA Statistics Data for Group Identity = 1 + * @member group2to9Data STA Statistics Data for Group Identity = 2 through 9 + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.13-1: Attributes of the StaStatistics + */ + type record StaStatistics { + StaIdentity staId optional, + Json.String measurementId, + Json.String measurementDuration, + Json.UInt8 groupIdentity, + StaStatisticsGroupZeroData groupZeroData optional, + StaStatisticsGroupOneData groupOneData optional, + StaStatisticsGroup2to9Data group2to9Data optional + } + + /** + * @desc information on HT capabilities of an Access Point + * @member htCapabilityInfo HT Capability Information + * @member ampduParameters A-MPDU parameters + * @member supportedMcsSet Supported MCS set + * @member htExtendedCap Extended HT Capabilities + * @member txBeamFormCap Transmit Beamforming Capabilities + * @member aselCap ASEL capabilities + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.14-1: Attributes of the HtCapabilities + */ + type record HtCapabilities { + Json.UInt16 htCapabilityInfo, + Json.UInt8 ampduParameters, + UInt128 supportedMcsSet, + Json.UInt16 htExtendedCap, + Json.UInteger txBeamFormCap, + Json.UInt8 aselCap + } + type integer UInt128 with {variant "unsigned 128 bit"}; + + /** + * @desc Information on VHT Capabilities of an Access Point + * @member vhtCapInfo VHT capabilities Info + * @member vhtMcsNss Supported VHT-MCS and NSS Set + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.15-1: Attributes of the VhtCapabilities + */ + type record VhtCapabilities { + Json.UInteger vhtCapInfo, + Json.UInteger vhtMcsNss + } + + /** + * @desc Information on VHT Capabilities of an Access Point + * @member heMacCapInfo MAC capabilities of an Access Point + * @member hePhyCapinfo PHY capabilities of an Access Point + * @member supportedHeMcsNssSet Supported MCS and NSS Set + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.16-1: Attributes of the HeCapabilities */ - type record WanMetrics { - Json.UInt8 wanInfo, - Json.UInteger downlinkSpeed, - Json.UInteger uplinkSpeed, - Json.UInt8 downlinkLoad, - Json.UInt8 uplinkLoad, - Json.UInt16 lmd + type record HeCapabilities { + Json.UInt8 heMacCapInfo, + Json.UInt8 hePhyCapinfo, + Json.UInt8 supportedHeMcsNssSet } /** - * @desc Load of a BSS - * @member staCount Indicates the total number of STAs currently associated with this BSS - * @member channelUtilization The percentage of time - * @member availAdmCap Available Admission Capacity that specifies the remaining amount of medium time available via explicit admission control, in units of 32 μs/s - * @see ETSI GS MEC 028 Clause 6.5.7 Type: BssLoad + * @desc Information on DMG Capabilities of an Access Point + * @member dmgStaCapInfo DMG station capabilities information + * @member dmgApOrPcpCapInfo DMG AP or PCP capabilities information + * @member dmgStaBeamTrackTimeLimit DMG station beam tracking time limit + * @member extScMcsCap Extended SC MCS capabilities + * @member maxNrBasicAmsduSubframes Number of basic A-MSDU subframes in A-MSDU + * @member maxNrShortAmsduSubframes Number of short A-MSDU subframes in A-MSDU + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.17-1: Attributes of the DmgCapabilities */ - type record BssLoad { - Json.UInt16 staCount, - Json.UInt8 channelUtilization, - Json.UInt16 availAdmCap + type record DmgCapabilities { + Json.UInteger dmgStaCapInfo, + Json.UInt16 dmgApOrPcpCapInfo, + Json.UInt16 dmgStaBeamTrackTimeLimit, + Json.UInt8 extScMcsCap, + Json.UInt8 maxNrBasicAmsduSubframes, + Json.UInt8 maxNrShortAmsduSubframes } /** - * @desc Extended BSS Load information - * @member muMimoStaCount Indicates the total number of STAs currently associated with this BSS that have a 1 in the MU Beamformee Capable field of their VHT Capabilities element - * @member spatStreamUnderUtil The percentage of time that the AP has underutilized spatial domain resources for given busy time of the medium - * @member obsSec20MhzUtil Observable loading on each of the secondary 20 MHz channel - * @member obsSec40MhzUtil Observable loading on each of the secondary 40 MHz channel - * @member obsSec80MhzUtil Observable loading on each of the secondary 80 MHz channel - * @see ETSI GS MEC 028 Clause 6.5.8 Type: ExtBssLoad + * @desc Information on EDMG Capabilities of an Access Point + * @member ampduParameters A-MPDU parameters + * @member trnParameters Training parameters + * @member supportedMcs Supported MCS + * @member reserved + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.18-1: Attributes of the EdmgCapabilities */ - type record ExtBssLoad { - Json.UInt16 muMimoStaCount, - Json.UInt8 spatStreamUnderUtil, - Json.UInt8 obsSec20MhzUtil, - Json.UInt8 obsSec40MhzUtil, - Json.UInt8 obsSec80MhzUtil + type record EdmgCapabilities { + Json.UInt8 ampduParameters, + Json.UInt16 trnParameters, + Json.UInteger supportedMcs } /** @@ -202,21 +616,21 @@ module WlanInformationAPI_TypesAndValues { * @member altitudeUncertainty The uncertainty for altitude information * @member altitude The altitude value of location * @member datum The datum value to express how coordinates are organized and related to real world - * @see ETSI GS MEC 028 Clause 6.5.19 Type: GeoLocation + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.19-1: Attributes of the GeoLocation */ type record GeoLocation { - Json.UInt8 latUncertainty, + Json.UInt8 latUncertainty, Json.UInteger lat, - Json.UInt8 longUncertainty, + Json.UInt8 longUncertainty, Json.UInteger long, - Json.UInt8 altitudeType optional, - Json.UInt8 altitudeUncertainty optional, + Json.UInt8 altitudeType optional, + Json.UInt8 altitudeUncertainty optional, Json.UInteger altitude optional, - Json.UInt8 datum + Json.UInt8 datum } /** - * @desc Iinformation on Civic Location of an Access Point + * @desc Information on Civic Location of an Access Point * @member country The two-letter ISO 3166 [i.9] country code in capital ASCII letters, e.g. DE or US, as per ISO 3166 * @member ca0 Language * @member ca0 Language @@ -251,7 +665,7 @@ module WlanInformationAPI_TypesAndValues { * @member ca38 Street name pre-modifier * @member ca39 Street name post-modifier * @member ca128 Script - * @see ETSI GS MEC 028 Clause 6.5.20 Type: CivicLocation + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.20-1: Attributes of the CivicLocation */ type record CivicLocation { Json.String country, @@ -285,291 +699,14 @@ module WlanInformationAPI_TypesAndValues { Json.String ca36 optional, Json.String ca37 optional, Json.String ca38 optional, - Json.String ca39 optional, - Json.String ca128 optional - } - - /** - * @desc Location information of the Access Point - * @member geolocation Geospatial Location of the AP - * @member civicLocation Civic Location of the AP - * @see ETSI GS MEC 028 Clause 6.5.9 Type: ApLocation - */ - type record ApLocation { - GeoLocation geolocation optional, - CivicLocation civicLocation optional - } - - /** - * @desc Identifiers determining a specific client station - * @member macId Unique identifier assigned to station (as network interface controller) for communications at the data link layer of a network segment - * @member ssid Service Set Identifier to identify logical networks - * @member aid Number which identifies a particular association between a station and an Access Point - * @member ipAddress IPv4 or IPv6 address allocated for the station - * @see ETSI GS MEC 028 Clause 6.5.11 Type: StaIdentity - */ - type record StaIdentity { - Json.String macId, - Json.String ssid optional, - Json.String aid optional, - Json.String ipAddress optional - } - type record of StaIdentity StaIdentities; - - /** - * @desc Information about neighbor Access Points - * @member staId Identifier to uniquely specify the station whose information is exposed within this report - * @member measurementId Measurement ID of the Measurement configuration applied to this Neighbor Report - * @member bssid BSS Id of the Access Point that is being reported - * @member bssidInfo Additional information related to Access Point that is being reported - * @member operatingClass The channel set of the AP indicated by this BSSID - * @member channel The channel currently used by this Access Point - * @member phyType PHY type of the AP indicated by this BSSID. It is an integer value coded according to the value of the dot11PHYType - * @member bssTransitionCandidatePreference Relative value indicating the preferred ordering for this BSS as a transition candidate for roaming - * @see ETSI GS MEC 028 Clause 6.5.10 Type: NeighborReport - */ - type record NeighborReportItem { - StaIdentity staId, - Json.String measurementId, - Json.String bssid, - Json.UInteger bssidInfo, - Json.UInt8 operatingClass, - Json.UInt8 channel, - Json.UInt8 phyType, - Json.UInt8 bssTransitionCandidatePreference optional - } - type record of NeighborReportItem NeighborReport; - - /** - * @desc Information for the Access Point that the client station is associated to - * @member bssid Basic Service Set Identifier (BSSID) is a unique identifier assigned to the Access Point (as network interface controller) for communications at the data link layer of a network segment. - * @member ssid Service Set Identifier to identify logical networks - * @member assocId Unique number which identifies a particular association between the station and Access Point - * @member ipAddress IPv4 or IPv6 address allocated for the Access Point - * @see ETSI GS MEC 028 Clause 6.5.12 Type: ApAssociated - */ - type record ApAssociated { - Json.String bssid, - Json.String ssid optional, - Json.String assocId optional, - Json.String ipAddress optional - } - - /** - * @desc Optionally reported reason for STA Statistics Group Identities 0 or 1 (STA Counters) in the STA Statistics Optional subelements - * @member failed dot11Failed - * @member fcsError dot11FCSError - * @member multipleRetry dot11MultipleRetry - * @member frameDuplicate dot11FrameDuplicate - * @member rtsFailure dot11RTSFailure - * @member ackFailure dot11AckFailure - * @member retry dot11Retry - * @see ETSI GS MEC 028 Clause 6.5.37 Type: ReportingReasonStaCounters - */ - type record ReportingReasonStaCounters { - Json.Bool failed, - Json.Bool fcsError, - Json.Bool multipleRetry, - Json.Bool frameDuplicate, - Json.Bool rtsFailure, - Json.Bool ackFailure, - Json.Bool retry - } - - /** - * @desc Optionally reported reason for STA Statistics Group Identities 2 to 9 (QoS STA Counters) in the STA Statistics - * @member qosFailed dot11QoSFailed - * @member qosRetry dot11QoSRetry - * @member qosMultipleRetry dot11QoSMultipleRetry - * @member qosFrameDuplicate dot11QoSFrameDuplicate - * @member qosRtsFailure dot11QoSRTSFailure - * @member qosAckFailure dot11QoSAckFailure - * @member qosDiscarded dot11QoSDiscarded - * @see ETSI GS MEC 028 Clause 6.5.38 Type: ReportingReasonQoSCounters - */ - type record ReportingReasonQoSCounters { - Json.Bool qosFailed, - Json.Bool qosRetry, - Json.Bool qosMultipleRetry, - Json.Bool qosFrameDuplicate, - Json.Bool qosRtsFailure, - Json.Bool qosAckFailure, - Json.Bool qosDiscarded - } - - /** - * @desc Channel Load report from a station - * @member staId Identifier to uniquely specify the station whose information is exposed within this report - * @member measurementId Measurement ID of the Measurement configuration applied to this Channel Load Report - * @member operatingClass Operating Class field indicates an operating class value - * @member channel Channel number indicates the channel number for which the measurement report applies - * @member measurementDuration Duration over which the Channel Load report was measured, in units of TUs of 1024 µs - * @member channelLoad Proportion of measurement duration for which the measuring STA determined the channel to be busy, as a percentage of time, linearl scaled with 255 representing 100% - * @see ETSI GS MEC 028 Clause 6.5.39 Type: ChannelLoad - */ - type record ChannelLoadItem { - StaIdentity staId optional, - Json.String measurementId, - Json.UInt8 operatingClass, - Json.UInt8 channel, - Json.UInt8 measurementDuration, - Json.UInt8 channelLoad - } - type record of ChannelLoadItem ChannelLoad; - - /** - * @desc The load of a Overlapping BSS - * @member allocatedTrafficSelfMean Mean of allocated traffic from this AP (BSS) in units of 32 µs per second - * @member allocatedTrafficSelfStdDev Standard deviation from the mean of allocation traffic from this BSS in units of 32 µs per second - * @member Mean of the sum of allocated traffic from other APs on the overlapping channel in unit of 32 µs per second - * @member Standard deviation from the mean of the sum of allocated traffic from other APs on the overlapping channel in unit of 32 µs per second - * @member overlap Indicates the number of other APs that are sharing the same channel as the reporting AP - * @see ETSI GS MEC 028 Clause 6.5.40 Type: OBssLoad - */ - type record OBssLoad { - Json.UInt16 allocatedTrafficSelfMean, - Json.UInt16 allocatedTrafficSelfStdDev optional, - Json.UInt16 allocatedTrafficShareMean, - Json.UInt16 allocatedTrafficShareStdDev optional, - Json.UInt8 overlap optional - } - - /** - * @desc - * @member ssid Contains an SSID element - * @member bssid BSSID of the neighbor AP which information is intended to obtain - * @see ETSI GS MEC 028 Clause 6.5.32 Type: NeighborReportConfig - */ - type record NeighborReportConfig { - Json.String ssid optional, - Json.String bssid optional - } - - /** - * @desc The information required to define client station measurements available from the WLAN Access Information Service - * @member measurementDuration Duration of the measurement in time units (TUs) of 1024 µs - * @member randomInterval Random interval to be used for starting the measurement in TUs of 1024 µs - * @member channelLoadConf Configuration related to the Channel Load - * @member beaconRequestConf Configuration related to Beacon Request - * @member staStatisticsConf Configuration related to the statistics provided by STAs - * @member neighborReportConf Configuration related to Neighbor Reports - * @see ETSI GS MEC 028 Clause 6.5.41 Type: MeasurementInfo - */ - type record MeasurementInfo { - Json.UInt16 measurementDuration optional, - Json.UInt16 randomInterval optional, - ChannelLoadConfig channelLoadConf optional, - BeaconRequestConfig beaconRequestConf optional, - StaStatisticsConfig staStatisticsConf optional, - NeighborReportConfig neighborReportConf optional - } - - /** - * @desc STA Statistics Group Data for Group Identity = 0 - * @member transmittedFragmentCount dot11TransmittedFragmentCount counter - * @member groupTransmittedFrameCount dot11GroupTransmittedFrameCount counter - * @member failedCount dot11FailedCount counter - * @member receivedFragmentCountdot11ReceivedFragmentCount counter - * @member groupReceivedFrameCountdot11GroupReceivedFrameCount counter - * @member fcsErrorCount dot11FCSErrorCount counter - * @member transmittedFrameCount dot11TransmittedFrameCount counter - * @member reportingReasonStaCounters Optionally reported reason for STA Statistics Group 0 - * @see ETSI GS MEC 028 Clause 6.5.34 Type: StaStatisticsGroupZeroData - */ - type record StaStatisticsGroupZeroData { - Json.UInteger transmittedFragmentCount, - Json.UInteger groupTransmittedFrameCount, - Json.UInteger failedCount, - Json.UInteger receivedFragmentCount, - Json.UInteger groupReceivedFrameCount, - Json.UInteger fcsErrorCount, - Json.UInteger transmittedFrameCount, - ReportingReasonStaCounters reportingReasonStaCounters optional - } - - /** - * @desc STA Statistics Group Data for Group Identity = 1 - * @member retryCount dot11RetryCount counter - * @member multipleRetryCount dot11MultipleRetryCount counter - * @member frameDuplicateCount dot11FrameDuplicateCount counter - * @member rtsSuccessCount dot11RTSSuccessCount counter - * @member rtsFailureCount dot11RTSFailureCount counter - * @member ackFailureCount dot11AckFailureCount counter - * @member reportingReasonStaCounters Optionally reported reason for STA Statistics Group 1 - * @see ETSI GS MEC 028 Clause 6.5.35-1: Attributes of the StaStatisticsGroupOneData - */ - type record StaStatisticsGroupOneData { - Json.UInteger retryCount, - Json.UInteger multipleRetryCount, - Json.UInteger frameDuplicateCount, - Json.UInteger rtsSuccessCount, - Json.UInteger rtsFailureCount, - Json.UInteger ackFailureCount, - ReportingReasonStaCounters reportingReasonStaCounters optional - } - - - /** - * @desc STA Statistics Group Data for Group Identity = 2 through 9 - * @member qosTransmittedFragmentCount dot11QosTransmittedFragmentCount counter - * @member qosFailedCount dot11QosFailedCount counter - * @member qosRetryCount dot11QosRetryCount counter - * @member qosMultipleRetryCount dot11QosMultipleRetryCount counter - * @member qosFrameDuplicateCount dot11QosFrameDuplicateCount counter - * @member qosRTSSuccessCount dot11QosRTSSuccessCount counter - * @member qosRTSFailureCount dot11QosRTSFailureCount counter - * @member qosAckFailureCount dot11QosAckFailureCount counter - * @member qosReceivedFragmentCount dot11QosReceivedFragmentCount counter - * @member qosTransmittedFrameCount dot11QosTransmittedFrameCount counter - * @member qosDiscardedFrameCount dot11QosDiscardedFrameCount counter - * @member qosMPDUsReceivedCount dot11QosMPDUsReceivedCount counter - * @member qosRetriesReceivedCount dot11QosRetriesReceivedCount counter - * @member reportingReasonQoSCounters Optionally reported reason for STA Statistics Groups 2 to 9 - * @see ETSI GS MEC 028 Clause 6.5.36-1: Attributes of the StaStatisticsGroup2to9Data - */ - type record StaStatisticsGroup2to9Data { - Json.UInteger qosTransmittedFragmentCount, - Json.UInteger qosFailedCount, - Json.UInteger qosRetryCount, - Json.UInteger qosMultipleRetryCount, - Json.UInteger qosFrameDuplicateCount, - Json.UInteger qosRTSSuccessCount, - Json.UInteger qosRTSFailureCount, - Json.UInteger qosAckFailureCount, - Json.UInteger qosReceivedFragmentCount, - Json.UInteger qosTransmittedFrameCount, - Json.UInteger qosDiscardedFrameCount, - Json.UInteger qosMPDUsReceivedCount, - Json.UInteger qosRetriesReceivedCount, - ReportingReasonQoSCounters reportingReasonQoSCounters optional - } - - /** - * @desc Information statistics of the client station - * @member staId Identifier to uniquely specify the station whose information is exposed within this report - * @member measurementId Measurement ID of the Measurement configuration applied to this STA Statistics Report - * @member measurementDuration Duration over which the Statistics Group Data was measured in time units of 1024 µs - * @member groupIdentity Indicates the requested statistics group describing the Statistics Group Data - * @member groupZeroData STA Statistics Data for Group Identity = 0 - * @member groupOneData STA Statistics Data for Group Identity = 1 - * @member group2to9Data STA Statistics Data for Group Identity = 2 through 9 - * @see ETSI GS MEC 028 Clause 6.5.13 Type: StaStatistics - */ - type record StaStatistics { - StaIdentity staId optional, - Json.String measurementId, - Json.String measurementDuration, - Json.UInt8 groupIdentity, - StaStatisticsGroupZeroData groupZeroData optional, - StaStatisticsGroupOneData groupOneData optional, - StaStatisticsGroup2to9Data group2to9Data optional + Json.String ca39 optional, + Json.String ca128 optional } - type Json.UInt8 StatisticsGroupData; // Note defined, see ETSI GS MEC 028 Clause 6.5.13 Type: StaStatistics - /** + /** * @desc Information on the Received Signal Strength Indicator (RSSI) of a client station * @member rssi The Received Signal Strength Indicator from a station - * @see ETSI GS MEC 028 Clause 6.5.21 Type: Rssi + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.21-1: Attributes of the Rssi */ type record Rssi { Json.UInt8 rssi @@ -580,336 +717,386 @@ module WlanInformationAPI_TypesAndValues { * @member staId Identifier(s) to uniquely specify the client station(s) associated * @member staLastDataDownlinkRate The data transmit rate in kbps that was most recently used for transmission of data PPDUs from the access point to the station * @member staLastDataUplinkRate The data transmit rate in Kbps that was most recently used for transmission of data PPDUs from the associated station to the access point - * @see ETSI GS MEC 028 Clause 6.5.22 Type: StaDataRate + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.22-1: Attributes of the StaDataRate */ type record StaDataRate { - StaIdentity staId optional, + StaIdentity staId optional, Json.UInteger staLastDataDownlinkRate optional, Json.UInteger staLastDataUplinkRate optional } - type record of StaDataRate StaDataRates; + type record of StaDataRate StaDataRateList; /** * @desc Type of link * @member href URI referring to a resource - * @see ETSI GS MEC 028 Clause 6.5.23 Type: LinkType + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.23-1: Attributes of the LinkType */ type record LinkType { Json.AnyURI href } - type record LinkTypes { - LinkType self_ - } with { - variant (self_) "name as 'self'"; - } - /** - * @desc This configuration applies to BssLoad measurement - * @member apId Identifier(s) to uniquely specify the target Access Point - * @member cChannelId Channel number which load is reported - * @member channelLoad Channel load as per IEEE 802.11-2012 - * @see ETSI GS MEC 028 Clause 6.5.24 Type: ChannelLoadConfig + * @desc This configuration applies to Channel Load measurement + * @member operatingClass Operating Class field indicates an operating class value + * @member channel Channel for which the channel load report is requested + * @member reportingCondition Reporting condition for the Beacon Report + * @member threshold Channel Load reference value for threshold reporting + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.24-1: Attributes of the ChannelLoadConfig */ type record ChannelLoadConfig { - ApIdentity apId, - Json.UInteger cChannelId, - Json.UInteger channelLoad + Json.UInt8 operatingClass, + Json.UInteger channel, + Json.UInt8 reportingCondition optional, + Json.UInt8 threshold optional } /** - * @desc - * @member staId Identifier to uniquely specify the station whose information is exposed within this data type + * @desc This configuration applies to the BeaconReport + * @member operatingClass Operating Class field indicates an operating class value * @member channelId Channel number to scan - * @member measurementMode - * @member bssId The BSSID field indicates the BSSID of the BSS(s) for which a beacon report is requested. When requesting beacon reports for all BSSs on the channel, the BSSID field contains the wildcard BSSID - * @member ssId The SSID subelement indicates the ESS(s) or IBSS(s) for which a beacon report is requested - * @member reportingCondition As in table T9-89 of IEEE 802.11-2012 - * @see ETSI GS MEC 028 Clause 6.5.25 Type: BeaconRequestConfig + * @member measurementMode + * @member bssid The BSSID field indicates the BSS for which a beacon report is requested + * @member ssid The SSID subelement indicates the ESS or IBSS for which a beacon report is requested + * @member beaconReportingConf Beacon reporting configuration data field + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.25-1: Attributes of the BeaconRequestConfig */ type record BeaconRequestConfig { - StaIdentity staId, - Json.UInteger channelId, - Json.UInteger measurementMode, - BssIds bssId, - SsIds ssId optional, - Json.UInteger reportingCondition + Json.UInt8 operatingClass, + Json.UInt8 channelId, + Json.UInt8 measurementMode, + Json.String bssid optional, + Json.String ssid optional, + BeaconReportingConfig beaconReportingConf } - type record of Json.String BssIds; - type record of Json.String SsIds; /** - * @desc - * @member staId Identifier to uniquely specify the station whose information is exposed within this data type + * @desc This configuration applies to the StaStatistics report * @member groupIdentity As per table T 9-114 of IEEE 802.11-2012 * @member triggeredReport Yes, use triggered report + * @member measurementCount Specifies the number of MAC service data units or protocol data units to determine if the trigger conditions are met * @member triggerTimeout The Trigger Timeout field contains a value in units of 100 TUs during which a measuring STA does not generate further triggered STA Statistics Reports after a trigger condition has been met - * @member triggerCondition As per Figure 9-161 of IEEE 802.11. This bitmap defines what are the metrics returned by the STA Statistics Report - * @see ETSI GS MEC 028 Clause 6.5.26 Type: StaStatisticsConfig + * @member triggerCondition Defines what are the metrics returned by the STA Statistics Report + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.26-1: Attributes of the StaStatisticsConfig */ type record StaStatisticsConfig { - StaIdentity staId, - Json.UInteger groupIdentity, - boolean triggeredReport, - Json.UInteger triggerTimeout, - Json.UInt16 triggerCondition + Json.UInt8 groupIdentity, + Json.Bool triggeredReport, + Json.UInteger measurementCount optional, + Json.UInt16 triggerTimeout optional, + STACounterTriggerCondition triggerCondition optional } /** - * @desc + * @desc This type represents information in a STA Beacon report * @member staId Identifier to uniquely specify the station whose information is exposed within this data type + * @member operatingClass Operating Class field indicates an operating class value * @member measurementId Measurement ID of the Measurement configuration applied to this Beacon Report - * @member bssId The BSSID field indicates the BSSID of the BSS(s) for which a beacon report has been received - * @member ssId The SSID subelement indicates the ESS(s) or IBSS(s) for which a beacon report is received - * @see ETSI GS MEC 028 Clause 6.5.27 Type: BeaconReport + * @member channel Channel number where the beacon was received + * @member reportedFrameInfo Information about the reported beacon frame + * @member bssid Indicates the BSSID of the BSS(s) for which a beacon report has been received + * @member ssid Indicates the ESS(s) or IBSS(s) for which a beacon report is received + * @member rcpi Indicates the received channel power of the Beacon + * @member rsni Indicates the received signal-to-noise indication for the Beacon + * @member antennaId contains the identifying number for the antenna(s) used for this measurement + * @member parentTsf contains the lower 4 octets of the measuring STA's TSF timer value at the start of reception of the first octet of the timestamp field of the reported Beacon + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.27-1: Attributes of the BeaconReport */ - type record BeaconReportItem { - StaIdentity staId, - Json.String measurementId, - Json.UInteger channelId, - BssIds bssId, - SsIds ssId optional + type record BeaconReport_ { + StaIdentity staId, + Json.String measurementId, + Json.UInt8 operatingClass, + Json.UInt8 channel, + ReportedBeaconFrameInfo reportedFrameInfo, + Json.String bssid, + Json.String ssid optional, + Json.UInt8 rcpi optional, + Json.UInt8 rsni optional, + Json.UInt8 antennaId optional, + Json.UInteger parentTsf optional } - type record of BeaconReportItem BeaconReport; + type record of BeaconReport_ BeaconReport; /** - * @desc Information on Access Points available from the WLAN Access Information Service - * @member timeStamp TimeStamp - * @member apId Identifier(s) to uniquely specify the Access Point whose information is exposed within this data type - * @member channel Channel configured for the Access Point - * @member wlanCap WLAN capabilities of Access Point - * @member wanMetrics WAN Metrics element provides information about the WAN link connecting an IEEE 802.11 Access Node and the Internet - * @member bssLoad BSS Load attribute contains information on the current STA population and traffic levels in the BSS - * @member extBssLoad Extended BSS Load attribute contains more detailed information on the current STA population and traffic levels in the BSS - * @member apLocation The location on the Access Point - * @see ETSI GS MEC 028 Clause 6.2.2 Type: ApInfo + * @desc This type represents the Beacon Reporting Condition configuration + * @member reportingCondition Reporting condition for the Beacon Report + * @member threshold Contains either the threshold value or the offset value to be used for conditional reporting + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.28-1: Attributes of the BeaconReportingConfig */ - type record ApInfo { - TimeStamp timeStamp optional, - ApIdentity apId, - Json.UInteger channel optional, - WlanCapabilities wlanCap optional, - WanMetrics wanMetrics optional, - BssLoad bssLoad optional, - ExtBssLoad extBssLoad optional, - OBssLoad oBssLoad optional, - ApLocation apLocation optional + type record BeaconReportingConfig { + Json.UInt8 reportingCondition, + Json.UInt8 threshold } - type record of ApInfo ApInfoList; /** - * @desc Information on wireless stations available from the WLAN Access Information Service - * @member timeStamp TimeStamp - * @member staId Identifier(s) to uniquely specify station whose information is exposed within this data type - * @member channel Channel configured for the Access Point - * @member apAssociated Information about the Access Point that this Client Station is associated to - * @member rssi Receive Signal Strength Indicator - * @member staDataRate Station Data Rate - * @member staStatistics Statistics as defined in IEEE 802.11-2016 for the client station collected over measurement duration - * @member beaconReport Beacon Report as defined in Wi-Fi Agile Multiband Specification - * @member neighborReport Information about neighbor Access Points seen by the station - * @member channelLoad Channel Load reports as seen by the station - * @see ETSI GS MEC 028 Clause 6.2.3 Type: StaInfo + * @desc This type represents the Beacon Reported Frame information + * @member phyType Value between 0 and 127 coded according to dot11PHYType + * @member frameType A value of 0 indicates a Beacon or Probe Response. A value of 1 indicates a Measurement Pilot frame + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.29-1: Attributes of the ReportedBeaconFrameInfo */ - type record StaInfo { - TimeStamp timeStamp optional, - StaIdentity staId, - Json.UInteger channel optional, - ApAssociated apAssociated optional, - Rssi rssi optional, - StaDataRate staDataRate optional, - StaStatistics staStatistics optional, - BeaconReport beaconReport optional, - NeighborReport neighborReport optional, - ChannelLoad channelLoad optional + type record ReportedBeaconFrameInfo { + Json.UInt8 phyType, + Json.UInt8 frameType + } + /** + * @desc This type represents BSSID Information field within the Neighbor Report + * @member apReachability The apReachability field indicates whether the AP identified by this BSSID is reachable by the STA that requested the neighbor report + * @member security True indicates the AP identified by this BSSID supports the same security provisioning as used by the STA in its current association + * @member capabilities Capability information for the AP indicated by this BSSID + * @member highThroughputTrue indicates that the AP represented by this BSSID is an HT AP including the HT Capabilities element in its Beacons, and that the contents of that HT Capabilities element are identical to the HT Capabilities element advertised by the AP sending the report + * @member veryHighThroughputTrue indicates that the AP represented by this BSSID is a VHT AP and that the VHT Capabilities element + * @member ftm True indicates the AP represented by this BSSID is an AP that has set the Fine Timing Measurement Responder field of the Extended Capabilities element to 1 + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.30-1: Attributes of the BssidInfo + */ + type record BssidInfo { + Json.UInt8 apReachability, + Json.Bool security, + BssCapabilities capabilities, + Json.Bool highThroughput, + Json.Bool veryHighThroughput, + Json.Bool ftm } - type record of StaInfo StaInfoList; + /** - * @desc Different measurements configuration available from the WLAN Access Information Service - * @member _links Hyperlink related to the resource - * @member staId Identifier(s) to uniquely specify the target client station(s) for the measurement configuration - * @member measurementId Identifier of this measurement configuration - * @member measurementInfo Information used to configure this measurement - * @see ETSI GS MEC 028 Clause 6.2.4 Type: MeasurementConfig + * @desc This type represents BSS Capabilities subfield within the Neighbor Report + * @member spectrumManagement Spectrum Management required + * @member qos QoS Option implemented + * @member apsd APSD Option implemented + * @member radioMeasurements Radio Measurement Activated + * @member delayedBACK Delayed Block Ack Option implemented + * @member immediateBACK Immediate Block Ack Option implemented + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.31-1: Attributes of the BssCapabilities */ - type record MeasurementConfig { - LinkTypes links optional, - StaIdentities staId, - Json.String measurementId, - MeasurementInfo measurementInfo - } with { - variant (links) "name as '_links'"; + type record BssCapabilities { + Json.Bool spectrumManagement, + Json.Bool qos, + Json.Bool apsd, + Json.Bool radioMeasurements, + Json.Bool delayedBACK, + Json.Bool immediateBACK } - type record MeasurementConfig_MeasurementConfigLinkList { - Json.AnyURI href, - Json.String measurementId + /** + * @desc This configuration applies to the Neighbor Report + * @member ssid Contains an SSID element + * @member bssid BSSID of the neighbor AP which information is intended to obtain + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.32-1: Attributes of the NeighborReportConfig + */ + type record NeighborReportConfig { + Json.String ssid optional, + Json.String bssid optional } /** - * @desc The different measurement configurations available from the WLAN Access Information Service - * @member _links Hyperlink related to the resource - * @member measurementConfig - * @see ETSI GS MEC 028 Clause 6.2.5 Type: MeasurementConfigLinkList + * @desc This type represents the STA Counter Trigger Condition configuration + * @member failedCountThreshold Configure and set threshold for dot11FailedCount trigger + * @member fcsErrorCountThreshold Configure and set threshold for dot11FCSErrorCount trigger + * @member multipleRetryCountThreshold Configure and set threshold for dot11MultipleRetryCount trigger + * @member frameDuplicateCountThreshold Configure and set threshold for dot11FrameDuplicateCount trigger + * @member rtsFailureCountThreshold Configure and set threshold for dot11RTSFailureCount trigger + * @member ackFailureCountThreshold Configure and set threshold for dot11AckFailureCount trigger + * @member retryCountThreshold Configure and set threshold for dot11RetryCount trigger + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.33-1: Attributes of the STACounterTriggerCondition */ - type record MeasurementConfigLinkList { - LinkTypes links optional, - MeasurementConfig_MeasurementConfigLinkList measurementConfig - } with { - variant (links) "name as '_links'"; + type record STACounterTriggerCondition { + Json.UInteger failedCountThreshold optional, + Json.UInteger fcsErrorCountThreshold optional, + Json.UInteger multipleRetryCountThreshold optional, + Json.UInteger frameDuplicateCountThreshold optional, + Json.UInteger rtsFailureCountThreshold optional, + Json.UInteger ackFailureCountThreshold optional, + Json.UInteger retryCountThreshold optional } /** - * @desc Set for trigger-based event notification reporting - * @member trigger_ Trigger for the notification - * @member threshold Number of connected stations threshold for trigger-based event reporting - * @see ETSI GS MEC 028 Clause 6.3.3 Type: StaDataRateSubscription + * @desc STA Statistics Group Data for Group Identity = 0 + * @member transmittedFragmentCount dot11TransmittedFragmentCount counter + * @member groupTransmittedFrameCount dot11GroupTransmittedFrameCount counter + * @member failedCount dot11FailedCount counter + * @member receivedFragmentCountdot11ReceivedFragmentCount counter + * @member groupReceivedFrameCountdot11GroupReceivedFrameCount counter + * @member fcsErrorCount dot11FCSErrorCount counter + * @member transmittedFrameCount dot11TransmittedFrameCount counter + * @member reportingReasonStaCounters Optionally reported reason for STA Statistics Group 0 + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.34-1: Attributes of the StaStatisticsGroupZeroData */ - type record NotificationEvent { - Json.UInt8 trigger_, - Json.UInt8 threshold - } with { - variant (trigger_) "name as 'trigger'"; + type record StaStatisticsGroupZeroData { + Json.UInteger transmittedFragmentCount, + Json.UInteger groupTransmittedFrameCount, + Json.UInteger failedCount, + Json.UInteger receivedFragmentCount, + Json.UInteger groupReceivedFrameCount, + Json.UInteger fcsErrorCount, + Json.UInteger transmittedFrameCount, + ReportingReasonStaCounters reportingReasonStaCounters optional } /** - * @desc Subscription to get updates on client stations that are associated to an Access Point - * @member subscriptionType Shall be set to "AssocStaSubscription" - * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed WLAN information - * @member requestTestNotification Set to TRUE by the service consumer to request a test notification on the callbackReference URI to determine if it is reachable by the WAIS for notifications - * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the WAIS and the service consumer for notifications, either in place of the callbackReference URI or if it is not reachable via the test notification - * @member _links Hyperlink related to the resource - * @member apId Identifier(s) to uniquely specify the target Access Point for the subscription - * @member notificationPeriod Set for periodic notification reporting - * @member notificationEvent Set for trigger-based event notification reporting - * @member expiryDeadline The expiration time of the subscription determined by the WLAN Access Information Service - * @see ETSI GS MEC 028 Clause 6.3.2 Type: AssocStaSubscription + * @desc STA Statistics Group Data for Group Identity = 1 + * @member retryCount dot11RetryCount counter + * @member multipleRetryCount dot11MultipleRetryCount counter + * @member frameDuplicateCount dot11FrameDuplicateCount counter + * @member rtsSuccessCount dot11RTSSuccessCount counter + * @member rtsFailureCount dot11RTSFailureCount counter + * @member ackFailureCount dot11AckFailureCount counter + * @member reportingReasonStaCounters Optionally reported reason for STA Statistics Group 1 + * @see ETSI GS MEC 028 V2.3.1 Clause 6.5.35-1: Attributes of the StaStatisticsGroupOneData */ - type record AssocStaSubscription { - Json.String subscriptionType, - Json.AnyURI callbackReference optional, - Json.Bool requestTestNotification optional, - WebsockNotifConfig websockNotifConfig optional, - LinkTypes links optional, - ApIdentity apId, - Json.UInt8 notificationPeriod optional, - NotificationEvent notificationEvent optional, - TimeStamp expiryDeadline optional - } with { - variant (links) "name as '_links'"; + type record StaStatisticsGroupOneData { + Json.UInteger retryCount, + Json.UInteger multipleRetryCount, + Json.UInteger frameDuplicateCount, + Json.UInteger rtsSuccessCount, + Json.UInteger rtsFailureCount, + Json.UInteger ackFailureCount, + ReportingReasonStaCounters reportingReasonStaCounters optional } - type record of AssocStaSubscription AssocStaSubscriptionList; /** - * @desc Subscription to get updates on the Data Rate of targeted client station(s) - * @member subscriptionType Shall be set to "AssocStaSubscription" - * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed WLAN information - * @member requestTestNotification Set to TRUE by the service consumer to request a test notification on the callbackReference URI to determine if it is reachable by the WAIS for notifications - * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the WAIS and the service consumer for notifications, either in place of the callbackReference URI or if it is not reachable via the test notification - * @member _links Hyperlink related to the resource - * @member staId Identifier(s) to uniquely specify the target client station(s) for the subscription - * @member notificationPeriod Set for periodic notification reporting - * @member notificationEvent Set for trigger-based event notification reporting - * @member expiryDeadline The expiration time of the subscription determined by the WLAN Access Information Service - * @see ETSI GS MEC 028 Clause 6.3.3 Type: StaDataRateSubscription + * @desc STA Statistics Group Data for Group Identity = 2 through 9 + * @member qosTransmittedFragmentCount dot11QosTransmittedFragmentCount counter + * @member qosFailedCount dot11QosFailedCount counter + * @member qosRetryCount dot11QosRetryCount counter + * @member qosMultipleRetryCount dot11QosMultipleRetryCount counter + * @member qosFrameDuplicateCount dot11QosFrameDuplicateCount counter + * @member qosRTSSuccessCount dot11QosRTSSuccessCount counter + * @member qosRTSFailureCount dot11QosRTSFailureCount counter + * @member qosAckFailureCount dot11QosAckFailureCount counter + * @member qosReceivedFragmentCount dot11QosReceivedFragmentCount counter + * @member qosTransmittedFrameCount dot11QosTransmittedFrameCount counter + * @member qosDiscardedFrameCount dot11QosDiscardedFrameCount counter + * @member qosMPDUsReceivedCount dot11QosMPDUsReceivedCount counter + * @member qosRetriesReceivedCount dot11QosRetriesReceivedCount counter + * @member reportingReasonQoSCounters Optionally reported reason for STA Statistics Groups 2 to 9 + * @see ETSI GS MEC 028 V2.3.1 Clause 6.5.36-1: Attributes of the StaStatisticsGroup2to9Data */ - type record StaDataRateSubscription { - Json.String subscriptionType, - Json.AnyURI callbackReference, - Json.Bool requestTestNotification optional, - WebsockNotifConfig websockNotifConfig optional, - LinkTypes links optional, - StaIdentities staId, - Json.UInt8 notificationPeriod optional, - NotificationEvent notificationEvent optional, - TimeStamp expiryDeadline optional - } with { - variant (links) "name as '_links'"; + type record StaStatisticsGroup2to9Data { + Json.UInteger qosTransmittedFragmentCount, + Json.UInteger qosFailedCount, + Json.UInteger qosRetryCount, + Json.UInteger qosMultipleRetryCount, + Json.UInteger qosFrameDuplicateCount, + Json.UInteger qosRTSSuccessCount, + Json.UInteger qosRTSFailureCount, + Json.UInteger qosAckFailureCount, + Json.UInteger qosReceivedFragmentCount, + Json.UInteger qosTransmittedFrameCount, + Json.UInteger qosDiscardedFrameCount, + Json.UInteger qosMPDUsReceivedCount, + Json.UInteger qosRetriesReceivedCount, + ReportingReasonQoSCounters reportingReasonQoSCounters optional } - type record of StaDataRateSubscription StaDataRateSubscriptionList; /** - * @desc - * @member href The URI referring to the subscription - * @member subscriptionType Type of the subscription - * @see ETSI GS MEC 028 Clause 6.3.4 Type: SubscriptionLinkList + * @desc Optionally reported reason for STA Statistics Group Identities 0 or 1 (STA Counters) in the STA Statistics Optional subelements + * @member failed dot11Failed + * @member fcsError dot11FCSError + * @member multipleRetry dot11MultipleRetry + * @member frameDuplicate dot11FrameDuplicate + * @member rtsFailure dot11RTSFailure + * @member ackFailure dot11AckFailure + * @member retry dot11Retry + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.37-1: Attributes of the ReportingReasonStaCounters */ - type record SubscriptionItem { - Json.AnyURI href, - Json.String subscriptionType + type record ReportingReasonStaCounters { + Json.Bool failed, + Json.Bool fcsError, + Json.Bool multipleRetry, + Json.Bool frameDuplicate, + Json.Bool rtsFailure, + Json.Bool ackFailure, + Json.Bool retry } - type record of SubscriptionItem Subscription; /** - * @desc List of links related to currently existing subscriptions for the service consumer - * @member links List of hyperlinks related to the resource - * @member assocStaSubscription - * @see ETSI GS MEC 028 Clause 6.3.4 Type: SubscriptionLinkList + * @desc Optionally reported reason for STA Statistics Group Identities 2 to 9 (QoS STA Counters) in the STA Statistics + * @member qosFailed dot11QoSFailed + * @member qosRetry dot11QoSRetry + * @member qosMultipleRetry dot11QoSMultipleRetry + * @member qosFrameDuplicate dot11QoSFrameDuplicate + * @member qosRtsFailure dot11QoSRTSFailure + * @member qosAckFailure dot11QoSAckFailure + * @member qosDiscarded dot11QoSDiscarded + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.38-1: Attributes of the ReportingReasonQoSCounters */ - type record SubscriptionLinkList { - LinkTypes links, - Subscription subscription optional - } with { - variant (links) "name as '_links'"; + type record ReportingReasonQoSCounters { + Json.Bool qosFailed, + Json.Bool qosRetry, + Json.Bool qosMultipleRetry, + Json.Bool qosFrameDuplicate, + Json.Bool qosRtsFailure, + Json.Bool qosAckFailure, + Json.Bool qosDiscarded } /** - * @desc Configuration for the delivery of subscription notifications over Websockets - * @member websocketUri Set by WAIS to indicate to the service consumer the Websocket URI to be used for delivering notifications - * @member requestWebsocketUri Set to true by the service consumer to indicate that Websocket delivery is requested - * @see ETSI GS MEC 028 Clause 6.3.6 Type: WebsockNotifConfig + * @desc Channel Load report from a station + * @member staId Identifier to uniquely specify the station whose information is exposed within this report + * @member measurementId Measurement ID of the Measurement configuration applied to this Channel Load Report + * @member operatingClass Operating Class field indicates an operating class value + * @member channel Channel number indicates the channel number for which the measurement report applies + * @member measurementDuration Duration over which the Channel Load report was measured, in units of TUs of 1024 µs + * @member channelLoad Proportion of measurement duration for which the measuring STA determined the channel to be busy, as a percentage of time, linearl scaled with 255 representing 100% + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.39-1: Attributes of the ChannelLoad */ - type record WebsockNotifConfig { - Json.AnyURI websocketUri optional, - Json.Bool requestWebsocketUri optional + type record ChannelLoad_ { + StaIdentity staId optional, + Json.String measurementId, + Json.UInt8 operatingClass, + Json.UInt8 channel, + Json.UInt8 measurementDuration, + Json.UInt8 channelLoad } + type record of ChannelLoad_ ChannelLoad; /** - * @desc Notification from WLAN Access Information Service with regards to client stations associated to the targeted Access Point - * @member notificationType Shall be set to "AssocStaNotification" - * @member timeStamp Time stamp - * @member apId Identifier(s) to uniquely specify the Access Point to which the client stations are associated - * @member staId Identifier(s) to uniquely specify the client station(s) associated - * @see ETSI GS MEC 028 Clause 6.4.2 Type: AssocStaNotification + * @desc The load of a Overlapping BSS + * @member allocatedTrafficSelfMean Mean of allocated traffic from this AP (BSS) in units of 32 µs per second + * @member allocatedTrafficSelfStdDev Standard deviation from the mean of allocation traffic from this BSS in units of 32 µs per second + * @member Mean of the sum of allocated traffic from other APs on the overlapping channel in unit of 32 µs per second + * @member Standard deviation from the mean of the sum of allocated traffic from other APs on the overlapping channel in unit of 32 µs per second + * @member overlap Indicates the number of other APs that are sharing the same channel as the reporting AP + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.40-1: Attributes of the OBssLoad */ - type record AssocStaNotification { - Json.String notificationType, - TimeStamp timeStamp optional, - ApIdentity apId, - StaIdentities staId optional + type record OBssLoad { + Json.UInt16 allocatedTrafficSelfMean, + Json.UInt16 allocatedTrafficSelfStdDev optional, + Json.UInt16 allocatedTrafficShareMean, + Json.UInt16 allocatedTrafficShareStdDev optional, + Json.UInt8 overlap optional } /** - * @desc Notification from WLAN Information service with regards to Data Rates of the subscribed client stations - * @member notificationType Shall be set to "StaDataRateNotification" - * @member timeStamp Time stamp - * @member staDataRate Data rates of a client station - * @see ETSI GS MEC 028 Clause 6.4.3 Type: StaDataRateNotification + * @desc The information required to define client station measurements available from the WLAN Access Information Service + * @member measurementDuration Duration of the measurement in time units (TUs) of 1024 µs + * @member randomInterval Random interval to be used for starting the measurement in TUs of 1024 µs + * @member channelLoadConf Configuration related to the Channel Load + * @member beaconRequestConf Configuration related to Beacon Request + * @member staStatisticsConf Configuration related to the statistics provided by STAs + * @member neighborReportConf Configuration related to Neighbor Reports + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.41-1: Attributes for MeasurementInfo */ - type record StaDataRateNotification { - Json.String notificationType, - TimeStamp timeStamp optional, - StaDataRates staDataRate optional + type record MeasurementInfo { + Json.UInt16 measurementDuration optional, + Json.UInt16 randomInterval optional, + ChannelLoadConfig channelLoadConf optional, + BeaconRequestConfig beaconRequestConf optional, + StaStatisticsConfig staStatisticsConf optional, + NeighborReportConfig neighborReportConf optional } /** - * @desc Notification from WLAN Access Information service with regards to expiry of an existing subscription - * @member notificationType Shall be set to "ExpiryNotification" - * @member links Hyperlink related to the resource - * @member expiryDeadlineTime stamp - * @see ETSI GS MEC 028 Clause 6.4.4 Type: ExpiryNotification + * @desc Configuration for the delivery of subscription notifications over Websockets + * @member websocketUri Set by WAIS to indicate to the service consumer the Websocket URI to be used for delivering notifications + * @member requestWebsocketUri Set to true by the service consumer to indicate that Websocket delivery is requested + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.42-1: Attributes of the WebsockNotifConfig */ - type record ExpiryNotification { - Json.String notificationType, - LinkTypes links, - TimeStamp expiryDeadline - } with { - variant (links) "name as '_links'"; + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional } - } - with { +} with { encode "JSON" } // End of module WlanInformationAPI_TypesAndValues -- GitLab From 525ec9b81ad6dc50191be931cb3113d37f2324ca Mon Sep 17 00:00:00 2001 From: YannGarcia Date: Tue, 23 May 2023 09:29:16 +0200 Subject: [PATCH 13/58] Review typing for MEC 029 --- ttcn/AtsMec_Location/module.mk | 1 - ...xedAccessInformationServiceAPI_Pixits.ttcn | 12 +- ...AccessInformationServiceAPI_Templates.ttcn | 181 +-- ...sInformationServiceAPI_TypesAndValues.ttcn | 1015 ++++++++++++----- 4 files changed, 820 insertions(+), 389 deletions(-) diff --git a/ttcn/AtsMec_Location/module.mk b/ttcn/AtsMec_Location/module.mk index f40c553..8232228 100644 --- a/ttcn/AtsMec_Location/module.mk +++ b/ttcn/AtsMec_Location/module.mk @@ -14,7 +14,6 @@ modules := ../LibCommon \ ../LibMec/EdgePlatformApplicationEnablementAPI \ ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ ../LibMec/TrafficManagementAPI \ - ../LibMec/RnisAPI \ ../LibMec/UEAppInterfaceAPI \ ../LibMec/UEidentityAPI \ ../LibMec/V2XInformationServiceAPI \ diff --git a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pixits.ttcn b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pixits.ttcn index 563b4f2..183a6d9 100644 --- a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pixits.ttcn +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pixits.ttcn @@ -6,17 +6,17 @@ module FixedAccessInformationServiceAPI_Pixits { // LibMec_FixedAccessInformationServiceAPI import from FixedAccessInformationServiceAPI_TypesAndValues all; - modulepar GatewayId PX_FAI_GW_ID := { "" }; + modulepar GatewayIdList PX_FAI_GW_ID := { "" }; - modulepar GatewayId PX_NON_EXISTING_FAI_GW_ID := { "" }; + modulepar GatewayIdList PX_NON_EXISTING_FAI_GW_ID := { "" }; - modulepar CmdId PX_FAI_CM_ID := ""; + modulepar Json.String PX_FAI_CM_ID := ""; - modulepar CmdId PX_NON_EXISTING_FAI_CM_ID := ""; + modulepar Json.String PX_NON_EXISTING_FAI_CM_ID := ""; - modulepar OnuId PX_FAI_ONU_ID := ""; + modulepar Json.String PX_FAI_ONU_ID := ""; - modulepar OnuId PX_NON_EXISTING_FAI_ONU_ID := ""; + modulepar Json.String PX_NON_EXISTING_FAI_ONU_ID := ""; modulepar Json.String PX_FAI_SUB_ID := ""; diff --git a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Templates.ttcn b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Templates.ttcn index 1534408..5ac2133 100644 --- a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Templates.ttcn +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Templates.ttcn @@ -12,26 +12,42 @@ module FixedAccessInformationServiceAPI_Templates { template (omit) FaInfo m_fa_info( in template (value) CpInfo p_customerPremisesInfo, + in template (value) LastMileTech p_lastMileTech, + in template (value) InterfaceType p_interfaceType, in template (omit) TimeStamp p_timeStamp := omit, - in template (omit) ConnectivityInfo p_connectivityInfo := omit - ) := { - timeStamp := p_timeStamp, - customerPremisesInfo := p_customerPremisesInfo, - connectivityInfo := p_connectivityInfo - } // End of template m_fa_info - + in template (omit) Json.Integer p_dsbw := omit, + in template (omit) Json.Integer p_usbw := omit, + in template (omit) Json.Integer p_latency := omit + ) := { + timeStamp := p_timeStamp, + customerPremisesInfo := p_customerPremisesInfo, + lastMileTech := p_lastMileTech, + interfaceType := p_interfaceType, + dsbw := p_dsbw, + usbw := p_usbw, + latency := p_latency + } // End of template m_fa_info + template FaInfo mw_fa_info( template (present) CpInfo p_customerPremisesInfo := ?, + template (present) LastMileTech p_lastMileTech := ?, + template (present) InterfaceType p_interfaceType := ?, template TimeStamp p_timeStamp := *, - template ConnectivityInfo p_connectivityInfo := * - ) := { - timeStamp := p_timeStamp, - customerPremisesInfo := p_customerPremisesInfo, - connectivityInfo := p_connectivityInfo - } // End of template mw_fa_info + template Json.Integer p_dsbw := *, + template Json.Integer p_usbw := *, + template Json.Integer p_latency := * + ) := { + timeStamp := p_timeStamp, + customerPremisesInfo := p_customerPremisesInfo, + lastMileTech := p_lastMileTech, + interfaceType := p_interfaceType, + dsbw := p_dsbw, + usbw := p_usbw, + latency := p_latency + } // End of template mw_fa_info template (omit) DeviceInfo m_device_info( - in template (value) GatewayId p_gwId, + in template (value) Json.String p_gwId, in template (value) DeviceStatus p_deviceStatus, in template (value) Json.Number p_upTime, in template (value) Json.Number p_iPConnectionUpTime, @@ -40,7 +56,7 @@ module FixedAccessInformationServiceAPI_Templates { in template (value) Json.Number p_totalPacketsSent, in template (value) Json.Number p_totalPacketsReceived, in template (omit) TimeStamp p_timeStamp := omit, - in template (omit) DeviceId p_deviceId := omit, + in template (omit) Json.String p_deviceId := omit, in template (omit) IPPingDiagnostics p_iPPingDiagnostics := omit, in template (omit) TraceRouteDiagnostics p_traceRouteDiagnostics := omit, in template (omit) DownloadDiagnostics p_downloadDiagnostics := omit, @@ -63,7 +79,7 @@ module FixedAccessInformationServiceAPI_Templates { } // End of template m_device_info template DeviceInfo mw_device_info( - template (present) GatewayId p_gwId := ?, + template (present) Json.String p_gwId := ?, template (present) DeviceStatus p_deviceStatus := ?, template (present) Json.Number p_upTime := ?, template (present) Json.Number p_iPConnectionUpTime := ?, @@ -72,7 +88,7 @@ module FixedAccessInformationServiceAPI_Templates { template (present) Json.Number p_totalPacketsSent := ?, template (present) Json.Number p_totalPacketsReceived := ?, template TimeStamp p_timeStamp := *, - template DeviceId p_deviceId := *, + template Json.String p_deviceId := *, template IPPingDiagnostics p_iPPingDiagnostics := *, template TraceRouteDiagnostics p_traceRouteDiagnostics := *, template DownloadDiagnostics p_downloadDiagnostics := *, @@ -96,80 +112,111 @@ module FixedAccessInformationServiceAPI_Templates { template (omit) CableLineInfo m_cable_line_info( in template (value) CpInfo p_customerPremisesInfo, - in template (value) CmdInfo p_cmdInfo, - in template (omit) TimeStamp p_timeStamp := omit + in template (value) Json.String p_cmdId, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) CmStatus p_cmStatus := omit, + in template (omit) CmDpvStats p_cmDpvStats := omit, + in template (omit) ServiceFlowStats p_serviceFlowStats := omit ) := { timeStamp := p_timeStamp, customerPremisesInfo := p_customerPremisesInfo, - cmdInfo := p_cmdInfo + cmdId := p_cmdId, + cmStatus := p_cmStatus, + cmDpvStats := p_cmDpvStats, + serviceFlowStats := p_serviceFlowStats } // End of template m_cable_line_info template CableLineInfo mw_cable_line_info( template (present) CpInfo p_customerPremisesInfo := ?, - template (present) CmdInfo p_cmdInfo := ?, - template TimeStamp p_timeStamp := * + template (present) Json.String p_cmdId := ?, + template TimeStamp p_timeStamp := *, + template CmStatus p_cmStatus := *, + template CmDpvStats p_cmDpvStats := *, + template ServiceFlowStats p_serviceFlowStats := * + ) := { timeStamp := p_timeStamp, customerPremisesInfo := p_customerPremisesInfo, - cmdInfo := p_cmdInfo + cmdId := p_cmdId, + cmStatus := p_cmStatus, + cmDpvStats := p_cmDpvStats, + serviceFlowStats := p_serviceFlowStats } // End of template mw_cable_line_info template (omit) PonInfo m_pon_info( in template (value) CpInfo p_customerPremisesInfo, - in template (value) PonSYS_ID p_ponSYS_ID, - in template (value) OpticalNetworkInfo p_opticalNetworkInfo, + in template (value) Json.String p_ponSYS_ID, + in template (value) Json.String p_onuId, + in template (value) PonTech p_ponTech, + in template (value) OperationalState p_operationalState, + in template (value) DsRate p_dsRate, + in template (value) UsRate p_usRate, in template (omit) TimeStamp p_timeStamp := omit - ) := { + ) := { timeStamp := p_timeStamp, customerPremisesInfo := p_customerPremisesInfo, ponSYS_ID := p_ponSYS_ID, - opticalNetworkInfo := p_opticalNetworkInfo + onuId := p_onuId, + ponTech := p_ponTech, + operationalState := p_operationalState, + dsRate := p_dsRate, + usRate := p_usRate } // End of template m_pon_info template PonInfo mw_pon_info( template (present) CpInfo p_customerPremisesInfo := ?, - template (present) PonSYS_ID p_ponSYS_ID := ?, - template (present) OpticalNetworkInfo p_opticalNetworkInfo := ?, + template (present) Json.String p_ponSYS_ID := ?, + template (present) Json.String p_onuId := ?, + template (present) PonTech p_ponTech := ?, + template (present) OperationalState p_operationalState := ?, + template (present) DsRate p_dsRate := ?, + template (present) UsRate p_usRate := ?, template TimeStamp p_timeStamp := * - ) := { + ) := { timeStamp := p_timeStamp, customerPremisesInfo := p_customerPremisesInfo, ponSYS_ID := p_ponSYS_ID, - opticalNetworkInfo := p_opticalNetworkInfo + onuId := p_onuId, + ponTech := p_ponTech, + operationalState := p_operationalState, + dsRate := p_dsRate, + usRate := p_usRate } // End of template mw_pon_info template (omit) SubscriptionLinkList m_subscription_link_list( - in template (value) Links p_links, - in template (omit) Subscriptions p_subscription := omit - ) := { - links := p_links, - subscription := p_subscription + in template (value) SubscriptionLinks p_links + ) := { + links := p_links } // End of template m_subscription_link_list template SubscriptionLinkList mw_subscription_link_list( - template (present) Links p_links := ?, - template Subscriptions p_subscription := * - ) := { - links := p_links, - subscription := p_subscription + template (present) SubscriptionLinks p_links := ? + ) := { + links := p_links } // End of template m_wsubscription_link_list template (omit) OnuAlarmSubscription m_onu_alarm_subscription( in template (value) Json.AnyURI p_callbackReference, in template (value) FilterCriteriaOnuAlarm p_filterCriteriaOnuAlarm, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) Links p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit - ) := { - subscriptionType := "OnuAlarmSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaOnuAlarm := p_filterCriteriaOnuAlarm, - expiryDeadline := p_expiryDeadline + ) := { + subscriptionType := "OnuAlarmSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaOnuAlarm := p_filterCriteriaOnuAlarm, + expiryDeadline := p_expiryDeadline } // End of template m_onu_alarm_subscription - + template (omit) OnuAlarmSubscription m_onu_alarm_subscription_bad_request( in template (value) Json.AnyURI p_callbackReference, in template (value) FilterCriteriaOnuAlarm p_filterCriteriaOnuAlarm, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) Links p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) modifies m_onu_alarm_subscription := { @@ -180,47 +227,51 @@ module FixedAccessInformationServiceAPI_Templates { template (present) Json.AnyURI p_callbackReference := ?, template (present) FilterCriteriaOnuAlarm p_filterCriteriaOnuAlarm := ?, template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * - ) := { - subscriptionType := "OnuAlarmSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaOnuAlarm := p_filterCriteriaOnuAlarm, - expiryDeadline := p_expiryDeadline + ) := { + subscriptionType := "OnuAlarmSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaOnuAlarm := p_filterCriteriaOnuAlarm, + expiryDeadline := p_expiryDeadline } // End of template mw_onu_alarm_subscription template (omit) FilterCriteriaOnuAlarm m_filter_criteria_onu_alarm( in template (value) OnuIds p_onuId := { PX_FAI_ONU_ID }, in template (omit) CpInfo p_customerPremisesIxnfo := omit, - in template (omit) Alarms p_alarms := omit - ) := { + in template (omit) AlarmList p_alarms := omit + ) := { customerPremisesInfo := p_customerPremisesIxnfo, onuId := p_onuId, alarms := p_alarms } // End of template m_filter_criteria_onu_alarm - + template FilterCriteriaOnuAlarm mw_filter_criteria_onu_alarm( template (present) OnuIds p_onuId := ?, template CpInfo p_customerPremisesIxnfo := *, - template Alarms p_alarms := * - ) := { + template AlarmList p_alarms := * + ) := { customerPremisesInfo := p_customerPremisesIxnfo, onuId := p_onuId, alarms := p_alarms } // End of template mw_filter_criteria_onu_alarm template (value) TimeStamp m_time_stamp( - in UInt32 p_seconds, - in UInt32 p_nanoSeconds := 0 - ) := { + in Json.UInteger p_seconds, + in Json.UInteger p_nanoSeconds := 0 + ) := { seconds := p_seconds, nanoSeconds := p_nanoSeconds } // End of temlate m_time_stamp template (present) TimeStamp mw_time_stamp( - template (present) UInt32 p_seconds := ?, - template (present) UInt32 p_nanoSeconds := ? - ) := { + template (present) Json.UInteger p_seconds := ?, + template (present) Json.UInteger p_nanoSeconds := ? + ) := { seconds := p_seconds, nanoSeconds := p_nanoSeconds } // End of temlate mw_time_stamp diff --git a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn index d576b82..6873dc4 100644 --- a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn @@ -1,111 +1,75 @@ +/** + * @author ETSI / STF569 / TTF T027 + * @version $Url$ + * $Id$ + * @desc Types and Values for ETSI GS MEC 029 V2.2.1 (2022-01) + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + */ module FixedAccessInformationServiceAPI_TypesAndValues { // JSON import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; - - /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type UInt32 Seconds; - /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type UInt32 NanoSeconds; - - /** - * @desc - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds - } - - /** - * @desc This type represents the fixed access information. - * @member timeStamp Time stamp. - * @member customerPremisesInfo The physical location of a customer site. - * @member connectivityInfo The per connectivity domain fixed access information. + * @desc This type represents the fixed access information + * @member timeStamp Time stamp + * @member customerPremisesInfo The physical location of a customer site + * @member lastMileTech An informative field identifying the last mile access technology used + * @member interfaceType The physical interface used for the end customer site + * @member dsbw The bandwidth (in Mbps) from the network towards the customer site + * @member usbw The bandwidth (in Mbps) from the customer site towards the network + * @member latency Maximum baseline latency + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.2-1: Attributes of the FaInfo */ type record FaInfo { - TimeStamp timeStamp optional, - CpInfo customerPremisesInfo, - ConnectivityInfo connectivityInfo optional - } - - /** - * @desc The per connectivity domain fixed access information. - * @member LastMileTech An informative field identifying the last mile access technology used. - * @member InterfaceType The physical interface used for the end customer site – as defined in IEEE802, ITU, Broadband Forum. - * @member dsbw The bandwidth (in Mbps) from the network towards the customer site. - * @member usbw The bandwidth (in Mbps) from the customer site towards the network. - * @member latency Maximum baseline latency (in ms) between customer site and service edge node. - */ - type record ConnectivityInfo { - LastMileTech lastMileTech optional, + TimeStamp timeStamp optional, + CpInfo customerPremisesInfo, + LastMileTech lastMileTech, InterfaceType interfaceType, - Json.Number dsbw optional, - Json.Number usbw optional, - Json.Number latency optional + Json.Integer dsbw optional, + Json.Integer usbw optional, + Json.Integer latency optional } - + /** - * @desc An informative field identifying the last mile access technology used. + * @desc An informative field identifying the last mile access technology used + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.2-1: Attributes of the FaInfo */ type enumerated LastMileTech { - ADSL, - VDSL, - GPON, - XGPON, - NGPON2, - XGSPON, - GFAST, - P2PEthernet + ADSL (1), + VDSL (2), + GPON (3), + XGPON (4), + NGPON2 (5), + XGSPON (6), + GFAST (7), + P2PEthernet (8) + } with { + variant "JSON: as number" } /** - * @desc The physical interface used for the end customer site – as defined in IEEE802, ITU, Broadband Forum. + * @desc The physical interface used for the end customer site + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.2-1: Attributes of the FaInfo */ type enumerated InterfaceType { - e_100BASE_TX, - e_1000BASE_TX, - e_1000BASE_LX, - e_1000BASELX10, - e_1000BASEBX10, - e_1000BASE_LH, - e_1000Base_ZX, - ADSL_RJ11, - VDSL_RJ11, - GPON - } - - /** - * @desc Latitude (DATUM=WGS84) -90 to 90 in decimal degree format DDD.ddd - */ - type Json.Number Latitude; - - /** - * @desc Longitude (DATUM=WGS84) -180 to 180 in decimal degree format DDD.ddd - */ - type Json.Number Longitude; - - /** - * @desc Postal code for the location - */ - type Json.String PostalCode; - - type record CpInfo_{ - Latitude latitude optional, - Longitude longitude optional, - PostalCode postalCode optional + e_100BASE_TX (1), + e_1000BASE_TX (2), + e_1000BASE_LX (3), + e_1000BASELX10 (4), + e_1000BASEBX10 (5), + e_1000BASE_LH (6), + e_1000Base_ZX (7), + e_ADSL_RJ11 (8), + e_VDSL_RJ11 (9), + e_GPON (10) + } with { + variant "JSON: as number" } - type record of CpInfo_ CpInfo; - + /** * @desc This type represents the information of the device that is connected to a fixed access network. * @member timeStamp Time stamp. @@ -122,112 +86,86 @@ module FixedAccessInformationServiceAPI_TypesAndValues { * @member traceRouteDiagnostics The result of an IP-layer trace-route test * @member downloadDiagnostics The result of a HTTP and FTP DownloadDiagnostics Test * @member uploadDiagnostics The result of a HTTP and FTP UploadDiagnostics Test + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.3-1: Attributes of the DeviceInfo */ type record DeviceInfo { - TimeStamp timeStamp optional, - GatewayId gwId, - DeviceId deviceId optional, - DeviceStatus deviceStatus, - Json.Number upTime, - Json.Number iPConnectionUpTime, - Json.Number totalBytesSent, - Json.Number totalBytesReceived, - Json.Number totalPacketsSent, - Json.Number totalPacketsReceived, - IPPingDiagnostics iPPingDiagnostics optional, + TimeStamp timeStamp optional, + Json.String gwId, + Json.String deviceId optional, + DeviceStatus deviceStatus, + Json.Number upTime, + Json.Number iPConnectionUpTime, + Json.Number totalBytesSent, + Json.Number totalBytesReceived, + Json.Number totalPacketsSent, + Json.Number totalPacketsReceived, + IPPingDiagnostics iPPingDiagnostics optional, TraceRouteDiagnostics traceRouteDiagnostics optional, - DownloadDiagnostics downloadDiagnostics optional, - UploadDiagnostics uploadDiagnostics optional + DownloadDiagnostics downloadDiagnostics optional, + UploadDiagnostics uploadDiagnostics optional } - - /** - * @desc Information (typically the serial number) to identify an Internet Gateway Device through which the customer premises device is connected. - */ - type record of Json.String GatewayId; - - /** - * @desc Typically, the serial number of the device. - */ - type record of Json.String DeviceId; - + /** * @desc Current operational status of the device. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.3-1: Attributes of the DeviceInfo */ type enumerated DeviceStatus { - Up, - Initializing, - Error, - Disabled + Up (1), + Initializing (2), + Error (3), + Disabled (4) + } with { + variant "JSON: as number" } - - type record IPPingDiagnostics {} - type record TraceRouteDiagnostics {} - type record DownloadDiagnostics{} - type record UploadDiagnostics {} - + /** * @desc This type represents the information of the cable line of a fixed access network - * @member timeStamp Time stamp. - * @member customerPremisesInfo The physical location of a customer site. - * + * @member timeStamp Time stamp + * @member customerPremisesInfo The physical location of a customer site + * @member cmdId Information (typically the serial number) to identify a Cable Modem at subscriber locations intended for use in conveying data communications on a cable data system + * @member cmStatus It provides CM connectivity status information of the CM + * @member cmDpvStats It represents the DOCSIS Path Verify Statistics collected in the cable modem device + * @member serviceFlowStats It describes statistics associated with the Service Flows in a managed device + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.4-1: Attributes of the CableLineInfo */ type record CableLineInfo { - TimeStamp timeStamp optional, - CpInfo customerPremisesInfo, - CmdInfo cmdInfo - } - - /** - * @desc - * @member cmdId Information (typically the serial number) to identify a Cable Modem at subscriber locations intended for use in conveying data communications on a cable data system. - * @member cmStatus It provides CM connectivity status information of the CM. - * @member cmDpvStats It represents the DOCSIS Path Verify Statistics collected in the cable modem device. - * @member serviceFlowStats It describes statistics associated with the Service Flows in a managed device. - */ - type record CmdInfo_ { - CmdId cmdId, - CmStatus cmStatus optional, - CmDpvStats cmDpvStats optional, + TimeStamp timeStamp optional, + CpInfo customerPremisesInfo, + Json.String cmdId, + CmStatus cmStatus optional, + CmDpvStats cmDpvStats optional, ServiceFlowStats serviceFlowStats optional } - type record of CmdInfo_ CmdInfo; - - /** - * @desc Information (typically the serial number) to identify a Cable Modem at subscriber locations intended for use in conveying data communications on a cable data system. - */ - type Json.String CmdId; - + /** - * @desc It provides CM connectivity status information of the CM. - * @member ifIndex It denotes the MAC Domain interface index of the CM. - * @member It defines the CM connectivity state. - * @member resets It denotes the number of times the CM reset or initialized this interface. - * @member lostSyncs It denotes the number of times the CM lost synchronization with the downstream channel. - * @member invalidRegRsps It denotes the number of times the CM received invalid registration response messages. + * @desc It provides CM connectivity status information of the CM + * @member ifIndex It denotes the MAC Domain interface index of the CM + * @member cmRegState It defines the CM connectivity state + * @member resets It denotes the number of times the CM reset or initialized this interface + * @member lostSyncs It denotes the number of times the CM lost synchronization with the downstream channel + * @member invalidRegRsps It denotes the number of times the CM received invalid registration response messages * @member energyMgt1x1OperStatus It indicates whether the CM is currently operating in Energy Management 1x1 Mode * @member emDlsOperStatus It indicates whether the CM is currently operating in Energy Management DLS Mode + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.4-1: Attributes of the CableLineInfo */ type record CmStatus_ { - IfIndex ifIndex, - CmRegState cmRegState, - Json.Number resets, - Json.Number lostSyncs, - Json.Number invalidRegRsps, - Json.Bool energyMgt1x1OperStatus, - Json.Bool emDlsOperStatus + Json.String ifIndex, + CmRegState cmRegState, + Json.Integer reset, + Json.Integer lostSyncs, + Json.Integer invalidRegRsps, + Json.Bool energyMgt1x1OperStatus, + Json.Bool emDlsOperStatus } type record of CmStatus_ CmStatus; - - /** - * @desc It denotes the MAC Domain interface index of the CM. - */ - type Json.String IfIndex; + type record of Json.String IfIndexList; /** * @desc It defines the CM connectivity state. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.4-1: Attributes of the CableLineInfo */ type enumerated CmRegState { - other, + other (1), notReady, notSynchronized, phySynchronized, @@ -250,244 +188,687 @@ module FixedAccessInformationServiceAPI_TypesAndValues { dsTopologyResolutionInProgress, rangingInProgress, rfMuteAll + } with { + variant "JSON: as number" } - + type record of CmRegState CmRegStateList; + /** - * @desc It represents the DOCSIS Path Verify Statistics collected in the cable modem device. - * @member ifIndex It denotes the MAC Domain interface index of the CM. - * @member lastMeasLatency The last latency measurement. - * @member lastMeasTime the last measurement time of the last latency measurement. - * @member minLatency the minimum latency measurement. - * @member maxLatency the maximum latency measurement. - * @member avgLatency the average latency measurement. - * @member numMeas The number of latency measurements made. - */ - type record CmDpvStats_ { - IfIndex ifIndex, - Json.Number lastMeasLatency, - TimeStamp lastMeasTime, - Json.Number minLatency, - Json.Number maxLatency, - Json.Number avgLatency, - Json.Number numMeas - } - type record of CmDpvStats_ CmDpvStats; - + * @desc It represents the DOCSIS Path Verify Statistics collected in the cable modem device + * @member ifIndex It represents the interface Index of the Downstream Interface where the measurements are taken + * @member lastMeasLatency The last latency measurement + * @member lastMeasTime The last measurement time of the last latency measurement + * @member minLatency The minimum latency measurement + * @member maxLatency The maximum latency measurement + * @member avgLatency The average latency measurement + * @member numMeas The number of latency measurements made + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.4-1: Attributes of the CableLineInfo + */ + type record CmDpvStats { + Json.String ifIndex, + Json.Integer lastMeasLatency, + TimeStamp lastMeasTime, + Json.Integer minLatency, + Json.Integer maxLatency, + Json.Integer avgLatency, + Json.Integer numMeas + } + /** - * @desc It describes statistics associated with the Service Flows in a managed device. - * @member ifIndex It denotes the MAC Domain interface index of the CM. - * @member serviceFlowInfo It represents the information of a Service Flow. + * @desc It describes statistics associated with the Service Flows in a managed device + * @member ifIndex It represents the interface index of the MAC Domain of the Service Flow + * @member serviceFlowInfo It represents the information of a Service Flow + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.4-1: Attributes of the CableLineInfo */ - type record ServiceFlowStats_ { - IfIndex ifIndex, - ServiceFlowInfo serviceFlowInfo + type record ServiceFlowStats { + Json.String ifIndex, + ServiceFlowInfoList serviceFlowInfo } - type record of ServiceFlowStats_ ServiceFlowStats; - + /** - * @desc It represents the information of a Service Flow. - * @member ifIndex It denotes the MAC Domain interface index of the CM. - * @member serviceFlowId It represents an identifier assigned to a Service Flow by CMTS within a MAC Domain. - * @member pkts For outgoing Service Flows, this attribute counts the number of Packet Data PDUs forwarded to this Service Flow. For incoming upstream CMTS service flows, this attribute counts the number of Packet Data PDUs actually received on the Service Flow identified by the SID for which the packet was scheduled. - * @member timeCreated It indicates the time when the service flow was created. - * @member timeActiveIt Indicates the number of seconds that the service flow has been active. - * @member policedDropPkts For upstream service flows, this attribute counts the number of Packet Data PDUs classified to this service flow dropped due to: (1) exceeding the selected Buffer Size for the service flow; or (2) UGS packets dropped due to exceeding the Unsolicited Grant Size with a Request/Transmission policy that requires such packets to be dropped. - * @member policedDelayPkts It counts only outgoing packets delayed in order to maintain the Maximum Sustained Traffic Rate. - * @member aqmDroppedPkts For upstream service flows on which AQM is enabled, this attribute counts the number of Packet Data PDUs classified to this service flow dropped due to Active Queue Management drop decisions. - */ - type record ServiceFlowInfo_ { - Json.Number serviceFlowId, - Json.Number pkts, - TimeStamp timeCreated, - Json.Number timeActive, - Json.Number policedDropPkts, - Json.Number policedDelayPkts, - Json.Number aqmDroppedPkts - } - type record of ServiceFlowInfo_ ServiceFlowInfo; - + * @desc It represents the information of a Service Flow + * @member serviceFlowId It represents an identifier assigned to a Service Flow by CMTS within a MAC Domain + * @member pkts For outgoing Service Flows, this attribute counts the number of Packet Data PDUs forwarded to this Service Flow + * For incoming upstream CMTS service flows, this attribute counts the number of Packet Data PDUs actually received on the Service Flow identified by the SID for which the packet was scheduled + * @member timeCreated It indicates the time when the service flow was created + * @member timeActive It indicates the number of seconds that the service flow has been active + * @member policedDropPkts For upstream service flows, this attribute counts the number of Packet Data PDUs classified to this service flow dropped + * @member policedDelayPkts It counts only outgoing packets delayed in order to maintain the Maximum Sustained Traffic Rate + * @member aqmDroppedPkts this attribute counts the number of Packet Data PDUs classified to this service flow dropped due to Active Queue Management drop decisions + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.4-1: Attributes of the CableLineInfo + */ + type record ServiceFlowInfoList { + Json.Integer serviceFlowId, + Json.Integer pkts, + TimeStamp timeCreated, + Json.Integer timeActive, + Json.Integer policedDropPkts, + Json.Integer policedDelayPkts, + Json.Integer aqmDroppedPkts + } + /** * @desc This type represents the information of the of an optical network (e.g., G-PON, XG-PON, NG-PON2, XGS-PON). * @member timeStamp Time stamp. * @member customerPremisesInfo The physical location of a customer site. * @member ponSYS_ID The 20-bit identity of the optical system within a certain domain. - * @member opticalNetworkInfo - */ - type record PonInfo { - TimeStamp timeStamp optional, - CpInfo customerPremisesInfo, - PonSYS_ID ponSYS_ID, - OpticalNetworkInfo opticalNetworkInfo - } - - type Json.String PonSYS_ID; - - /** - * @desc This type represents the information of the of an optical network (e.g., G-PON, XG-PON, NG-PON2, XGS-PON). - * @member onuId Information to identify an Optical Network Unit. - * @member ponTech An informative field identifying the optical technology used. - * @member operationalState It reports whether the ONU is currently capable of performing its function. + * @member onuId Information to identify an Optical Network Unit + * @member ponTech An informative field identifying the optical technology used + * @member operationalState It reports whether the ONU is currently capable of performing its function * @member dsRate Downstream line rate * @member usRate Upstream line rate + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.5-1: Attributes of the PonInfo */ - type record OpticalNetworkInfo_ { - OnuId onuId, - PonTech ponTech, + type record PonInfo { + TimeStamp timeStamp optional, + CpInfo customerPremisesInfo, + Json.String ponSYS_ID, + Json.String onuId, + PonTech ponTech, OperationalState operationalState, - DsRate dsRate, - UsRate usRate + DsRate dsRate, + UsRate usRate } - type record of OpticalNetworkInfo_ OpticalNetworkInfo; - - /** - * @desc Information to identify an Optical Network Unit. - */ - type Json.String OnuId; - type record of OnuId OnuIds; - + /** * @desc An informative field identifying the optical technology used. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.5-1: Attributes of the PonInfo */ type enumerated PonTech { - GPON, - XGPON, - NGPON2, - XGSPON + GPON (1), + XGPON (2), + NGPON2 (3), + XGSPON (4) + } with { + variant "JSON: as number" } /** * @desc It reports whether the ONU is currently capable of performing its function. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.5-1: Attributes of the PonInfo */ type enumerated OperationalState { - enabled, - disabled + enabled (1), + disabled (2) + } with { + variant "JSON: as number" } /** * @desc Upstream line rate + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.5-1: Attributes of the PonInfo */ type enumerated DsRate { - e_ds_one, // 1 = 2.48832 Gbit/s: G-PON [i.9] or NG-PON2 option 2 [i.8] - e_ds_two // 9.95328 Gbit/s: XG-PON [i.10] or XGS-PON [i.11] or NG-PON2 option 1 [i.8] + e_ds_one (1), // 1 = 2.48832 Gbit/s: G-PON [i.9] or NG-PON2 option 2 [i.8] + e_ds_two (2) // 9.95328 Gbit/s: XG-PON [i.10] or XGS-PON [i.11] or NG-PON2 option 1 [i.8] + } with { + variant "JSON: as number" } /** * @desc Upstream line rate + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.5-1: Attributes of the PonInfo */ type enumerated UsRate { - e_us_one, // 1 = 1.24416 Gbit/s: G-PON option 1 [i.9] - e_us_two, // 2 = 2.48832 Gbit/s: G-PON option 2 [i.9] or XG-PON [i.10] or NG-PON2 option 2 [i.8] - e_us_three // 9.95328 Gbit/s: XGS-PON [i.11] + e_us_one (1), // 1 = 1.24416 Gbit/s: G-PON option 1 [i.9] + e_us_two (2), // 2 = 2.48832 Gbit/s: G-PON option 2 [i.9] or XG-PON [i.10] or NG-PON2 option 2 [i.8] + e_us_three (3) // 9.95328 Gbit/s: XGS-PON [i.11] + } with { + variant "JSON: as number" } - + + /** + * @desc This type represents a subscription to ONU alarm notifications from FAIS + * @member subscriptionType Shall be set to "OnuAlarmSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteriaOnuAlarm List of filtering criteria for the subscription + * @member expiryDeadline Identifies a boundary after which the subscription will expire + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.2-1: Attributes of the OnuAlarmSubscription + */ + type record OnuAlarmSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteriaOnuAlarm filterCriteriaOnuAlarm, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + /** * @desc Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests. * @member self_ Self referring URI. The URI shall be unique within the FAI API as it acts as an ID for the subscription. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.2-1: Attributes of the OnuAlarmSubscription */ type record Links { LinkType self_ } with { variant (self_) "name as 'self'"; } - + /** - * @desc This type represents a type of link and may be referenced from data structures. + * @desc List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response + * @member customerPremisesInfo Physical locations of the customer sites + * @member onuId Unique identifiers for the optical network units. + * @member alarms In case alarms is not included in the subscription request, the default value -1 = All shall be used and included in the response. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.2-1: Attributes of the OnuAlarmSubscription */ - type record LinkType { - Href href + type record FilterCriteriaOnuAlarm { + CpInfo customerPremisesInfo optional, + OnuIds onuId, + AlarmList alarms optional } + type record of Json.String OnuIds; + + /** + * @desc In case alarms is not included in the subscription request, the default value -1 = All shall be used and included in the response + */ + type enumerated Alarm { + EquipmentAlarm (1), // (Functional failure on an internal interface) + PoweringAlarm, // (Loss of external power to battery backup unit. This alarm is typically derived through an external interface to a battery backup unit, and indicates that AC is no longer available to maintain battery charge.) + BatteryMissing, // (Battery is provisioned but missing) + BatteryFailure, // (Battery is provisioned and present but cannot recharge) + BatteryLow, // (Battery is provisioned and present but its voltage is too low) + PhysicalIntrusion, // (Applies if the ONU supports detection such as door or box open) + OnuSelfTestFailure, // (ONU has failed autonomous self-test) + DyingGasp, // ()ONU is powering off imminently due to loss of power to the ONU itself.) + TemperatureYellow, // (No service shutdown at present, but the circuit pack is operating beyond its recommended range.) + TemperatureRed, // ()Some services have been shut down to avoid equipment damage.) + VoltageYellow, // (No service shutdown at present, but the line power voltage is below its recommended minimum.) + VoltageRed, // (Some services have been shut down to avoid power collapse.) + OnuManualPowerOff, // (The ONU is shutting down because the subscriber has turned off its power switch.) + InvImage, // (Software image is invalid) + PseOverloadYellow, // (Indicates that the ONU is nearing its maximum ability to supply the known PoE demand of the attached PDs. The thresholds for declaring and clearing this alarm are vendor-specific.) + PseOverloadRed, // (Indicates that the ONU is unable to supply all of the PoE demand of the attached PDs and has removed or reduced power to at least one PD.) + All + } with { + variant "JSON: as number" + } + type record of Alarm AlarmList; + + /** + * @desc This type represents a subscription to device information notifications from FAIS + * @member subscriptionType Shall be set to "DevInfoSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteriaDevInfo List of filtering criteria for the subscription + * @member expiryDeadline Identifies a boundary after which the subscription will expire + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.3-1: Attributes of the DevInfoSubscription + */ + type record DevInfoSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteriaDevInfo filterCriteriaDevInfo, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc List of filtering criteria for the subscription + * @member gwId The identifier of an Internet Gateway Device through which the customer premises device is connected + * @member deviceId The device identifier + * @member deviceErrStatus The abnormal operational status of the device + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.3-1: Attributes of the DevInfoSubscription + */ + type record FilterCriteriaDevInfo { + GatewayIdList gwId optional, + DeviceIdList deviceId optional, + DeviceErrStatus deviceErrStatus optional + } + + /** + * @desc Information (typically the serial number) to identify an Internet Gateway Device through which the customer premises device is connected. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.3-1: Attributes of the DevInfoSubscription + */ + type record of Json.String GatewayIdList; /** - * @desc URI referring to a resource. + * @desc Typically, the serial number of the device. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.3-1: Attributes of the DevInfoSubscription */ - type Json.String Href; + type record of Json.String DeviceIdList; + + /** + * @desc Current operational status of the device. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.3-1: Attributes of the DeviceInfo + */ + type enumerated DeviceErrStatus_ { + Error (1), + Disabled (2) + } with { + variant "JSON: as number" + } + type record of DeviceErrStatus_ DeviceErrStatus; + + /** + * @desc This type represents a subscription to cable modem connectivity state notifications from FAIS + * @member subscriptionType Shall be set to "CmConnSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteriaCmConn List of filtering criteria for the subscription + * @member expiryDeadline Identifies a boundary after which the subscription will expire + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.4-1: Attributes of the CmConnSubscription + */ + type record CmConnSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteriaCmConn filterCriteriaCmConn, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc List of filtering criteria for the subscription + * @member customerPremisesInfo The physical location of a customer site + * @member cmIf + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.4-1: Attributes of the CmConnSubscription + */ + type record FilterCriteriaCmConn { + CpInfo customerPremisesInfo optional, + CmIf cmIf optional + } + + /** + * @desc + * @member customerPremisesInfo The physical location of a customer site + * @member cmId The identifier of a Cable Modem at subscriber locations intended for use in conveying data communications on a cable data system + * @member ifIndex The MAC Domain interface index of the CM + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.4-1: Attributes of the CmConnSubscription + */ + type record CmIf { + Json.String cmId, + IfIndexList ifIndex, + CmRegStateList cmRegState + } /** - * @desc This type represents a list of links related to currently existing subscriptions for the service consumer. - * @member links List of hyperlinks related to the resource. - * @member subscription A link to a subscription. + * @desc This type represents a list of links related to currently existing subscriptions for the service consumer + * @member links Hyperlink related to the resource + * @member subscription The service consumer's subscriptions + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.5-1: Attributes of the SubscriptionLinkList */ type record SubscriptionLinkList { - Links links, - Subscriptions subscription optional + SubscriptionLinks links } with { variant (links) "name as '_links'"; } - + + /** + * @desc Hyperlink related to the resource + * @member self_ URI of this resource. + * @member subscription The service consumer's subscriptions + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.5-1: Attributes of the SubscriptionLinkList + */ + type record SubscriptionLinks { + LinkType self_, + SubscriptionList subscription optional + } with { + variant (self_) "name as 'self'"; + } + /** * @desc A link to a subscription * @member href The URI referring to the subscription. * @member subscriptionType Type of subscription + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.5-1: Attributes of the SubscriptionLinkList */ type record Subscription_ { - Json.AnyURI href, + Json.AnyURI href, SubscriptionType subscriptionType } - type record of Subscription_ Subscriptions; - + type record of Subscription_ SubscriptionList; + /** * @desc Type of subscription + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.5-1: Attributes of the SubscriptionLinkList */ type enumerated SubscriptionType { - RESERVED, - ONU_ALARM, - DEVICE_ABNORMAL_ALERT, - CM_CONNECTIVITY_STATE, - ANI_ALARM + OnuAlarmSubscription, + DevInfoSubscription, + CmConnSubscription, + AniAlarmSubscription } - + /** - * @desc This type represents a subscription to ONU alarm notifications from FAIS. - */ - type record OnuAlarmSubscription { - Json.String subscriptionType, - Json.AnyURI callbackReference, - Links links optional, - FilterCriteriaOnuAlarm filterCriteriaOnuAlarm, - TimeStamp expiryDeadline optional + * @desc This type represents a subscription to cable modem connectivity state notifications from FAIS + * @member subscriptionType Shall be set to "AniAlarmSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteriaAniAlarm List of filtering criteria for the subscription + * @member expiryDeadline Identifies a boundary after which the subscription will expire + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.6-1: Attributes of the AniAlarmSubscription + */ + type record AniAlarmSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteriaAniAlarm filterCriteriaAniAlarm, + TimeStamp expiryDeadline optional } with { variant (links) "name as '_links'"; } - + /** - * @desc List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response - * @member customerPremisesInfo Physical locations of the customer sites - * @member onuId Unique identifiers for the optical network units. - * @member In case alarms is not included in the subscription request, the default value -1 = All shall be used and included in the response. + * @desc List of filtering criteria for the subscription + * @member customerPremisesInfo 0 to N physical locations of the customer sites + * @member onuId 1 to N unique identifiers for the optical network units + * @member aniId + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.6-1: Attributes of the AniAlarmSubscription */ - type record FilterCriteriaOnuAlarm { + type record FilterCriteriaAniAlarm { CpInfo customerPremisesInfo optional, OnuIds onuId, - Alarms alarms optional + AniId aniId } - + /** * @desc + * @member onuId The unique identifiers for the optical network unit + * @member aniId The index of an access network interface supported by the optical network unit + * @member alarms + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.6-1: Attributes of the AniAlarmSubscription + */ + type record AniId_ { + OnuIds onuId, + Json.String aniIndex, + AlarmList alarms optional + } + type record of AniId_ AniId + + /** + * @desc This type represents a notification from FAIS with regards to ONU alarms + * @member notificationType Shall be set to "OnuAlarmNotification" + * @member timeStamp Date and time of the generation of the notification + * @member customerPremisesInfo The physical location of the related customer sites\ + * @member onuId The unique identifier for an optical network unit + * @member alarm Indicates the alarm of the ONU + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.4.2-1: Attributes of the OnuAlarmNotification + */ + type record OnuAlarmNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + CpInfo customerPremisesInfo optional, + Json.String onuId, + Alarm alarm + } + + /** + * @desc This type represents a notification from FAIS with regards to ONU alarms + * @member notificationType Shall be set to "DevInfoNotification" + * @member timeStamp Date and time of the generation of the notification + * @member deviceId The identifier for a device + * @member deviceErrStatus Indicates the abnormal operational status of the device + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.4.3-1: Attributes of the DevInfoNotification + */ + type record DevInfoNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Json.String deviceId, + DeviceErrStatus_ deviceErrStatus + } + + /** + * @desc This type represents a notification from FAIS with regards to ONU alarms + * @member notificationType Shall be set to "CmConnNotification" + * @member timeStamp Date and time of the generation of the notification + * @member customerPremisesInfo The physical location of a customer site + * @member cmIf + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.4.4-1: Attributes of the CmConnNotification + */ + type record CmConnNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + CpInfo customerPremisesInfo optional, + CmIf cmIf + } + + /** + * @desc This type represents a notification from FAIS with regards to expiry of the existing subscription + * @member timeStamp Date and time of the generation of the notification + * @member links List of hyperlinks related to the resource + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.4.5-1: Attributes of the ExpiryNotification */ - type enumerated Alarm { - EquipmentAlarm, // (Functional failure on an internal interface) - PoweringAlarm, // (Loss of external power to battery backup unit. This alarm is typically derived through an external interface to a battery backup unit, and indicates that AC is no longer available to maintain battery charge.) - BatteryMissing, // (Battery is provisioned but missing) - BatteryFailure, // (Battery is provisioned and present but cannot recharge) - BatteryLow, // (Battery is provisioned and present but its voltage is too low) - PhysicalIntrusion, // (Applies if the ONU supports detection such as door or box open) - OnuSelfTestFailure, // (ONU has failed autonomous self-test) - DyingGasp, // ()ONU is powering off imminently due to loss of power to the ONU itself.) - TemperatureYellow, // (No service shutdown at present, but the circuit pack is operating beyond its recommended range.) - TemperatureRed, // ()Some services have been shut down to avoid equipment damage.) - VoltageYellow, // (No service shutdown at present, but the line power voltage is below its recommended minimum.) - VoltageRed, // (Some services have been shut down to avoid power collapse.) - OnuManualPowerOff, // (The ONU is shutting down because the subscriber has turned off its power switch.) - InvImage, // (Software image is invalid) - PseOverloadYellow, // (Indicates that the ONU is nearing its maximum ability to supply the known PoE demand of the attached PDs. The thresholds for declaring and clearing this alarm are vendor-specific.) - PseOverloadRed, //(Indicates that the ONU is unable to supply all of the PoE demand of the attached PDs and has removed or reduced power to at least one PD.) - All - } with { - variant "JSON: as number" + type record ExpiryNotification { + TimeStamp timeStamp optional, + Links links, + TimeStamp expiryDeadline + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a notification from FAIS with regards to ONU alarms + * @member notificationType Shall be set to "AniAlarmNotification" + * @member timeStamp Date and time of the generation of the notification + * @member customerPremisesInfo The physical location of a customer site + * @member onuId The unique identifier for an optical network unit + * @member aniId + * @member alarm Indicates the alarm of the ANI + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.4.6-1: Attributes of the AniAlarmNotification + */ + type record AniAlarmNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + CpInfo customerPremisesInfo optional, + OnuIds onuId optional, + AniId aniId optional, + Alarm alarm + } + + /** + * @desc This type represents a test notification from a FAIS to determine if the Websocket method is to be utilized to issue notifications for a subscription + * @member notificationType Shall be set to "OnuAlarmNoTestNotificationtification" + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.4.7-1: Attributes of the TestNotification + */ + type record TestNotification { + Json.String notificationType, + Links_TestNotification links + } with { + variant (links) "name as '_links'"; } - type record of Alarm Alarms; + /** + * @desc Hyperlink related to the resource + * @member subscription URI identifying the subscription for the test notification + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.4.7-1: Attributes of the TestNotification + */ + type record Links_TestNotification { + LinkType subscription + } + + /** + * @desc + * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.2-1: Attributes of the TimeStamp + */ + type record TimeStamp { + Seconds seconds, + NanoSeconds nanoSeconds + } + /** + * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.2-1: Attributes of the TimeStamp + */ + type Json.UInteger Seconds; + + /** + * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.2-1: Attributes of the TimeStamp + */ + type Json.UInteger NanoSeconds; + + /** + * @desc This type represents a customer premises (physical location) + * @member latitude Latitude (DATUM=WGS84) + * @member longitude Longitude (DATUM=WGS84) + * @member postalCode Postal code for the location + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.3-1: Attributes of the CpInfo + */ + type record CpInfo_{ + Json.Number latitude optional, + Json.Number longitude optional, + Json.String postalCode optional + } + type record of CpInfo_ CpInfo; + + /** + * @desc This type represents an IP-layer ping test + * @member diagnosticsState The state of the IP ping test + * @member host Host name or address of the host to ping + * @member numberOfRepetitions Number of repetitions of the ping test to perform before reporting the results + * @member timeout_ Timeout in milliseconds for the ping test + * @member dataBlockSize Size of the data block in bytes to be sent for each ping + * @member successCount Result parameter indicating the number of successful pings (those in which a successful response was received prior to the timeout) in the most recent ping test + * @member failureCount Result parameter indicating the number of failed pings in the most recent ping test + * @member averageResponseTime Result parameter indicating the average response time in milliseconds over all repetitions with successful responses of the most recent ping test + * @member minimumResponseTime Result parameter indicating the minimum response time in milliseconds over all repetitions with successful responses of the most recent ping test + * @member maximumResponseTime Result parameter indicating the maximum response time in milliseconds over all repetitions with successful responses of the most recent ping test + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.4-1: Attributes of the IPPingDiagnostics + */ + type record IPPingDiagnostics { + DiagnosticsState diagnosticsState, + Json.String host optional, + Json.Number numberOfRepetitions optional, + Json.Number timeout_ optional, + Json.Number dataBlockSize optional, + Json.Number successCount optional, + Json.Number failureCount optional, + Json.Number averageResponseTime optional, + Json.Number minimumResponseTime optional, + Json.Number maximumResponseTime optional + } + + /** + * @desc The state of the IP ping test + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.4-1: Attributes of the IPPingDiagnostics + */ + type enumerated DiagnosticsState { + None (1), + Requested (2), + Complete (3), + Error_CannotResolveHostName (4), + Error_Internal (5), + Error_Other (6) + } with { + variant "JSON: as number" + } + + /** + * @desc This type represents an IP-layer trace-route test + * @member diagnosticsState The state of the IP ping test + * @member host Host name or address of the host to find a route to + * @member timeout_ Timeout in milliseconds for the trace route test + * @member dataBlockSize Size of the data block in bytes to be sent for each trace route + * @member maxHopCount The maximum number of hop used in outgoing probe packets. The default is 30 hops + * @member responseTime Result parameter indicating the response time in milliseconds the most recent trace route test + * @member numberOfRouteHops Result parameter indicating the number of hops within the discovered route + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.5-1: Attributes of the TraceRouteDiagnostics + */ + type record TraceRouteDiagnostics { + DiagnosticsState diagnosticsState, + Json.String host optional, + Json.Number timeout_ optional, + Json.Number dataBlockSize optional, + Json.Number maxHopCount optional, + Json.Number responseTime optional, + Json.Number numberOfRouteHops optional + } + + /** + * @desc This type represents a HTTP and FTP DownloadDiagnostics test + * @member diagnosticsState The state of the HTTP and FTP download test + * @member downloadURI The URI for the device to perform the download on + * @member rOMTime Request time in UTC, which shall be specified to microsecond precision + * @member bOMTime Begin of transmission time in UTC, which shall be specified to microsecond precision + * @member eOMTime End of transmission in UTC, which shall be specified to microsecond precision + * @member testBytesReceived The test traffic received in bytes during the FTP/HTTP transaction including FTP/HTTP headers,`between bOMTime and eOMTime + * @member totalBytesReceived The total number of bytes received on the Interface between bOMTime and eOMTime + * @member tCPOpenRequestTime Request time in UTC, which shall be specified to microsecond precision + * @member tCPOpenReponseTime Response time in UTC, which shall be specified to microsecond precision + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.6-1: Attributes of the DownloadDiagnostics + */ + type record DownloadDiagnostics { + DiagnosticsState diagnosticsState, + Json.AnyURI downloadURI optional, + TimeStamp rOMTime optional, + TimeStamp bOMTime optional, + TimeStamp eOMTime optional, + Json.Number testBytesReceived optional, + Json.Number totalBytesReceived optional, + TimeStamp tCPOpenRequestTime optional, + TimeStamp tCPOpenReponseTime optional + } + + /** + * @desc This type represents a HTTP and FTP UploadDiagnostics test + * @member diagnosticsState The state of the HTTP and FTP download test + * @member uploadURI The URI for the device to perform the upload to + * @member testFileLength The size of the file (in bytes) to be uploaded to the server + * @member rOMTime Request time in UTC, which shall be specified to microsecond precision + * @member bOMTime Begin of transmission time in UTC, which shall be specified to microsecond precision + * @member eOMTime End of transmission in UTC, which shall be specified to microsecond precision + * @member testBytesSent The test traffic sent in bytes during the FTP/HTTP transaction including FTP/HTTP headers, between bOMTime and eOMTime + * @member tCPOpenRequestTime Request time in UTC, which shall be specified to microsecond precision + * @member tCPOpenReponseTime Response time in UTC, which shall be specified to microsecond precision + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.7-1: Attributes of the UploadDiagnostics + */ + type record UploadDiagnostics { + DiagnosticsState diagnosticsState, + Json.AnyURI uploadURI optional, + Json.Number testFileLength optional, + TimeStamp rOMTime optional, + TimeStamp bOMTime optional, + TimeStamp eOMTime optional, + Json.Number testBytesSent optional, + TimeStamp tCPOpenRequestTime optional, + TimeStamp tCPOpenReponseTime optional + } + + /** + * @desc This type represents a type of link and may be referenced from data structures + * @member href URI referring to a resource + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.8-1: Attributes of the LinkType + */ + type record LinkType { + Json.AnyURI href + } + + /** + * @desc This type represents configuration for the delivery of subscription notifications over Websockets + * @member websocketUri Set by location server to indicate to the service consumer the Websocket URI to be used for delivering notifications + * @member requestWebsocketUri Set to true by the service consumer to indicate that Websocket delivery is requested + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.9-1: Attributes of the WebsockNotifConfig + */ + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional + } + } with { encode "JSON" } // End of module FixedAccessInformationServiceAPI_TypesAndValues -- GitLab From 60bd0216571624edbfe640b59d06f877298d60ac Mon Sep 17 00:00:00 2001 From: YannGarcia Date: Tue, 23 May 2023 16:09:43 +0200 Subject: [PATCH 14/58] Review typing for MEC 030 --- ttcn/AtsMec_V2XInformationService/module.mk | 1 - ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn | 2 +- .../RnisAPI/ttcn/RnisAPI_Templates.ttcn | 26 +- .../RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn | 42 +- .../V2XInformationServiceAPI_Templates.ttcn | 342 +++--- ...XInformationServiceAPI_TypesAndValues.ttcn | 1066 ++++++++++------- 6 files changed, 873 insertions(+), 606 deletions(-) diff --git a/ttcn/AtsMec_V2XInformationService/module.mk b/ttcn/AtsMec_V2XInformationService/module.mk index a58df4a..311a0b3 100644 --- a/ttcn/AtsMec_V2XInformationService/module.mk +++ b/ttcn/AtsMec_V2XInformationService/module.mk @@ -14,7 +14,6 @@ modules := ../LibCommon \ ../LibMec/EdgePlatformApplicationEnablementAPI \ ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ ../LibMec/TrafficManagementAPI \ - ../LibMec/RnisAPI \ ../LibMec/UEAppInterfaceAPI \ ../LibMec/UEidentityAPI \ ../LibMec/V2XInformationServiceAPI \ diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn index c34cee9..c5deed7 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn @@ -13,7 +13,7 @@ module RnisAPI_Pixits { modulepar Json.String PX_UNKNOWN_SUBSCRIPTION_ID := "0666"; - modulepar Link PX_LINKS_SELF := { self_ := { href := "http://example.com/exampleAPI/rni/v2/subscriptions" } }; + modulepar Links PX_LINKS_SELF := { self_ := { href := "http://example.com/exampleAPI/rni/v2/subscriptions" } }; modulepar charstring PX_CALLBACK_URI := "/"; diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn index f568100..c4145ec 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn @@ -61,7 +61,7 @@ module RnisAPI_Templates { in template (value) FilterCriteriaAssocHo p_filterCriteriaAssocHo, in template (omit) Json.Bool p_requestTestNotification := omit, in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, - in template (omit) Link p_links := omit, + in template (omit) Links p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { subscriptionType := "CellChangeSubscription", @@ -78,7 +78,7 @@ module RnisAPI_Templates { in template (value) FilterCriteriaAssocHo p_filterCriteriaAssocHo, in template (omit) Json.Bool p_requestTestNotification := omit, in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, - in template (omit) Link p_links := omit, + in template (omit) Links p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) modifies m_cell_change_subscription := { subscriptionType := "CellChangeSubscription_invalid" @@ -86,7 +86,7 @@ module RnisAPI_Templates { template CellChangeSubscription mw_cell_change_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, + template (present) Links p_links := ?, template (present) FilterCriteriaAssocHo p_filterCriteriaAssocHo := ?, template Json.Bool p_requestTestNotification := *, template WebsockNotifConfig p_websockNotifConfig := *, @@ -110,7 +110,7 @@ module RnisAPI_Templates { in template (value) RabEstSubscription_FilterCriteriaQci p_filterCriteriaQci, in template (omit) Json.Bool p_requestTestNotification := omit, in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, - in template (omit) Link p_links := omit, + in template (omit) Links p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { subscriptionType := "RabEstSubscription", @@ -124,7 +124,7 @@ module RnisAPI_Templates { template (present) RabEstSubscription mw_rab_est_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, + template (present) Links p_links := ?, template (present) RabEstSubscription_FilterCriteriaQci p_filterCriteriaQci := ?, template Json.Bool p_requestTestNotification := *, template WebsockNotifConfig p_websockNotifConfig := *, @@ -144,7 +144,7 @@ module RnisAPI_Templates { in template (value) RabModSubscription_FilterCriteriaQci p_filterCriteriaQci, in template (omit) Json.Bool p_requestTestNotification := omit, in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, - in template (omit) Link p_links := omit, + in template (omit) Links p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { subscriptionType := "RabModSubscription", @@ -158,7 +158,7 @@ module RnisAPI_Templates { template (present) RabModSubscription mw_rab_mod_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, + template (present) Links p_links := ?, template (present) RabModSubscription_FilterCriteriaQci p_filterCriteriaQci := ?, template Json.Bool p_requestTestNotification := *, template WebsockNotifConfig p_websockNotifConfig := *, @@ -178,7 +178,7 @@ module RnisAPI_Templates { in template (value) RabModSubscription_FilterCriteriaQci p_filterCriteriaQci, in template (omit) Json.Bool p_requestTestNotification := omit, in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, - in template (omit) Link p_links := omit, + in template (omit) Links p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { subscriptionType := "RabRelSubscription", @@ -192,7 +192,7 @@ module RnisAPI_Templates { template (present) RabRelSubscription mw_rab_rel_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, + template (present) Links p_links := ?, template (present) RabModSubscription_FilterCriteriaQci p_filterCriteriaQci := ?, template Json.Bool p_requestTestNotification := *, template WebsockNotifConfig p_websockNotifConfig := *, @@ -209,7 +209,7 @@ module RnisAPI_Templates { template (present) MeasRepUeSubscription mw_meas_rep_ue_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, + template (present) Links p_links := ?, template (present) FilterCriteriaAssocTri p_filterCriteriaAssocTri := ?, template Json.Bool p_requestTestNotification := *, template WebsockNotifConfig p_websockNotifConfig := *, @@ -226,7 +226,7 @@ module RnisAPI_Templates { template (present) MeasTaSubscription mw_meas_ta_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, + template (present) Links p_links := ?, template (present) FilterCriteriaAssoc p_filterCriteriaAssoc := ?, template Json.Bool p_requestTestNotification := *, template WebsockNotifConfig p_websockNotifConfig := *, @@ -243,7 +243,7 @@ module RnisAPI_Templates { template (present) CaReConfSubscription mw_ca_reconfig_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, + template (present) Links p_links := ?, template (present) FilterCriteriaAssoc p_filterCriteriaAssoc := ?, template Json.Bool p_requestTestNotification := *, template WebsockNotifConfig p_websockNotifConfig := *, @@ -260,7 +260,7 @@ module RnisAPI_Templates { template (present) S1BearerSubscription mw_s1_bearer_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, + template (present) Links p_links := ?, template (present) EventType p_eventType := ?, template (present) S1BearerSubscriptionCriteria p_s1BearerSubscriptionCriteria := ?, template Json.Bool p_requestTestNotification := *, diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn index ab52234..f5066a6 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn @@ -310,7 +310,7 @@ module RnisAPI_TypesAndValues { CallbackReference callbackReference, Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, - Link links optional, + Links links optional, FilterCriteriaAssocHo filterCriteriaAssocHo, TimeStamp expiryDeadline optional } with { @@ -322,7 +322,7 @@ module RnisAPI_TypesAndValues { * @member self_ URI referring to a resource * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.2-1: Attributes of the CellChangeSubscription */ - type record Link { + type record Links { LinkType self_ } with { variant (self_) "name as 'self'"; @@ -374,7 +374,7 @@ module RnisAPI_TypesAndValues { CallbackReference callbackReference, Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, - Link links optional, + Links links optional, RabEstSubscription_FilterCriteriaQci filterCriteriaQci, TimeStamp expiryDeadline optional } with { @@ -410,7 +410,7 @@ module RnisAPI_TypesAndValues { CallbackReference callbackReference, Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, - Link links optional, + Links links optional, RabModSubscription_FilterCriteriaQci filterCriteriaQci, TimeStamp expiryDeadline optional } with { @@ -433,7 +433,7 @@ module RnisAPI_TypesAndValues { CallbackReference callbackReference, Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, - Link links optional, + Links links optional, RabModSubscription_FilterCriteriaQci filterCriteriaQci, TimeStamp expiryDeadline optional } with { @@ -471,7 +471,7 @@ module RnisAPI_TypesAndValues { CallbackReference callbackReference, Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, - Link links optional, + Links links optional, FilterCriteriaAssocTri filterCriteriaAssocTri, TimeStamp expiryDeadline optional } with { @@ -511,7 +511,7 @@ module RnisAPI_TypesAndValues { CallbackReference callbackReference, Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, - Link links, + Links links, FilterCriteriaAssoc filterCriteriaAssoc, TimeStamp expiryDeadline optional } with { @@ -547,7 +547,7 @@ module RnisAPI_TypesAndValues { CallbackReference callbackReference, Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, - Link links optional, + Links links optional, FilterCriteriaAssoc filterCriteriaAssoc, TimeStamp expiryDeadline optional } with { @@ -571,7 +571,7 @@ module RnisAPI_TypesAndValues { CallbackReference callbackReference, Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, - Link links optional, + Links links optional, EventType eventType, S1BearerSubscriptionCriteria s1BearerSubscriptionCriteria, TimeStamp expiryDeadline optional @@ -658,7 +658,7 @@ module RnisAPI_TypesAndValues { CallbackReference callbackReference, Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, - Link links optional, + Links links optional, FilterCriteriaNrMrs filterCriteriaNrMrs, TimeStamp expiryDeadline optional } with { @@ -721,7 +721,7 @@ module RnisAPI_TypesAndValues { Ecgi_list trgEcgi, HoStatus hoStatus, TempUeId_ tempUeId, - Link links optional + Links links optional } with { variant (links) "name as '_links'"; } @@ -746,7 +746,7 @@ module RnisAPI_TypesAndValues { ErabId erabId, ErabQosParameters erabQosParameters, TempUeId_ tempUeId, - Link links optional + Links links optional } with { variant (links) "name as '_links'"; } @@ -769,7 +769,7 @@ module RnisAPI_TypesAndValues { AssociateId associateId, ErabId erabId, ErabQosParameters erabQosParameters, - Link links optional + Links links optional } with { variant (links) "name as '_links'"; } @@ -790,7 +790,7 @@ module RnisAPI_TypesAndValues { Ecgi ecgi, AssociateId associateId, ErabReleaseInfo erabReleaseInfo, - Link links optional + Links links optional } with { variant (links) "name as '_links'"; } @@ -840,7 +840,7 @@ module RnisAPI_TypesAndValues { Json.Integer heightUe optional, NewRadioMeasInfo newRadioMeasInfo optional, NewRadioMeasNeiInfo newRadioMeasNeiInfo optional, - Link links optional + Links links optional } with { variant (trigger_) "name as 'trigger'"; variant (links) "name as '_links'"; @@ -1015,7 +1015,7 @@ module RnisAPI_TypesAndValues { Ecgi ecgi, AssociateId associateId, Json.Integer timingAdvance optional, - Link links optional + Links links optional } with { variant (links) "name as '_links'"; } @@ -1041,7 +1041,7 @@ module RnisAPI_TypesAndValues { SecondaryCellRemove secondaryCellRemove optional, CarrierAggregationMeasInfo_CaReconfNotification carrierAggregationMeasInfo optional, - Link links optional + Links links optional } with { variant (links) "name as '_links'"; } @@ -1096,7 +1096,7 @@ module RnisAPI_TypesAndValues { type record ExpiryNotification { Json.String notificationType, TimeStamp timeStamp optional, - Link links optional + Links links optional } with { variant (links) "name as '_links'"; } @@ -1115,7 +1115,7 @@ module RnisAPI_TypesAndValues { TimeStamp timeStamp optional, EventType s1Event, S1UeInfo_ s1UeInfo, - Link links optional + Links links optional } with { variant (links) "name as '_links'"; } @@ -1141,7 +1141,7 @@ module RnisAPI_TypesAndValues { NrNeighCellMeasInfo nrNeighCellMeasInfo optional, EutraNeighbourCellMeasInfo_NrMeasRepUeNotification_ eutraNeighCellMeasInfo optional, - Link links optional + Links links optional } with { variant (links) "name as '_links'"; } @@ -1217,7 +1217,7 @@ module RnisAPI_TypesAndValues { */ type record TestNotification { Json.String notificationType, - Link links optional + Links links optional } with { variant (links) "name as '_links'"; } diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn index 4459508..69f6243 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn @@ -24,104 +24,100 @@ module V2XInformationServiceAPI_Templates { in template (value) ProInfoUuUnicastList p_proInfoUuUnicast, in template (omit) TimeStamp p_timeStamp := omit ) := { - proInfoUuUnicast := p_proInfoUuUnicast, - timeStamp := p_timeStamp + timeStamp := p_timeStamp, + proInfoUuUnicast := p_proInfoUuUnicast } // End of template m_uu_unicast_provisioning_info template (present) UuUnicastProvisioningInfo mw_uu_unicast_provisioning_info( template (present) ProInfoUuUnicastList p_proInfoUuUnicast := ?, template TimeStamp p_timeStamp := * ) := { - proInfoUuUnicast := p_proInfoUuUnicast, - timeStamp := p_timeStamp + timeStamp := p_timeStamp, + proInfoUuUnicast := p_proInfoUuUnicast } // End of template mw_uu_unicast_provisioning_info template (omit) UuMbmsProvisioningInfo m_uu_mbms_provisioning_info( in template (value) ProInfoUuMbmsList p_proInfoUuMbms, in template (omit) TimeStamp p_timeStamp := omit ) := { - proInfoUuMbms := p_proInfoUuMbms, - timeStamp := p_timeStamp + timeStamp := p_timeStamp, + proInfoUuMbms := p_proInfoUuMbms } // End of template m_uu_mbms_provisioning_info template (present) UuMbmsProvisioningInfo mw_uu_mbms_provisioning_info( template (present) ProInfoUuMbmsList p_proInfoUuMbms := ?, template TimeStamp p_timeStamp := * ) := { - proInfoUuMbms := p_proInfoUuMbms, - timeStamp := p_timeStamp + timeStamp := p_timeStamp, + proInfoUuMbms := p_proInfoUuMbms } // End of template mw_uu_mbms_provisioning_info template (omit) Pc5ProvisioningInfo m_pc5_provisioning_info( in template (value) Pc5ProvisioningInfoProInfoPc5List p_proInfoPc5, in template (omit) TimeStamp p_timeStamp := omit ) := { - proInfoPc5 := p_proInfoPc5, - timeStamp := p_timeStamp + timeStamp := p_timeStamp, + proInfoPc5 := p_proInfoPc5 } // End of template m_pc5_provisioning_info template (present) Pc5ProvisioningInfo mw_pc5_provisioning_info( template (present) Pc5ProvisioningInfoProInfoPc5List p_proInfoPc5 := ?, template TimeStamp p_timeStamp := * ) := { - proInfoPc5 := p_proInfoPc5, - timeStamp := p_timeStamp + timeStamp := p_timeStamp, + proInfoPc5 := p_proInfoPc5 } // End of template mw_pc5_provisioning_info template (omit) PredictedQos m_predicted_qos( + in template (value) PredictionTarget p_predictionTarget, in template (value) Json.String p_locationGranularity, - in template (value) PredictedQosRoutesList p_routes, + in template (value) Qos p_qos, + in template (omit) TimeStamp p_noticePeriod := omit, + in template (omit) PredictionArea p_predictionArea := omit, + in template (omit) Routes p_routes := omit, in template (omit) TimeStamp p_timeGranularity := omit ) := { + predictionTarget := p_predictionTarget, timeGranularity := p_timeGranularity, locationGranularity := p_locationGranularity, - routes := p_routes + noticePeriod := p_noticePeriod, + predictionArea := p_predictionArea, + routes := p_routes, + qos := p_qos } // End of template m_predicted_qos template PredictedQos mw_predicted_qos( + template (present) PredictionTarget p_predictionTarget := ?, template (present) Json.String p_locationGranularity := ?, - template (present) PredictedQosRoutesList p_routes := ?, + template (present) Qos p_qos := ?, + template TimeStamp p_noticePeriod := *, + template PredictionArea p_predictionArea := *, + template Routes p_routes := *, template TimeStamp p_timeGranularity := * - ) := { + ) := { + predictionTarget := p_predictionTarget, timeGranularity := p_timeGranularity, locationGranularity := p_locationGranularity, - routes := p_routes + noticePeriod := p_noticePeriod, + predictionArea := p_predictionArea, + routes := p_routes, + qos := p_qos } // End of template mw_predicted_qos - template (value) PredictedQosRoutes m_predicted_qos_routes( - in template (value) RouteInfoList p_routeinfo - ) := { - routeinfo := p_routeinfo - } // End of template m_predicted_qos_routes - - template (present) PredictedQosRoutes mw_predicted_qos_routes( - template (present) RouteInfoList p_routeinfo := ? - ) := { - routeinfo := p_routeinfo - } // End of template mw_predicted_qos_routes - template (omit) RouteInfo m_route_info( in template (value) LocationInfo p_location, - in template (omit) TimeStamp p_time := omit, - in template (omit) Json.UInt8 p_rsrp := omit, - in template (omit) Json.UInt8 p_rsrq := omit + in template (omit) TimeStamp p_time := omit ) := { location := p_location, - time := p_time, - rsrp := p_rsrp, - rsrq := p_rsrq + time := p_time } // End of template m_route_info template RouteInfo mw_route_info( template (present) LocationInfo p_location := ?, - template TimeStamp p_time := *, - template Json.UInt8 p_rsrp := *, - template Json.UInt8 p_rsrq := * + template TimeStamp p_time := * ) := { location := p_location, - time := p_time, - rsrp := p_rsrp, - rsrq := p_rsrq + time := p_time } // End of template mw_route_info template (omit) LocationInfo m_location_info( @@ -160,20 +156,20 @@ module V2XInformationServiceAPI_Templates { in Json.String p_cellId, in template (value) Plmn p_plmn ) := { + plmn := p_plmn, cellId := { cellId := p_cellId - }, - plmn := p_plmn + } } // End of template m_ecgi template (present) Ecgi mw_ecgi( template (present) Json.String p_cellId := ?, template (present) Plmn p_plmn := ? ) := { + plmn := p_plmn, cellId := { cellId := p_cellId - }, - plmn := p_plmn + } } // End of template mw_ecgi template (value) Plmn m_plmn( @@ -193,66 +189,68 @@ module V2XInformationServiceAPI_Templates { } // End of template mw_plmn template (value) V2xMsgPublication m_v2x_message( - in Json.String p_msgContent := "AgIAEPQ9JwVAWXGJVq3AIK5gAgAgADDUHgAAASAWhAMQpQcz/+H/+gAQAA==", - in Json.String p_msgEncodeFormat := "base64", - in MsgType p_msgType := cam, - in StdOrganization p_stdOrganization := ETSI + in template (value) V2xMsgPropertiesValues p_msgPropertiesValues, + in Json.String p_msgRepresentationFormat := "base64", + in Json.String p_msgContent := "AgIAEPQ9JwVAWXGJVq3AIK5gAgAgADDUHgAAASAWhAMQpQcz/+H/+gAQAA==" ) := { - msgContent := p_msgContent, - msgEncodeFormat := p_msgEncodeFormat, - msgType := p_msgType, - stdOrganization := p_stdOrganization + msgPropertiesValues := p_msgPropertiesValues, + msgRepresentationFormat := p_msgRepresentationFormat, + msgContent := p_msgContent } // End of template m_v2x_message template (present) V2xMsgPublication mw_v2x_message( - template (present) Json.String p_msgContent := ?, - template (present) Json.String p_msgEncodeFormat := "base64", - template (present) MsgType p_msgType := ?, - template (present) StdOrganization p_stdOrganization := ETSI + template (present) V2xMsgPropertiesValues p_msgPropertiesValues := ?, + template (present) Json.String p_msgRepresentationFormat := ?, + template (present) Json.String p_msgContent := ? ) := { - msgContent := p_msgContent, - msgEncodeFormat := p_msgEncodeFormat, - msgType := p_msgType, - stdOrganization := p_stdOrganization + msgPropertiesValues := p_msgPropertiesValues, + msgRepresentationFormat := p_msgRepresentationFormat, + msgContent := p_msgContent } // End of template mw_v2x_message template (omit) ProvChgUuUniSubscription m_prov_chg_uu_uni_subscription( - in template (value) Json.AnyURI p_callbackReference, in template (value) ProvChgUuUniSubscriptionFilterCriteria p_filterCriteria, - in template (omit) LinkType p_links := omit, + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "ProvChgUuUniSubscription" + subscriptionType := "ProvChgUuUniSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template m_prov_chg_uu_uni_subscription template (omit) ProvChgUuUniSubscription m_prov_chg_uu_uni_subscription_invalid( - in template (value) Json.AnyURI p_callbackReference, in template (value) ProvChgUuUniSubscriptionFilterCriteria p_filterCriteria, - in template (omit) LinkType p_links := omit, + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) TimeStamp p_expiryDeadline := omit - ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "InvalidProvChgUuUniSubscription" + ) modifies m_prov_chg_uu_uni_subscription := { + subscriptionType := "InvalidProvChgUuUniSubscription" } // End of template m_prov_chg_uu_uni_subscription template ProvChgUuUniSubscription mw_prov_chg_uu_uni_subscription( - template (present) Json.AnyURI p_callbackReference := ?, template (present) ProvChgUuUniSubscriptionFilterCriteria p_filterCriteria := ?, - template LinkType p_links := *, + template Json.AnyURI p_callbackReference := *, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "ProvChgUuUniSubscription" + subscriptionType := "ProvChgUuUniSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template mw_prov_chg_uu_uni_subscription template (omit) ProvChgUuUniSubscriptionFilterCriteria m_prov_chg_uu_uni_filter_criteria( @@ -261,8 +259,8 @@ module V2XInformationServiceAPI_Templates { in template (omit) UuMbmsNeighbourCellInfoList p_neighbourCellInfo := omit ) := { locationInfo := p_location_info, - neighbourCellInfo := p_neighbourCellInfo, - v2xApplicationServer := p_v2xApplicationServer + v2xApplicationServer := p_v2xApplicationServer, + neighbourCellInfo := p_neighbourCellInfo } // End of template m_prov_chg_uu_uni_filter_criteria template ProvChgUuUniSubscriptionFilterCriteria mw_prov_chg_uu_uni_filter_criteria( @@ -271,8 +269,8 @@ module V2XInformationServiceAPI_Templates { template UuMbmsNeighbourCellInfoList p_neighbourCellInfo := * ) := { locationInfo := p_location_info, - neighbourCellInfo := p_neighbourCellInfo, - v2xApplicationServer := p_v2xApplicationServer + v2xApplicationServer := p_v2xApplicationServer, + neighbourCellInfo := p_neighbourCellInfo } // End of template mw_prov_chg_uu_uni_filter_criteria template (value) V2xApplicationServer m_v2x_application_server( @@ -280,7 +278,7 @@ module V2XInformationServiceAPI_Templates { in Json.String p_udp_port ) := { ipAddress := p_ip_address, - udpPort := p_udp_port + udpPort := p_udp_port } // End of template m_v2x_application_server template (present) V2xApplicationServer mw_v2x_application_server( @@ -288,33 +286,41 @@ module V2XInformationServiceAPI_Templates { template (present) Json.String p_udp_port := ? ) := { ipAddress := p_ip_address, - udpPort := p_udp_port + udpPort := p_udp_port } // End of template mw_v2x_application_server template (omit) ProvChgUuMbmsSubscription m_prov_chg_uu_mbms_subscription( - in template (value) Json.AnyURI p_callbackReference, in template (value) ProvChgUuMbmsSubscriptionFilterCriteria p_filterCriteria, - in template (omit) LinkType p_links := omit, + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "ProvChgUuMbmsSubscription" + subscriptionType := "ProvChgUuMbmsSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template m_prov_chg_uu_mbms_subscription template ProvChgUuMbmsSubscription mw_prov_chg_uu_mbms_subscription( - template (present) Json.AnyURI p_callbackReference := ?, template (present) ProvChgUuMbmsSubscriptionFilterCriteria p_filterCriteria := ?, - template LinkType p_links := *, + template Json.AnyURI p_callbackReference := *, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * - ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "ProvChgUuMbmsSubscription" + ) := { + subscriptionType := "ProvChgUuMbmsSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template mw_prov_chg_uu_mbms_subscription template (omit) ProvChgUuMbmsSubscriptionFilterCriteria m_prov_chg_uu_mbms_filter_criteria( @@ -323,8 +329,8 @@ module V2XInformationServiceAPI_Templates { template (omit) UuMbmsNeighbourCellInfoList p_neighbourCellInfo := omit ) := { locationInfo := p_locationInfo, - neighbourCellInfo := p_neighbourCellInfo, - v2xServerUsd := p_v2xServerUsd + v2xServerUsd := p_v2xServerUsd, + neighbourCellInfo := p_neighbourCellInfo } // End of template m_prov_chg_uu_mbms_filter_criteria template (present) ProvChgUuMbmsSubscriptionFilterCriteria mw_prov_chg_uu_mbms_filter_criteria( @@ -333,8 +339,8 @@ module V2XInformationServiceAPI_Templates { template UuMbmsNeighbourCellInfoList p_neighbourCellInfo := * ) := { locationInfo := p_locationInfo, - neighbourCellInfo := p_neighbourCellInfo, - v2xServerUsd := p_v2xServerUsd + v2xServerUsd := p_v2xServerUsd, + neighbourCellInfo := p_neighbourCellInfo } // End of template mw_prov_chg_uu_mbms_filter_criteria template (value) V2xServerUsd m_v2x_server_usd( @@ -342,9 +348,9 @@ module V2XInformationServiceAPI_Templates { in template (value) SdpInfo p_sdpInfo, in template (value) Tmgi p_tmgi ) := { + tmgi := p_tmgi, serviceAreaIdentifier := p_serviceAreaIdentifier, - sdpInfo := p_sdpInfo, - tmgi := p_tmgi + sdpInfo := p_sdpInfo } // End of template m_v2x_server_usd template (present) V2xServerUsd mw_v2x_server_usd( @@ -352,9 +358,9 @@ module V2XInformationServiceAPI_Templates { template (present) SdpInfo p_sdpInfo := ?, template (present) Tmgi p_tmgi := ? ) := { + tmgi := p_tmgi, serviceAreaIdentifier := p_serviceAreaIdentifier, - sdpInfo := p_sdpInfo, - tmgi := p_tmgi + sdpInfo := p_sdpInfo } // End of template mw_v2x_server_usd template (value) SdpInfo m_sdp_info( @@ -394,29 +400,37 @@ module V2XInformationServiceAPI_Templates { } // End of template mw_tmgi template (omit) ProvChgPc5Subscription m_prov_chg_pc5_subscription( - in template (value) Json.AnyURI p_callbackReference, in template (value) FilterCriteria p_filterCriteria, - in template (omit) LinkType p_links := omit, + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "ProvChgPc5Subscription" + subscriptionType := "ProvChgPc5Subscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template m_prov_chg_pc5_subscription template (present) ProvChgPc5Subscription mw_prov_chg_pc5_subscription( - template (present) Json.AnyURI p_callbackReference := ?, template (present) FilterCriteria p_filterCriteria := ?, - template LinkType p_links := *, + template Json.AnyURI p_callbackReference := *, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "ProvChgPc5Subscription" + subscriptionType := "ProvChgPc5Subscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template mw_prov_chg_pc5_subscription template (omit) FilterCriteria m_filter_criteria( @@ -424,8 +438,8 @@ module V2XInformationServiceAPI_Templates { in template (value) LocationInfo p_locationInfo, in template (omit) Pc5NeighbourCellInfoList p_neighbourCellInfo := omit ) := { - dstLayer2Id := p_dstLayer2Id, locationInfo := p_locationInfo, + dstLayer2Id := p_dstLayer2Id, neighbourCellInfo := p_neighbourCellInfo } // End of template m_filter_criteria @@ -434,51 +448,67 @@ module V2XInformationServiceAPI_Templates { template (present) LocationInfo p_locationInfo := ?, template Pc5NeighbourCellInfoList p_neighbourCellInfo := * ) := { - dstLayer2Id := p_dstLayer2Id, locationInfo := p_locationInfo, + dstLayer2Id := p_dstLayer2Id, neighbourCellInfo := p_neighbourCellInfo } // End of template mw_filter_criteria template (omit) V2xMsgSubscription m_v2x_msg_subscription( - in template (value) Json.AnyURI p_callbackReference, - in template (value) V2xMsgSubscriptionFilterCriteria p_filterCriteria, - in template (omit) LinkType p_links := omit, + in template (value) V2xMsgFilterCriteria p_filterCriteria, + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "V2xMsgSubscription" + subscriptionType := "V2xMsgSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template m_v2x_msg_subscription template (present) V2xMsgSubscription mw_v2x_msg_subscription( - template (present) Json.AnyURI p_callbackReference := ?, - template (present) V2xMsgSubscriptionFilterCriteria p_filterCriteria := ?, - template LinkType p_links := *, + template (present) V2xMsgFilterCriteria p_filterCriteria := ?, + template Json.AnyURI p_callbackReference := *, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "V2xMsgSubscription" + subscriptionType := "V2xMsgSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template mw_v2x_msg_subscription - template (omit) V2xMsgSubscriptionFilterCriteria m_v2x_msg_subscription_filter_criteria( - in StdOrganization p_stdOrganization := ETSI, - in template (omit) MsgTypeList p_msgType := { cam, denm } - ) := { - msgType := p_msgType, - stdOrganization := p_stdOrganization + template (omit) V2xMsgFilterCriteria m_v2x_msg_subscription_filter_criteria( + in StdOrganization p_stdOrganization := ETSI, + in template (omit) MsgTypeList p_msgType := { cam, denm }, + in template (omit) MsgProtocolVersionList p_msgProtocolVersion := omit, + in template (omit) LocationInfoList p_locationInfo := omit + ) := { + stdOrganization := p_stdOrganization, + msgType := p_msgType, + msgProtocolVersion := p_msgProtocolVersion, + locationInfo := p_locationInfo } // End of template m_v2x_msg_subscription_filter_criteria - template (present) V2xMsgSubscriptionFilterCriteria mw_v2x_msg_subscription_filter_criteria( - template (present) StdOrganization p_stdOrganization := ETSI, - template MsgTypeList p_msgType := * - ) := { - msgType := p_msgType, - stdOrganization := p_stdOrganization + template (present) V2xMsgFilterCriteria mw_v2x_msg_subscription_filter_criteria( + template (present) StdOrganization p_stdOrganization := ETSI, + template MsgTypeList p_msgType := *, + template MsgProtocolVersionList p_msgProtocolVersion := *, + template LocationInfoList p_locationInfo := * + ) := { + stdOrganization := p_stdOrganization, + msgType := p_msgType, + msgProtocolVersion := p_msgProtocolVersion, + locationInfo := p_locationInfo } // End of template mw_v2x_msg_subscription_filter_criteria } // End of module V2XInformationServiceAPI_Templates diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn index ffb8c99..cd235c9 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn @@ -2,7 +2,7 @@ * @author ETSI / TTF T012 * @version $Url$ * $Id$ - * @desc Types ANd Values for ETSI GS MEC 030 V2.1.1 (2020-04) + * @desc Types And Values for ETSI GS MEC 030 V3.1.1 (2023-03) * @copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. @@ -14,488 +14,766 @@ module V2XInformationServiceAPI_TypesAndValues { import from Json all; /** - * @desc E-UTRAN Cell Identity as a bit string (size (28)) - * @see ETSI TS 136 413 - */ - type record CellId { - Json.String cellId - } - - /** - * @desc E-UTRA Absolute Radio Frequency Channel Number, range (0... 65535) - * @see ETSI TS 136 413 - */ - type UInt16 Earfcn; - - /** - * @desc Transmission Bandwidth, which is used to indicate the UL or DL transmission bandwidth expressed in units of resource blocks - * @see ETSI TS 136 413 - */ - type enumerated TransmissionBandwidth { - bw6 (1), - bw15 (2), - bw25 (3), - bw50 (4), - bw75 (6), - bw100 (7) - } with { - variant "JSON: as number" - } - - /** - * @desc E-UTRAN Cell Global Identifier - * @member cellId The E-UTRAN Cell Identity - * @member plmn Public Land Mobile Network Identity - * @see ETSI TS 136 413 - */ - type record Ecgi { - CellId cellId, - Plmn plmn - } - - /** - * @desc FDD information - * @member dlEarfcn Downlink E-UTRA Absolute Radio Frequency Channel Number - * @member dlTransmissionBandwidth Downlink Transmission Bandwidth - * @member ulEarfcn Uplink E-UTRA Absolute Radio Frequency Channel Number - * @member ulTransmissionBandwidth Uplink Transmission Bandwidth - * @see ETSI TS 136 413 + * @desc Provisioning information required for V2X communication over Uu unicast + * @member timeStamp_ Time stamp + * @member proInfoUuUnicast The provisioning information per location + * @see ETSI GS MEC 030 V3.1.1 (2023-03) V3.1.1 (2023-03) Table 6.2.2-1: Attributes of the UuUnicastProvisioningInfo */ - type record FddInfo { - Earfcn dlEarfcn, - TransmissionBandwidth dlTransmissionBandwidth, - Earfcn ulEarfcn, - TransmissionBandwidth ulTransmissionBandwidth + type record UuUnicastProvisioningInfo { + TimeStamp timeStamp optional, + ProInfoUuUnicastList proInfoUuUnicast } /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type Json.UInteger Seconds; - - /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type Json.UInteger NanoSeconds; - - /** - * @desc Time stamp description - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see MEC030 Clause 6.5.2 Type: TimeStamp + * @desc The provisioning information per location as defined below + * @member locationInfo Location information to identify a cell of a base station or a particular geographical area + * @member neighbourCellInfoThe information of the neighbour cells in a visiting PLMN that support V2X communication over Uu unicast + * @member v2xApplicationServer V2X Application Server address (consisting of IP address and UDP port) for unicast + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.2-1: Attributes of the UuUnicastProvisioningInfo */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds + type record ProInfoUuUnicast { + LocationInfo locationInfo, + V2xApplicationServer v2xApplicationServer, + UuUniNeighbourCellInfoList neighbourCellInfo optional } + type record of ProInfoUuUnicast ProInfoUuUnicastList; /** - * @desc Information of a geographical area - * @member latitude Latitude (DATUM = WGS84) -90 to 90 in decimal degree format DDD.ddd - * @member longitude Longitude (DATUM = WGS84)-180 to 180 in decimal degree format DDD.ddd - * @see MEC030 Clause 6.5.3 Type: LocationInfo + * @desc Provisioning information required for V2X communication over Uu MBMS + * @member proInfoUuMbms The provisioning information per location as defined below + * @member timeStamp_ TimeStamp + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.3-1: Attributes of the UuMbmsProvisioningInfo */ - type record LocationInfoGeoArea { - Json.Number latitude, - Json.Number longitude + type record UuMbmsProvisioningInfo { + TimeStamp timeStamp optional, + ProInfoUuMbmsList proInfoUuMbms } /** - * @desc Location information - * @member ecgi E-UTRAN CelI Global Identifier of the serving cell - * @member geoArea Information of a geographical area - * @see MEC030 Clause 6.5.3 Type: LocationInfo + * @desc The provisioning information per location + * @member locationInfo Location information to identify a cell of a base station or a particular geographical area + * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.3-1: Attributes of the UuMbmsProvisioningInfo */ - type record LocationInfo { - Ecgi ecgi, - LocationInfoGeoArea geoArea optional + type record ProInfoUuMbms { + LocationInfo locationInfo, + UuMbmsNeighbourCellInfoList neighbourCellInfo optional, + V2xServerUsd v2xServerUsd } - type record of LocationInfo LocationInfoList; + type record of ProInfoUuMbms ProInfoUuMbmsList; /** - * @desc Location information - * @member ecgi E-UTRAN CelI Global Identifier - * @member plmn Public Land Mobile Network Identity - * @member siV2xConfig V2X sidelink communication configuration, as defined in ETSI TS 136 331 - * @see MEC030 Clause 6.5.12 Type: Pc5NeighbourCellInfo + * @desc Provisioning information required for V2X communication over PC5 + * @member proInfoPc5 The provisioning information per location + * @member timeStamp Time stamp + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.4-1: Attributes of the Pc5ProvisioningInfo */ - type record Pc5NeighbourCellInfo { - Ecgi ecgi, - Plmn plmn, - Json.String siV2xConfig + type record Pc5ProvisioningInfo { + TimeStamp timeStamp optional, + Pc5ProvisioningInfoProInfoPc5List proInfoPc5 } - type record of Pc5NeighbourCellInfo Pc5NeighbourCellInfoList; /** * @desc The provisioning information per location - * @member dstLayer2Id For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID * @member locationInfo Location information to identify a cell of a base station or a particular geographical area + * @member dstLayer2Id For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5 - * @see MEC030 Clause 6.2.4 Type: Pc5ProvisioningInfo + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.4-1: Attributes of the Pc5ProvisioningInfo */ type record Pc5ProvisioningInfoProInfoPc5 { - Json.String dstLayer2Id, LocationInfo locationInfo, + Json.String dstLayer2Id, Pc5NeighbourCellInfoList neighbourCellInfo optional } type record of Pc5ProvisioningInfoProInfoPc5 Pc5ProvisioningInfoProInfoPc5List; /** - * @desc Provisioning information required for V2X communication over PC5 - * @member proInfoPc5 The provisioning information per location - * @member timeStamp Time stamp - * @see MEC030 Clause 6.5.12 Type: Pc5NeighbourCellInfo + * @desc This type represents the information of one or more V2X Message Distribution Servers that is exchanged between the VIS and a service consumer (e.g. a MEC application) to enable a direct interaction among the service consumer and one or multiple V2X Message Distribution Servers + * @member v2xMsgDistributionServer Describes the information of the V2X Message Distribution Servers supported by the service consumer for direct communication + * @member locationInfo Location information to identify a particular geographical area of interest to the service consumer for receiving V2X messages + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.5-1: Attributes of the V2xMsgDistributionServerInfo */ type record Pc5ProvisioningInfo { - Pc5ProvisioningInfoProInfoPc5List proInfoPc5, - TimeStamp timeStamp optional + V2xMsgDistributionServer v2xMsgDistributionServer, + LocationInfo locationInfo optional } /** - * @desc PLMN Identity - * @member mcc The Mobile Country Code part of PLMN Identity - * @member mnc The Mobile Network Code part of PLMN Identity - * @see MEC030 Clause 6.5.4 Type: Plmn + * @desc Predicted QoS of a vehicular UE + * @member predictionTarget Indicates target of QoS prediction + * @member timeGranularity Granularity of visited location. Measured in meters + * @member locationGranularity Granularity of visited location. Measured in meters + * @member noticePeriod Information on when the predicted QoS is needed at the service consumer interface + * @member predictionArea Geographical area including the two ends of the user plane link between two V2X application instances + * @member routes Information relating to the potential routes of a vehicular UE + * @member qos Predicted QoS at the related time and vehicular UE location + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.6-1: Attributes of the PredictedQos */ - type record Plmn { - Json.String mcc, - Json.String mnc + type record PredictedQos { + PredictionTarget predictionTarget, + TimeStamp timeGranularity optional, + Json.String locationGranularity, + TimeStamp noticePeriod optional, + PredictionArea predictionArea optional, + Routes routes optional, + Qos qos + } + + type enumerated PredictionTarget { + SINGLE_UE_PREDICTION (1), + E2E_APPLICATION_INSTANCE_PREDICTION (2) + } with { + variant "JSON: as number" } /** - * @desc Information relating to a specific route - * @member location Vehicular UE location - * @member time Estimated time at the location - * @member rsrp Reference Signal Received Quality as defined in ETSI TS 136 214 - * @member rsrq Reference Signal Received Quality as defined in ETSI TS 136 214 [i.13]. Shall only be included in the response - * @see MEC030 Clause 6.2.5 Type: PredictedQos + * @desc Geographical area including the two ends of the user plane link between two V2X application instances + * @member center Center of geographical area including the two ends of the user plane link between two V2X application instances + * @member radius Radius of geographical area including the two ends of the user plane link between two V2X application instances. Measured in meters + * @member + * @member + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.6-1: Attributes of the PredictedQos */ - type record RouteInfo { - LocationInfo location, - TimeStamp time optional, - Json.UInt8 rsrp optional, - Json.UInt8 rsrq optional + type record PredictionArea { + LocationInfo center, + Json.String radius } - type record of RouteInfo RouteInfoList; /** * @desc Information relating to the potential routes of a vehicular UE * @member routeinfo Information relating to a specific route - * @see MEC030 Clause 6.2.5 Type: PredictedQos + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.6-1: Attributes of the PredictedQos */ - type record PredictedQosRoutes { + type record Route { RouteInfoList routeinfo } - type record of PredictedQosRoutes PredictedQosRoutesList; + type record of Route Routes; /** - * @desc Predicted QoS of a vehicular UE - * @member timeGranularity Granularity of visited location. Measured in meters - * @member locationGranularity Granularity of visited location. Measured in meters - * @member routes Information relating to the potential routes of a vehicular UE - * @see MEC030 Clause 6.2.5 Type: PredictedQos + * @desc Information relating to a specific route + * @member location Vehicular UE location + * @member time Estimated time at the location + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.6-1: Attributes of the PredictedQos */ - type record PredictedQos { - TimeStamp timeGranularity optional, - Json.String locationGranularity, - PredictedQosRoutesList routes + type record RouteInfo { + LocationInfo location, + TimeStamp time optional } + type record of RouteInfo RouteInfoList; /** - * @desc Notification from VIS with regards to the provisioning information changes for V2X communication over PC5 - * @member dstLayer2Id For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID - * @member locationInfo Location information to identify a cell of a base station or a particular geographical area - * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5 - * @member notificationType Shall be set to "ProvChgPc5Notification" - * @see MEC030 Clause 6.4.4 Type: ProvChgPc5Notification + * @desc Predicted QoS at the related time and vehicular UE location + * @member stream Predicted QoS at the related time and vehicular UE location for the specific data stream + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.6-1: Attributes of the PredictedQos */ - type record ProvChgPc5Notification { - Json.String dstLayer2Id optional, - LocationInfo locationInfo, - Pc5NeighbourCellInfoList neighbourCellInfo optional, - Json.String notificationType, - TimeStamp timeStamp optional + type record Qos { + StreamList stream } /** - * @desc Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests - * @member self_ Self-referring URI. The URI shall be unique within the VIS API as it acts as an ID for the subscription - * @see MEC030 Clause 6.3.4 Type: ProvChgPc5Subscription + * @desc Predicted QoS at the related time and vehicular UE location + * @member qosKpi This structure contains the prediction for a specific QoS KPI related to a given data stream + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.6-1: Attributes of the PredictedQos */ - type record LinkType { - Json.AnyURI self_ - } with { - variant (self_) "name as 'self'"; + type record Stream { + QosKpiList qosKpi } + type record of Stream StreamList; /** - * @desc List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response - * @member dstLayer2Id For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID - * @member locationInfo Location information to identify a cell of a base station or a particular geographical area - * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5 - * @see MEC030 Clause 6.3.4 Type: ProvChgPc5Subscription + * @desc This structure contains the prediction for a specific QoS KPI related to a given data stream + * @member kpiName The name of the KPI (e.g. latency, UL bitrate, etc.) + * @member kpiValue Information on the predicted value for the specific QoS KPI + * @member confidence Confidence of the prediction, as returned by the relevant domain PF + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.6-1: Attributes of the PredictedQos */ - type record FilterCriteria { - Json.String dstLayer2Id, - LocationInfo locationInfo, - Pc5NeighbourCellInfoList neighbourCellInfo optional + type record QosKpi { + Json.String kpiName, + Json.String kpiValue, + Json.String confidence optional } + type record of QosKpi QosKpiList; /** - * @desc Subscription to the notifications from VIS about the provisioning information changes for V2X communication over PC5 - * @member links URI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response - * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response - * @member expiryDeadline Time stamp + * @desc V2X message that a service consumer publishes to VIS + * @member msgPropertiesValues List of message properties that is associated to the V2X message publication that can be used for filtering messages at the reception of the V2X message + * @member msgRepresentationFormat The representation format of the binary V2X message, for example base64 or hexadecimal representation + * @member msgType Published V2X message content. Its format is defined by the standardization organization indicated by the attribute stdOrganization of the msgPropertiesValues attribute + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.7-1: Attributes of the V2xMsgPublication + */ + type record V2xMsgPublication { + V2xMsgPropertiesValues msgPropertiesValues, + Json.String msgRepresentationFormat, + Json.String msgContent + } + + /** + * @desc Subscription to the notifications from VIS about the provisioning information changes for V2X communication over Uu unicast + * @member subscriptionType Shall be set to "ProvChgUuUniSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource * @member filterCriteria List of filtering criteria for the subscription - * @member subscriptionType Shall be set to "ProvChgPc5Subscription" - * @see MEC030 Clause 6.3.4 Type: ProvChgPc5Subscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.2-1: Attributes of the ProvChgUuUniSubscription */ - type record ProvChgPc5Subscription { - LinkType links optional, - Json.AnyURI callbackReference, - TimeStamp expiryDeadline optional, - FilterCriteria filterCriteria, - Json.String subscriptionType + type record ProvChgUuUniSubscription { + Json.String subscriptionType, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + ProvChgUuUniSubscriptionFilterCriteria filterCriteria, + TimeStamp expiryDeadline optional } with { variant (links) "name as '_links'"; } /** - * @desc Notification from VIS with regards to the provisioning information changes for V2X communication over Uu MBMS - * @member locationInfo Location information to identify a cell of a base station or a particular geographical area - * @member The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS - * @member notificationType Shall be set to "ProvChgUuMbmsNotification" - * @member timeStamp_ Time stamp - * @member v2xServerUsd User Service Description for V2X Application Server is used to configure the UE for receiving local V2X Application Server information when it is provided over MBMS - * @see MEC030 Clause 6.4.3 Type: ProvChgUuMbmsNotification + * @desc URI exposed by the client on which to receive notifications via HTTP */ - type record ProvChgUuMbmsNotification { - LocationInfo locationInfo, - UuMbmsNeighbourCellInfoList neighbourCellInfo optional, - Json.String notificationType, - TimeStamp timeStamp optional, - V2xServerUsd v2xServerUsd optional + type Json.AnyURI CallbackReference; + + /** + * @desc List of hyperlinks related to the resource + * @member self_ URI referring to a resource + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.2-1: Attributes of the ProvChgUuUniSubscription + */ + type record Links { + LinkType self_ + } with { + variant (self_) "name as 'self'"; } /** - * @desc List of filtering criteria for the subscription + * @desc List of filtering criteria for the subscription. * @member locationInfo Location information to identify a cell of a base station or a particular geographical area + * @member v2xApplicationServer V2X Application Server address (consisting of IP address and UDP port) for unicast * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS - * @member v2xServerUsd User Service Description for V2X Application Server is used to configure the UE for receiving local V2X Application Server information when it is provided over MBMS - * @see MEC030 Clause 6.3.3 Type: ProvChgUuMbmsSubscription + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.2-1: Attributes of the ProvChgUuUniSubscription */ - type record ProvChgUuMbmsSubscriptionFilterCriteria { + type record ProvChgUuUniSubscriptionFilterCriteria { LocationInfo locationInfo, - UuMbmsNeighbourCellInfoList neighbourCellInfo optional, - V2xServerUsd v2xServerUsd + V2xApplicationServer v2xApplicationServer, + UuMbmsNeighbourCellInfoList neighbourCellInfo optional } /** * @desc Subscription to the notifications from VIS about the provisioning information changes for V2X communication over Uu MBMS - * @member links URI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response - * @member callbackReferenceURI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response - * @member expiryDeadline Time stamp - * @member filterCriteria List of filtering criteria for the subscription * @member subscriptionType Shall be set to "ProvChgUuMbmsSubscription" - * @see MEC030 Clause 6.3.3 Type: ProvChgUuMbmsSubscription + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteria List of filtering criteria for the subscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.3-1: Attributes of the ProvChgUuMbmsSubscription */ type record ProvChgUuMbmsSubscription { - LinkType links optional, - Json.AnyURI callbackReference, - TimeStamp expiryDeadline optional, + Json.String subscriptionType, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, ProvChgUuMbmsSubscriptionFilterCriteria filterCriteria, - Json.String subscriptionType + TimeStamp expiryDeadline optional } with { variant (links) "name as '_links'"; } /** - * @desc Notification from VIS with regards to the provisioning information changes for V2X communication over Uu unicast - * @member locationInfo Location information to identify a cell of a base station or a particular geographical area - * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu unicast - * @member notificationType Shall be set to "ProvChgUuUniNotification" - * @member timeStamp_ Time stamp - * @member v2xApplicationServer V2X Application Server address (consisting of IP address and UDP port) for unicast - * @see MEC030 Clause 6.4.2 Type: ProvChgUuUniNotification - */ - type record ProvChgUuUniNotification { - LocationInfo locationInfo, - UuUniNeighbourCellInfoList neighbourCellInfo optional, - Json.String notificationType, - TimeStamp timeStamp optional, - V2xApplicationServer v2xApplicationServer optional - } - - /** - * @desc List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response + * @desc List of filtering criteria for the subscription * @member locationInfo Location information to identify a cell of a base station or a particular geographical area + * @member v2xServerUsd User Service Description for V2X Application Server is used to configure the UE for receiving local V2X Application Server information when it is provided over MBMS * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS - * @member v2xApplicationServer V2X Application Server address (consisting of IP address and UDP port) for unicast - * @see MEC030 Clause 6.3.3 Type: ProvChgUuMbmsSubscription + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.3-1: Attributes of the ProvChgUuMbmsSubscription */ - type record ProvChgUuUniSubscriptionFilterCriteria { + type record ProvChgUuMbmsSubscriptionFilterCriteria { LocationInfo locationInfo, - UuMbmsNeighbourCellInfoList neighbourCellInfo optional, - V2xApplicationServer v2xApplicationServer + V2xServerUsd v2xServerUsd, + UuMbmsNeighbourCellInfoList neighbourCellInfo optional } /** - * @desc Subscription to the notifications from VIS about the provisioning information changes for V2X communication over Uu unicast - * @member links URI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response - * @member callbackReferenceURI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response - * @member expiryDeadline Time stamp + * @desc Subscription to the notifications from VIS about the provisioning information changes for V2X communication over PC5 + * @member subscriptionType Shall be set to "ProvChgPc5Subscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource * @member filterCriteria List of filtering criteria for the subscription - * @member subscriptionType Shall be set to "ProvChgUuUniSubscription" - * @see MEC030 Clause 6.3.2 Type: ProvChgUuUniSubscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.4-1: Attributes of the ProvChgPc5Subscription */ - type record ProvChgUuUniSubscription { - LinkType links optional, - Json.AnyURI callbackReference, - TimeStamp expiryDeadline optional, - ProvChgUuUniSubscriptionFilterCriteria filterCriteria, - Json.String subscriptionType + type record ProvChgPc5Subscription { + Json.String subscriptionType, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteria filterCriteria, + TimeStamp expiryDeadline optional } with { variant (links) "name as '_links'"; } /** - * @desc The service consumers subscriptions - * @member href The URI referring to the subscription - * @member subscriptionType Type of the subscription. The values are as defined in the \"subscriptionType\" attribute for each different V2X information event subscription data type - * @see MEC030 Clause 6.3.6 Type: SubscriptionLinkList + * @desc List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response + * @member locationInfo Location information to identify a cell of a base station or a particular geographical area + * @member dstLayer2Id For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID + * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5 + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 6.3.4 Type: ProvChgPc5Subscription */ - type record SubscriptionsLink_ { - Json.AnyURI href, - Json.String subscriptionType + type record FilterCriteria { + LocationInfo locationInfo, + Json.String dstLayer2Id, + Pc5NeighbourCellInfoList neighbourCellInfo optional } - type record of SubscriptionsLink_ SubscriptionLinkList_; /** - * @desc List of hyperlinks related to the resource - * @member self_ URI of this resource - * @member subscriptions The service consumer’s subscriptions - * @see MEC030 Clause 6.3.6 Type: SubscriptionLinkList + * @desc Subscription to notification of V2X message + * @member subscriptionType Shall be set to "V2xMsgSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteria List of filtering criteria for the subscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.5-1: Attributes of the V2xMsgSubscription */ - type record SubscriptionLinkList { - LinkType self_, - SubscriptionLinkList_ subscriptions + type record V2xMsgSubscription { + Json.String subscriptionType, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + V2xMsgFilterCriteria filterCriteria, + TimeStamp expiryDeadline optional } with { - variant (self_) "name as 'self'"; + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a subscription to notification of predicted QoS information + * @member subscriptionType Shall be set to "PredQosSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteria List of filtering criteria for the subscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.6-1: Attributes of the PredQosSubscription + */ + type record PredQosSubscription { + Json.String subscriptionType, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + QosPredFilterCriteria filterCriteria, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a list of links related to currently existing subscriptions for the service consumer + * @member links Hyperlink related to the resource + * @member subscription The service consumer's subscriptions + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.7-1: Attributes of the SubscriptionLinkList + */ + type record SubscriptionLinkList { + SubscriptionLinks links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Hyperlink related to the resource + * @member self_ URI of this resource. + * @member subscription The service consumer's subscriptions + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.7-1: Attributes of the SubscriptionLinkList + */ + type record SubscriptionLinks { + LinkType self_, + SubscriptionList subscription optional + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc A link to a subscription + * @member href The URI referring to the subscription. + * @member subscriptionType Type of subscription + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.7-1: Attributes of the SubscriptionLinkList + */ + type record Subscription_ { + Json.AnyURI href, + Json.String subscriptionType + } + type record of Subscription_ SubscriptionList; + + /** + * @desc Notification from VIS with regards to the provisioning information changes for V2X communication over Uu unicast + * @member notificationType Shall be set to "ProvChgUuUniNotification" + * @member timeStamp_ Time stamp + * @member locationInfo Location information to identify a cell of a base station or a particular geographical area + * @member v2xApplicationServer V2X Application Server address (consisting of IP address and UDP port) for unicast + * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu unicast + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.4.2-1: Attributes of the ProvChgUuUniNotification + */ + type record ProvChgUuUniNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + LocationInfo locationInfo, + V2xApplicationServer v2xApplicationServer optional, + UuUniNeighbourCellInfoList neighbourCellInfo optional + } + + /** + * @desc Notification from VIS with regards to the provisioning information changes for V2X communication over Uu MBMS + * @member notificationType Shall be set to "ProvChgUuMbmsNotification" + * @member timeStamp_ Time stamp + * @member locationInfo Location information to identify a cell of a base station or a particular geographical area + * @member v2xServerUsd User Service Description for V2X Application Server is used to configure the UE for receiving local V2X Application Server information when it is provided over MBMS + * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.4.3-1: Attributes of the ProvChgUuMbmsNotification + */ + type record ProvChgUuMbmsNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + LocationInfo locationInfo, + V2xServerUsd v2xServerUsd optional, + UuMbmsNeighbourCellInfoList neighbourCellInfo optional + } + + /** + * @desc Notification from VIS with regards to the provisioning information changes for V2X communication over PC5 + * @member notificationType Shall be set to "ProvChgPc5Notification" + * @member timeStamp_ Time stamp + * @member locationInfo Location information to identify a cell of a base station or a particular geographical area + * @member dstLayer2Id For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID + * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5 + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.4.4-1: Attributes of the ProvChgPc5Notification + */ + type record ProvChgPc5Notification { + Json.String notificationType, + TimeStamp timeStamp optional, + LocationInfo locationInfo, + Json.String dstLayer2Id optional, + Pc5NeighbourCellInfoList neighbourCellInfo optional + } + + /** + * @desc Notification for informing the subscribers about the V2X message + * @member notificationType Shall be set to "V2xMsgNotification" + * @member timeStamp Time stamp + * @member msgPropertiesValues List of message properties that is associated to the V2X message + * @member msgRepresentationFormat The representation format of the binary V2X message, for example base64 or hexadecimal representation + * @member msgContent Published V2X message content. The format of the string is defined by the standardization organization + * @member links Link to resources related to this notification + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.4.5-1: Attributes of the V2xMsgNotification + */ + type record V2xMsgNotification { + Json.String notificationType, + TimeStamp timeStamp, + V2xMsgPropertiesValues msgPropertiesValues, + Json.String msgRepresentationFormat, + Json.String msgContent, + Links_Notification links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Link to resources related to this notification + * @member subscription A link to the related subscription + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.4.5-1: Attributes of the V2xMsgNotification + */ + type record Links_Notification { + LinkType subscription + } + + /** + * @desc This type represents a notification from RNIS with regards to expiry of the existing subscription + * @member notificationType Shall be set to "TestNotification" + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.4.6-1: Attributes of the TestNotification + */ + type record TestNotification { + Json.String notificationType, + Links_Notification links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Time stamp description + * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.2-1: Attributes of the TimeStamp + */ + type record TimeStamp { + Seconds seconds, + NanoSeconds nanoSeconds + } + + /** + * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.2-1: Attributes of the TimeStamp + */ + type Json.UInteger Seconds; + + /** + * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.2-1: Attributes of the TimeStamp + */ + type Json.UInteger NanoSeconds; + + /** + * @desc Location information + * @member ecgi E-UTRAN CelI Global Identifier of the serving cell + * @member geoArea Information of a geographical area + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.3-1: Attributes of the LocationInfo + */ + type record LocationInfo { + Ecgi ecgi, + LocationInfoGeoArea geoArea optional + } + type record of LocationInfo LocationInfoList; + + /** + * @desc Information of a geographical area + * @member latitude Latitude (DATUM = WGS84) -90 to 90 in decimal degree format DDD.ddd + * @member longitude Longitude (DATUM = WGS84)-180 to 180 in decimal degree format DDD.ddd + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.3-1: Attributes of the LocationInfo + */ + type record LocationInfoGeoArea { + Json.Number latitude, + Json.Number longitude + } + + /** + * @desc PLMN Identity + * @member mcc The Mobile Country Code part of PLMN Identity + * @member mnc The Mobile Network Code part of PLMN Identity + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.4-1: Attributes of the Plmn + */ + type record Plmn { + Json.String mcc, + Json.String mnc + } + + /** + * @desc E-UTRAN Cell Global Identifier + * @member plmn Public Land Mobile Network Identity + * @member cellId The E-UTRAN Cell Identity + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.5-1: Attributes of the Ecgi + */ + type record Ecgi { + Plmn plmn, + CellId cellId + } + + /** + * @desc E-UTRAN Cell Identity as a bit string (size (28)) + * @see ETSI TS 136 413 + */ + type record CellId { + Json.String cellId + } + + /** + * @desc FDD information + * @member ulEarfcn Uplink E-UTRA Absolute Radio Frequency Channel Number + * @member dlEarfcn Downlink E-UTRA Absolute Radio Frequency Channel Number + * @member ulTransmissionBandwidth Uplink Transmission Bandwidth + * @member dlTransmissionBandwidth Downlink Transmission Bandwidth + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.6-1: Attributes of the FddInfo + */ + type record FddInfo { + Earfcn ulEarfcn, + Earfcn dlEarfcn, + TransmissionBandwidth ulTransmissionBandwidth, + TransmissionBandwidth dlTransmissionBandwidth + } + + /** + * @desc E-UTRA Absolute Radio Frequency Channel Number, range (0... 65535) + * @see ETSI TS 136 413 + */ + type Json.UInt16 Earfcn; + + /** + * @desc Transmission Bandwidth, which is used to indicate the UL or DL transmission bandwidth expressed in units of resource blocks + * @see ETSI TS 136 413 + */ + type enumerated TransmissionBandwidth { + bw6 (1), + bw15 (2), + bw25 (3), + bw50 (4), + bw75 (6), + bw100 (7) + } with { + variant "JSON: as number" } /** * @desc TDD information * @member earfcn E-UTRA Absolute Radio Frequency Channel Number - * @member subframeAssignment Uplink-downlink subframe configuration information * @member transmissionBandwidth Transmission Bandwidth - * @see MEC030 Clause 6.5.7 Type: TddInfo + * @member subframeAssignment Uplink-downlink subframe configuration information + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.7-1: Attributes of the TddInfo */ type record TddInfo { Earfcn earfcn, - Json.String subframeAssignment, - TransmissionBandwidth transmissionBandwidth + TransmissionBandwidth transmissionBandwidth, + Json.String subframeAssignment } /** - * @desc Neighbour cell information in a visiting PLMN that supports V2X communication over Uu MBMS + * @desc V2X Application Server address (consisting of IP address and UDP port) for unicast + * @member ipAddress + * @member udpPort + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.8-1: Attributes of the V2xApplicationServer + */ + type record V2xApplicationServer { + Json.String ipAddress, + Json.String udpPort + } + + /** + * @desc Neighbour cell information in a visiting PLMN that supports V2X communication over Uu unicast + * @member plmn Public Land Mobile Network Identity * @member ecgi E-UTRAN CelI Global Identifier - * @member fddInfo Information for FDD operation - * @member mbmsServiceAreaIdentity Supported MBMS Service Area Identities in the cell * @member pci Physical Cell Identifier - * @member plmn Public Land Mobile Network Identity + * @member fddInfo Information for FDD operation * @member tddInfo Information for TDD operation - * @see MEC030 Clause 6.5.11 Type: UuMbmsNeighbourCellInfo + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.9-1: Attributes of the UuUniNeighbourCellInfo */ - type record UuMbmsNeighbourCellInfo { - Ecgi ecgi, - FddInfo fddInfo, - MbmsServiceAreaIdentityList mbmsServiceAreaIdentity, - integer pci, - Plmn plmn, - TddInfo tddInfo + type record UuUniNeighbourCellInfo { + Plmn plmn, + Ecgi ecgi, + Json.Integer pci, + FddInfo fddInfo, + TddInfo tddInfo } - type record of Json.String MbmsServiceAreaIdentityList; - type record of UuMbmsNeighbourCellInfo UuMbmsNeighbourCellInfoList; + type record of UuUniNeighbourCellInfo UuUniNeighbourCellInfoList; /** - * @desc The provisioning information per location - * @member locationInfo Location information to identify a cell of a base station or a particular geographical area - * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS + * @desc Temporary Mobile Group Identity (TMGI), which is used within MBMS to uniquely identify Multicast and Broadcast bearer services + * @member tmgi Temporary Mobile Group Identity (TMGI), which is used within MBMS to uniquely identify Multicast and Broadcast bearer services + * @member serviceAreaIdentifier A list of service area identifier for the applicable MBMS broadcast area + * @member sdpInfo SDP with IP multicast address and port number used for V2X communication via MBMS + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.10-1: Attributes of the V2xServerUsd */ - type record ProInfoUuMbms { - LocationInfo locationInfo, - UuMbmsNeighbourCellInfoList neighbourCellInfo optional, - V2xServerUsd v2xServerUsd + type record V2xServerUsd { + Tmgi tmgi, + ServiceAreaIdentifier serviceAreaIdentifier, + SdpInfo sdpInfo } - type record of ProInfoUuMbms ProInfoUuMbmsList; /** - * @desc Provisioning information required for V2X communication over Uu MBMS - * @member proInfoUuMbms The provisioning information per location as defined below - * @member timeStamp_ TimeStamp - * @see MEC030 Clause 6.2.3 Type: UuMbmsProvisioningInfo + * @desc Temporary Mobile Group Identity (TMGI), which is used within MBMS to uniquely identify Multicast and Broadcast bearer services + * @member mbmsServiceId MBMS Service ID consisting of three octets + * @member mcc The Mobile Country Code part of PLMN Identity + * @member mnc The Mobile Network Code part of PLMN Identity + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.10-1: Attributes of the V2xServerUsd */ - type record UuMbmsProvisioningInfo { - ProInfoUuMbmsList proInfoUuMbms, - TimeStamp timeStamp optional + type record Tmgi { + Json.String mbmsServiceId, + Json.String mcc, + Json.String mnc } + type record of Json.String ServiceAreaIdentifier; + /** - * @desc Neighbour cell information in a visiting PLMN that supports V2X communication over Uu unicast + * @desc SDP with IP multicast address and port number used for V2X communication via MBMS + * @member ipMulticastAddress + * @member portNumber + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.10-1: Attributes of the V2xServerUsd + */ + type record SdpInfo { + Json.String ipMulticastAddress, + Json.String portNumber + } + type record of SdpInfo SdpInfoList; + + /** + * @desc Neighbour cell information in a visiting PLMN that supports V2X communication over Uu MBMS + * @member plmn Public Land Mobile Network Identity * @member ecgi E-UTRAN CelI Global Identifier - * @member fddInfo Information for FDD operation * @member pci Physical Cell Identifier - * @member plmn Public Land Mobile Network Identity + * @member fddInfo Information for FDD operation * @member tddInfo Information for TDD operation - * @see MEC030 Clause 6.5.9 Type: UuUniNeighbourCellInfo + * @member mbmsServiceAreaIdentity Supported MBMS Service Area Identities in the cell + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 6.5.11 Type: UuMbmsNeighbourCellInfo */ - type record UuUniNeighbourCellInfo { - Ecgi ecgi, - FddInfo fddInfo, - integer pci, - Plmn plmn, - TddInfo tddInfo + type record UuMbmsNeighbourCellInfo { + Plmn plmn, + Ecgi ecgi, + Json.Integer pci, + FddInfo fddInfo, + TddInfo tddInfo, + MbmsServiceAreaIdentityList mbmsServiceAreaIdentity } - type record of UuUniNeighbourCellInfo UuUniNeighbourCellInfoList; + type record of Json.String MbmsServiceAreaIdentityList; + type record of UuMbmsNeighbourCellInfo UuMbmsNeighbourCellInfoList; /** - * @desc The provisioning information per location as defined below - * @member locationInfo Location information to identify a cell of a base station or a particular geographical area - * @member neighbourCellInfoThe information of the neighbour cells in a visiting PLMN that support V2X communication over Uu unicast - * @member v2xApplicationServer V2X Application Server address (consisting of IP address and UDP port) for unicast - * @see MEC030 Clause 6.2.2 Type: UuUnicastProvisioningInfo + * @desc Location information + * @member ecgi E-UTRAN CelI Global Identifier + * @member plmn Public Land Mobile Network Identity + * @member siV2xConfig V2X sidelink communication configuration, as defined in ETSI TS 136 331 + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.12-1: Attributes of the Pc5NeighbourCellInfo */ - type record ProInfoUuUnicast { - LocationInfo locationInfo, - V2xApplicationServer v2xApplicationServer, - UuUniNeighbourCellInfoList neighbourCellInfo optional + type record Pc5NeighbourCellInfo { + Plmn plmn, + Ecgi ecgi, + SystemInformationBlockType21 siV2xConfig } - type record of ProInfoUuUnicast ProInfoUuUnicastList; + type record of Pc5NeighbourCellInfo Pc5NeighbourCellInfoList; + + type Json.String SystemInformationBlockType21; // FIXME Not defined anywhere in ETSI GS MEC 030 V3.1.1 and previous versions /** - * @desc Provisioning information required for V2X communication over Uu unicast - * @member proInfoUuUnicast The provisioning information per location - * @member timeStamp_ Time stamp - * @see MEC030 Clause 6.2.2 Type: UuUnicastProvisioningInfo + * @desc This type represents a type of link + * @member self_ URI referring to a resource + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.13-1: Attributes of the LinkType */ - type record UuUnicastProvisioningInfo { - ProInfoUuUnicastList proInfoUuUnicast, - TimeStamp timeStamp optional + type record LinkType { + Json.AnyURI href } /** - * @desc V2X Application Server address (consisting of IP address and UDP port) for unicast - * @member ipAddress - * @member udpPort - * @see MEC030 Clause 6.5.8 Type: V2xApplicationServer + * @desc This type represents the properties that can be associated to a V2X message when it is published, or a notification in relation to the V2X message is issued + * @member stdOrganization Standardization organization which defines the published V2X + * @member msgType Published V2X message type. Its value is defined by the standardization organization indicated by the attribute stdOrganization + * @member msgProtocolVersion Protocol version of the V2X message (0..255) + * @member locationInfo Location information to identify a cell of a base station or a particular geographical area to which the V2X message can be associated + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.14-1: Attributes of the V2xMsgPropertiesValues */ - type record V2xApplicationServer { - Json.String ipAddress, - Json.String udpPort + type record V2xMsgPropertiesValues { + StdOrganization stdOrganization, + MsgType msgType, + Json.Integer msgProtocolVersion, + LocationInfo locationInfo + } + + /** + * @desc Standardization organization which defines the published V2X message type + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.14-1: Attributes of the V2xMsgPropertiesValues + */ + type enumerated StdOrganization { + ETSI } /** * @desc Published V2X message type. Its value is defined by the standardization organization + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.14-1: Attributes of the V2xMsgPropertiesValues */ type enumerated MsgType { denm (1), @@ -511,127 +789,87 @@ module V2XInformationServiceAPI_TypesAndValues { type record of MsgType MsgTypeList; /** - * @desc Standardization organization which defines the published V2X message type - */ - type enumerated StdOrganization { - ETSI - } - - /** - * @desc V2X message that a service consumer publishes to VIS - * @member msgContent Published V2X message content. Its format is defined by the standardization organization indicated by the attribute stdOrganization - * @member msgEncodeFormat The encode format of the V2X message, for example base64 + * @desc This type represents the filter criteria that can be used when performing a subscription to notification of V2X messages + * @member stdOrganization Standardization organization which defines the published V2X * @member msgType Published V2X message type. Its value is defined by the standardization organization indicated by the attribute stdOrganization - * @member stdOrganization Standardization organization which defines the published V2X message type - * @see MEC030 Clause 6.2.6 Type: V2xMsgPublication + * @member msgProtocolVersion Protocol version of the V2X message (0..255) + * @member locationInfo Location information to identify a cell of a base station or a particular geographical area to which the V2X message can be associated + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.15-1: Attributes of the V2xMsgFilterCriteria */ - type record V2xMsgPublication { - Json.String msgContent, - Json.String msgEncodeFormat, - MsgType msgType, - StdOrganization stdOrganization + type record V2xMsgFilterCriteria { + StdOrganization stdOrganization, + MsgTypeList msgType optional, + MsgProtocolVersionList msgProtocolVersion optional, + LocationInfoList locationInfo optional } + type record of Json.Integer MsgProtocolVersionList; /** - * @desc List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response - * @member msgType Subscribed V2X message type. Its value is defined by the standardization organization indicated by the attribute stdOrganization - * @member stdOrganization Standardization organization which defines the published V2X message type - * @see MEC030 Clause 6.3.5 Type: V2xMsgSubscription - */ - type record V2xMsgSubscriptionFilterCriteria { - MsgTypeList msgType optional, - StdOrganization stdOrganization - } - -/** - * @desc Subscription to notification of V2X message - * @member links Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests - * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed V2X message. This shall be included both in the request and in response - * @member expiryDeadline Time stamp - * @member filterCriteria List of filtering criteria for the subscription - * @member subscriptionType Shall be set to "V2xMsgSubscription" - * @see MEC030 Clause 6.3.5 Type: V2xMsgSubscription + * @desc This type represents the information about a V2X Message Distribution Server that can be exchanged between a service consumer (e.g. a MEC application) and the VIS + * @member infoProtocol Specifics of the application layer protocol of V2X Message Distribution Server + * @member infoConnection Connection information of the V2X Message Distribution Server the service consumer can use for direct connection + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.16-1: Attributes of the V2xMsgDistributionServer */ - type record V2xMsgSubscription { - LinkType links optional, - Json.AnyURI callbackReference, - TimeStamp expiryDeadline optional, - V2xMsgSubscriptionFilterCriteria filterCriteria, - Json.String subscriptionType - } with { - variant (links) "name as '_links'"; + type record V2xMsgDistributionServer { + InfoProtocol infoProtocol, + InfoConnection infoConnection optional } /** - * @desc Link to resources related to this notification - * @member subscription Self-referring URI. The URI shall be unique within the VIS API as it acts as an ID for the subscription - * @see MEC030 Clause 6.4.5 Type: V2xMsgNotification + * @desc Specifics of the application layer protocol of V2X Message Distribution Server + * @member msgProtocol Numerical value corresponding to the application layer protocol supported by the service consumer + * @member Implementation specifics of application layer protocol, e.g. programming language + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.16-1: Attributes of the V2xMsgDistributionServer */ - type record V2xMsgNotificationLinks { - LinkType subscription + type record InfoProtocol { + MsgProtocol msgProtocol, + Json.String protImplementation } /** - * @desc Notification for informing the subscribers about the V2X message - * @member notificationType Shall be set to "V2xMsgNotification" - * @member timeStamp_ Time stamp - * @member stdOrganization Standardization organization which defines the published V2X message type ETSI: European Telecommunications Standards Institute - * @member msgType Published V2X message type. Its value is defined by the standardization organization - * @member msgEncodeFormat The encode format of the V2X message, for example base64 - * @member msgContent Published V2X message content. The format of the string is defined by the standardization organization - * @member links Link to resources related to this notification - * @see MEC030 Clause 6.4.5 Type: V2xMsgNotification + * @desc Numerical value corresponding to the application layer protocol supported by the service consumer + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.16-1: Attributes of the V2xMsgDistributionServer */ - type record V2xMsgNotification { - Json.String notificationType, - TimeStamp timeStamp, - StdOrganization stdOrganization, - MsgType msgType, - Json.String msgEncodeFormat, - Json.String msgContent, - V2xMsgNotificationLinks links + type enumerated MsgProtocol { + MQTT_v3_1_0 (0), + MQTT_v3_1_1 (1), + MQTT_v5 (2), + MQTT_SN (3), + AMQP_1_0 (4) } with { - variant (links) "name as '_links'"; + variant "JSON: as number" } /** - * @desc SDP with IP multicast address and port number used for V2X communication via MBMS - * @member ipMulticastAddress - * @member portNumber - * @see MEC030 Clause 6.5.10 Type: V2xServerUsd + * @desc Connection information of the V2X Message Distribution Server the service consumer can use for direct connection + * @member ipAddress IP address of the V2X Message Distribution Server + * @member port_number Port number of the V2X Message Distribution Server + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.16-1: Attributes of the V2xMsgDistributionServer */ - type record SdpInfo { - Json.String ipMulticastAddress, - Json.String portNumber + type record InfoConnection { + Json.String ipAddress, + Json.UInt16 port_number } - type record of SdpInfo SdpInfoList; /** - * @desc Temporary Mobile Group Identity (TMGI), which is used within MBMS to uniquely identify Multicast and Broadcast bearer services - * @member mbmsServiceId MBMS Service ID consisting of three octets - * @member mcc The Mobile Country Code part of PLMN Identity - * @member mnc The Mobile Network Code part of PLMN Identity - * @see MEC030 Clause 6.5.10 Type: V2xServerUsd + * @desc This type represents the filter criteria that can be used when performing a subscription to notification of QoS prediction messages + * @member streamId The predicted QoS at the related time and vehicular UE location is provided for a specific data stream. In case of 3GPP network, this is mapped to a QoS flow + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.17-1: Attributes of the QosPredFilterCriteria */ - type record Tmgi { - Json.String mbmsServiceId, - Json.String mcc, - Json.String mnc + type record QosPredFilterCriteria { + Json.String streamId } /** - * @desc Temporary Mobile Group Identity (TMGI), which is used within MBMS to uniquely identify Multicast and Broadcast bearer services - * @member serviceAreaIdentifier A list of service area identifier for the applicable MBMS broadcast area - * @member sdpInfo SDP with IP multicast address and port number used for V2X communication via MBMS - * @member tmgi Temporary Mobile Group Identity (TMGI), which is used within MBMS to uniquely identify Multicast and Broadcast bearer services - * @see MEC030 Clause 6.5.10 Type: V2xServerUsd + * @desc This type represents configuration for the delivery of subscription notifications over Websockets + * @member websocketUri Set by location server to indicate to the service consumer the Websocket URI to be used for delivering notifications + * @member requestWebsocketUri Set to true by the service consumer to indicate that Websocket delivery is requested + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.18-1: Attributes of the WebsockNotifConfig */ - type record V2xServerUsd { - ServiceAreaIdentifier serviceAreaIdentifier, - SdpInfo sdpInfo, - Tmgi tmgi + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional } - type record of Json.String ServiceAreaIdentifier; } with { encode "JSON" -- GitLab From d5569a578ce35a7a642814189bf8b71b6358285d Mon Sep 17 00:00:00 2001 From: garciay Date: Thu, 6 Jul 2023 18:14:33 +0200 Subject: [PATCH 15/58] Add install.sh script; Change virtualization/docker-dev/Dockerfile.stfubuntu file --- install.sh | 24 + .../LibCommon_BasicTypesAndValues.ttcn | 247 --- .../LibCommon_Sync.ttcn | 1359 ----------------- ttcn/patch_lib_common_titan/module.mk | 8 +- .../ttcn/LibCommon_BasicTypesAndValues.ttcn | 64 +- .../{ => ttcn}/LibCommon_DataStrings.ttcn | 0 .../ttcn/LibCommon_Sync.ttcn | 4 +- .../docker-dev/Dockerfile.stfubuntu | 31 +- 8 files changed, 67 insertions(+), 1670 deletions(-) create mode 100755 install.sh delete mode 100644 ttcn/patch_lib_common_titan/LibCommon_BasicTypesAndValues.ttcn delete mode 100644 ttcn/patch_lib_common_titan/LibCommon_Sync.ttcn rename ttcn/patch_lib_common_titan/{ => ttcn}/LibCommon_DataStrings.ttcn (100%) diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..98a0865 --- /dev/null +++ b/install.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +#set -e +set -vx + +BASE_PATH=`pwd` + +git submodule update --init --recursive --remote + +if [ ! -f ./titan-test-system-framework ] +then + git clone --recurse-submodules --single-branch --branch devel https://labs.etsi.org/rep/cti-tools/titan-test-system-framework.git + cd ./titan-test-system-framework +else + cd ./titan-test-system-framework + git checkout devel +fi +cd ./ttcn/LibHttp +ln -f module_mec.mk module.mk + +cd $BASE_PATH +ln -f ./ttcn/patch_lib_common_titan/module.mk ./ttcn/LibCommon/ + +exit 0 diff --git a/ttcn/patch_lib_common_titan/LibCommon_BasicTypesAndValues.ttcn b/ttcn/patch_lib_common_titan/LibCommon_BasicTypesAndValues.ttcn deleted file mode 100644 index 9b5477d..0000000 --- a/ttcn/patch_lib_common_titan/LibCommon_BasicTypesAndValues.ttcn +++ /dev/null @@ -1,247 +0,0 @@ -/** - * @author ETSI - * @version $URL$ - * $Id$ - * @desc A collection of basic type and value definitions which may be - * useful in the implementation of any TTCN-3 test suite.

- * @remark End users should be aware that any changes made to the in - * definitions this module may be overwritten in future releases. - * End users are encouraged to contact the distributers of this - * module regarding their modifications or additions so that future - * updates will include your changes. - * @copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * - */ - module LibCommon_BasicTypesAndValues { - - /** - * @remark Number in subtype name always indicates encoding length - * in _bits_ - */ - group unsignedIntegerDefintions { - - const integer c_uInt1Max := 1; - const integer c_uInt2Max := 3; - const integer c_uInt3Max := 7; - const integer c_uInt4Max := 15; - const integer c_uInt5Max := 31; - const integer c_uInt6Max := 63; - const integer c_uInt7Max := 127; - const integer c_uInt8Max := 255; - const integer c_uInt9Max := 511; - const integer c_uInt10Max := 1023; - const integer c_uInt11Max := 2047; - const integer c_uInt12Max := 4095; - const integer c_uInt13Max := 8191; - const integer c_uInt14Max := 16383; - const integer c_uInt15Max := 32767; - const integer c_uInt16Max := 65535; - const integer c_uInt17Max := 131071; - const integer c_uInt18Max := 262143; - const integer c_uInt19Max := 524287; - const integer c_uInt20Max := 1048575; - const integer c_uInt21Max := 2097151; - const integer c_uInt22Max := 4194303; - const integer c_uInt23Max := 8388607; - const integer c_uInt24Max := 16777215; - const integer c_uInt25Max := 33554431; - const integer c_uInt26Max := 67108863; - const integer c_uInt27Max := 134217727; - const integer c_uInt28Max := 268435456; - const integer c_uInt29Max := 536870911; - const integer c_uInt30Max := 1073741823; - const integer c_uInt31Max := 2147483647; - const integer c_uInt32Max := 4294967295; - const integer c_uInt36Max := 68719476735; - const integer c_uInt48Max := 281474976710655; - const integer c_uInt52Max := 4503599627370495; - const integer c_uInt64Max := 18446744073709551615; - - type integer UInt (0 .. infinity); - type integer UInt1 (0 .. c_uInt1Max) with {variant "unsigned 1 bit"}; - type integer UInt2 (0 .. c_uInt2Max) with {variant "unsigned 2 bit"}; - type integer UInt3 (0 .. c_uInt3Max) with {variant "unsigned 3 bit"}; - type integer UInt4 (0 .. c_uInt4Max) with {variant "unsigned 4 bit"}; - type integer UInt5 (0 .. c_uInt5Max) with {variant "unsigned 5 bit"}; - type integer UInt6 (0 .. c_uInt6Max) with {variant "unsigned 6 bit"}; - type integer UInt7 (0 .. c_uInt7Max) with {variant "unsigned 7 bit"}; - type integer UInt8 (0 .. c_uInt8Max) with {variant "unsigned 8 bit"}; - type integer UInt9 (0 .. c_uInt9Max) with {variant "unsigned 9 bit"}; - type integer UInt10 (0 .. c_uInt10Max) with {variant "unsigned 10 bit"}; - type integer UInt11 (0 .. c_uInt11Max) with {variant "unsigned 11 bit"}; - type integer UInt12 (0 .. c_uInt12Max) with {variant "unsigned 12 bit"}; - type integer UInt13 (0 .. c_uInt13Max) with {variant "unsigned 13 bit"}; - type integer UInt14 (0 .. c_uInt14Max) with {variant "unsigned 14 bit"}; - type integer UInt15 (0 .. c_uInt15Max) with {variant "unsigned 15 bit"}; - type integer UInt16 (0 .. c_uInt16Max) with {variant "unsigned 16 bit"}; - type integer UInt17 (0 .. c_uInt17Max) with {variant "unsigned 17 bit"}; - type integer UInt18 (0 .. c_uInt18Max) with {variant "unsigned 18 bit"}; - type integer UInt19 (0 .. c_uInt19Max) with {variant "unsigned 19 bit"}; - type integer UInt20 (0 .. c_uInt20Max) with {variant "unsigned 20 bit"}; - type integer UInt21 (0 .. c_uInt21Max) with {variant "unsigned 21 bit"}; - type integer UInt22 (0 .. c_uInt22Max) with {variant "unsigned 22 bit"}; - type integer UInt23 (0 .. c_uInt23Max) with {variant "unsigned 23 bit"}; - type integer UInt24 (0 .. c_uInt24Max) with {variant "unsigned 24 bit"}; - type integer UInt25 (0 .. c_uInt25Max) with {variant "unsigned 25 bit"}; - type integer UInt26 (0 .. c_uInt26Max) with {variant "unsigned 26 bit"}; - type integer UInt27 (0 .. c_uInt27Max) with {variant "unsigned 27 bit"}; - type integer UInt28 (0 .. c_uInt28Max) with {variant "unsigned 28 bit"}; - type integer UInt29 (0 .. c_uInt29Max) with {variant "unsigned 29 bit"}; - type integer UInt30 (0 .. c_uInt30Max) with {variant "unsigned 30 bit"}; - type integer UInt31 (0 .. c_uInt31Max) with {variant "unsigned 31 bit"}; - type integer UInt32 (0 .. c_uInt32Max) with {variant "unsigned 32 bit"}; - type integer UInt36 (0 .. c_uInt36Max) with {variant "unsigned 36 bit"}; - type integer UInt48 (0 .. c_uInt48Max) with {variant "unsigned 48 bit"}; - type integer UInt52 (0 .. c_uInt52Max) with {variant "unsigned 52 bit"}; - type integer UInt64 (0 .. c_uInt64Max) with {variant "unsigned 64 bit"}; - - } // end group unsignedIntegerDefintions - - /** - * @remark Number in subtype name always indicates encoding length - * in _bits_ - */ - group signedIntegerDefintions { - - const integer c_int1Min := -1; - const integer c_int1Max := 0; - const integer c_int2Min := -2; - const integer c_int2Max := 1; - const integer c_int3Min := -4; - const integer c_int3Max := 3; - const integer c_int4Min := -8; - const integer c_int4Max := 7; - const integer c_int5Min := -16; - const integer c_int5Max := 15; - const integer c_int6Min := -32; - const integer c_int6Max := 31; - const integer c_int7Min := -64; - const integer c_int7Max := 63; - const integer c_int8Min := -128; - const integer c_int8Max := 127; - const integer c_int9Min := -256; - const integer c_int9Max := 255; - const integer c_int10Min := -512; - const integer c_int10Max := 511; - const integer c_int11Min := -1024; - const integer c_int11Max := 1023; - const integer c_int12Min := -2048; - const integer c_int12Max := 2047; - const integer c_int13Min := -4096; - const integer c_int13Max := 4095; - const integer c_int14Min := -8192; - const integer c_int14Max := 8191; - const integer c_int15Min := -16384; - const integer c_int15Max := 16383; - const integer c_int16Min := -32768; - const integer c_int16Max := 32767; - const integer c_int17Min := -65536; - const integer c_int17Max := 65535; - const integer c_int18Min := -131072; - const integer c_int18Max := 131071; - const integer c_int19Min := -262144; - const integer c_int19Max := 262143; - const integer c_int20Min := -524288; - const integer c_int20Max := 524287; - const integer c_int21Min := -1048576; - const integer c_int21Max := 1048575; - const integer c_int22Min := -2097152; - const integer c_int22Max := 2097151; - const integer c_int23Min := -4194304; - const integer c_int23Max := 4194303; - const integer c_int24Min := -8388608; - const integer c_int24Max := 8388607; - const integer c_int25Min := -16777216; - const integer c_int25Max := 16777215; - const integer c_int26Min := -33554432; - const integer c_int26Max := 33554431; - const integer c_int27Min := -67108864; - const integer c_int27Max := 67108863; - const integer c_int28Min := -134217728; - const integer c_int28Max := 134217727; - const integer c_int29Min := -268435456; - const integer c_int29Max := 268435456; - const integer c_int30Min := -536870912; - const integer c_int30Max := 536870911; - const integer c_int31Min := -1073741824; - const integer c_int31Max := 1073741823; - const integer c_int32Min := -2147483648; - const integer c_int32Max := 2147483647; - - type integer Int; - type integer Int1 (c_int1Min .. c_int1Max) with { variant "1 bit"}; - type integer Int2 (c_int2Min .. c_int2Max) with { variant "2 bit"}; - type integer Int3 (c_int3Min .. c_int3Max) with { variant "3 bit"}; - type integer Int4 (c_int4Min .. c_int4Max) with { variant "4 bit"}; - type integer Int5 (c_int5Min .. c_int5Max) with { variant "5 bit"}; - type integer Int6 (c_int6Min .. c_int6Max) with { variant "6 bit"}; - type integer Int7 (c_int7Min .. c_int7Max) with { variant "7 bit"}; - type integer Int8 (c_int8Min .. c_int8Max) with { variant "8 bit"}; - type integer Int9 (c_int9Min .. c_int9Max) with { variant "9 bit"}; - type integer Int10 (c_int10Min .. c_int10Max) with { variant "10 bit"}; - type integer Int11 (c_int11Min .. c_int11Max) with { variant "11 bit"}; - type integer Int12 (c_int12Min .. c_int12Max) with { variant "12 bit"}; - type integer Int13 (c_int13Min .. c_int13Max) with { variant "13 bit"}; - type integer Int14 (c_int14Min .. c_int14Max) with { variant "14 bit"}; - type integer Int15 (c_int15Min .. c_int15Max) with { variant "15 bit"}; - type integer Int16 (c_int16Min .. c_int16Max) with { variant "16 bit"}; - type integer Int17 (c_int17Min .. c_int17Max) with { variant "17 bit"}; - type integer Int18 (c_int18Min .. c_int18Max) with { variant "18 bit"}; - type integer Int19 (c_int19Min .. c_int19Max) with { variant "19 bit"}; - type integer Int20 (c_int20Min .. c_int20Max) with { variant "20 bit"}; - type integer Int21 (c_int21Min .. c_int21Max) with { variant "21 bit"}; - type integer Int22 (c_int22Min .. c_int22Max) with { variant "22 bit"}; - type integer Int23 (c_int23Min .. c_int23Max) with { variant "23 bit"}; - type integer Int24 (c_int24Min .. c_int24Max) with { variant "24 bit"}; - type integer Int25 (c_int25Min .. c_int25Max) with { variant "25 bit"}; - type integer Int26 (c_int26Min .. c_int26Max) with { variant "26 bit"}; - type integer Int27 (c_int27Min .. c_int27Max) with { variant "27 bit"}; - type integer Int28 (c_int28Min .. c_int28Max) with { variant "28 bit"}; - type integer Int29 (c_int29Min .. c_int29Max) with { variant "29 bit"}; - type integer Int30 (c_int30Min .. c_int30Max) with { variant "30 bit"}; - type integer Int31 (c_int31Min .. c_int31Max) with { variant "31 bit"}; - type integer Int32 (c_int32Min .. c_int32Max) with { variant "32 bit"}; - - } // end group signedIntegerDefintions - - group zeroedIntegers { - - const UInt1 c_uInt1Zero := 0; - const UInt2 c_uInt2Zero := 0; - const UInt3 c_uInt3Zero := 0; - const UInt4 c_uInt4Zero := 0; - const UInt5 c_uInt5Zero := 0; - const UInt6 c_uInt6Zero := 0; - const UInt7 c_uInt7Zero := 0; - const UInt8 c_uInt8Zero := 0; - const UInt10 c_uInt10Zero := 0; - const UInt12 c_uInt12Zero := 0; - const UInt14 c_uInt14Zero := 0; - const UInt16 c_uInt16Zero := 0; - const UInt24 c_uInt24Zero := 0; - const UInt32 c_uInt32Zero := 0; - const UInt48 c_uInt48Zero := 0; - - }//end group zeroedInt - - /** - * @remark Number in subtype name always indicates encoding length - * in _bits_ - */ - group booleanDefintions { - - type boolean Bool1 with { variant "1 bit" }; - type boolean Bool2 with { variant "2 bit" }; - type boolean Bool3 with { variant "3 bit" }; - type boolean Bool4 with { variant "4 bit" }; - type boolean Bool5 with { variant "5 bit" }; - type boolean Bool6 with { variant "6 bit" }; - type boolean Bool7 with { variant "7 bit" }; - type boolean Bool8 with { variant "8 bit" }; - - } // end group booleanDefintions - -} // end module LibCommon_BasicTypesAndValues diff --git a/ttcn/patch_lib_common_titan/LibCommon_Sync.ttcn b/ttcn/patch_lib_common_titan/LibCommon_Sync.ttcn deleted file mode 100644 index 5b2ae66..0000000 --- a/ttcn/patch_lib_common_titan/LibCommon_Sync.ttcn +++ /dev/null @@ -1,1359 +0,0 @@ -/** - * @author ETSI - * @version $URL$ - * $Id$ - * @desc This module implements _one_ generic synchronization mechanism - * for TTCN-3 test cases with one or more test components. - * Key concept is here that one test component acts as a - * synchronization server which listens and triggers one or more - * synchronization clients. It is recomended to use the MTC always as - * the synchronization server but in theory also a PTC can act as such - * a server.

- * This synchronization is used by calling a function on - * the server test component to wait for a desired amount of clients - * to notify the server that they have reached a specific synchronization - * point. Each client test component must call another - * function to perform this notification.

- * In the event that a client is not able to reach a synchronization - * point the server sends out a signal to all clients to abort the - * test case. This signal is a STOP message which can be caught by - * a test component default which in turn can then run a proper - * shut down behavior based on the current state of the test - * component.

- * Note that this synchronization mechanism can also be used - * in a special mode called "self synchronization" when a test case - * only has one test component. Here, the test component in essence - * acts as a server and client at the same time. The main benefit of - * using self synchoronization is that the same shutdown mechanisms - * can also be reused fomr the multi component test cases.

- * This module contains a lot of TTCN-3 definitions. It has been - * structured into tree main groups to help the user to identify - * quickly relevant TTCN-3 definitions. For rookie users of this - * module basicUserRelevantDefinitions should offer all the needed - * definitions. Advanced users can consider use of definitions in - * advancedUserRelevantDefinitions. Finally, internalDefinitions - * are definitions which are required for the module to work - * properly but do not need to be used in your code. Remember that - * the main motiviation of this sychronization module is to offer - * are _simple_ user interface. Practice has shown that when writing - * actual test component behavior _only a handful_ of functions - * usually wind up being used! Also check the synchronization examples - * module for example uses of this synchronization mechanism.

- * The invocation of the sync functions is also closely tied - * to the verdict control functions which should also be reviewed - * prior to using this module.

- * This module has been derived from EtsiCommon_Synchronization - * which was created in ETSIs STF256/276. It has been kept - * intentionally separate to avoid conflicts with future ETSI - * test suite releases. - * @see LibCommon_Sync.basicUserRelevantDefinitions - * @see LibCommon_Sync.advancedUserRelevantDefinitions - * @remark End users should be aware that any changes made to the in - * definitions this module may be overwritten in future releases. - * End users are encouraged to contact the distributers of this - * module regarding their modifications or additions so that future - * updates will include your changes. - * @copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * - */ -module LibCommon_Sync { - - //Common - import from LibCommon_BasicTypesAndValues { type UInt } ; - import from LibCommon_AbstractData all; - import from LibCommon_VerdictControl all; - - group basicUserRelevantDefinitions { - - group importantSyncTypeDefinitions { - - group compTypeRelated { - - /** - * @desc This type is used to be the base of any synchronization - * behavior which is to be executed on a sync server - * component. The test component which acts as a - * sync server in a test case must NOT directly use - * this component type in its runs on clause! - * Note that server synchronization functions may be - * invoked by a test component as long as its - * component type is type compatible to this component - * type definition! - */ - type component BaseSyncComp { - port SyncPort syncPort; - timer tc_sync := PX_TSYNC_TIME_LIMIT; - } - - /** - * @desc This type is used to define any synchronization - * behavior which is to be executed on a sync server - * component. The test component which acts as a - * sync server in a test case may - but does - * not have to - directly use this component type its - * runs on clause. - * Note that server synchronization functions may be - * invoked by a test component as long as its - * component type is type compatible to this component - * type definition! - */ - type component ServerSyncComp extends BaseSyncComp { - timer tc_shutDown := PX_TSHUT_DOWN_TIME_LIMIT; - } - - /** - * @desc This type is used to define any synchronization - * behavior which is to be executed on a sync client - * component. The test component(s) which act as a - * sync client in a test case may - but do not have - * to - directly use this component type their runs - * on clause. - * Note that server synchronization functions may be - * invoked by a test component as long as its - * component type is type compatible to this component - * type definition! - */ - type component ClientSyncComp extends BaseSyncComp { - var StringStack v_stateStack:= c_initStringStack; - var TestcaseStep vc_testcaseStep := e_preamble; - } - - /** - * @desc This type is used to define any synchronization - * behavior which is relevant to non-concurrent test - * cases. - * Note that self synchronization functions may be - * invoked by a test component as long as its - * component type is type compatible to this component - * type definition! - * Note also that this type is type compatible to the - * ClientSyncComp type so that shutdown altsteps from - * concurrent test cases can also be reused in single - * component test cases! - * @see LibCommon_Sync.ClientSyncComp - */ - type component SelfSyncComp extends ClientSyncComp { - port SyncPort syncSendPort; - } - - /** - * @desc This port type must be imported into test suites - * when defining test component types which are - * type compatible to a synchronization component - * type - * @see LibCommon_Sync.SelfSyncComp - * @see LibCommon_Sync.ServerSyncComp - * @see LibCommon_Sync.ClientSyncComp - */ - type port SyncPort message { - inout SyncCmd - } with { - extension "internal" - } - - - /** - * @desc Describes in which step of execution is the testcase - */ - type enumerated TestcaseStep { - e_preamble, - e_testBody, - e_postamble - } - - } // end compTypeRelated - - group standardSyncPointNames { - const charstring c_prDone := "preambleDone"; - const charstring c_poDone := "postambleDone"; - const charstring c_tbDone := "testBodyDone"; - const charstring c_initDone := "initDone"; - } - - } // end group importantSyncTypeDefinitions - - group syncCompTestConfiguration { - - /** - * @desc Calls self connect function if invoking - * component is the MTC or otherwise connects the client - * the server. This function allows to implement preambles - * in a way that they can be used by test components - * in both non-concurrent as well as concurrent test - * cases! - * @remark This function should _not_ be called if the MTC - * acts as a client (and not a server) in a concurrent - * test case. In this case f_connect4ClientSync - * should be used instead. - * @see LibCommon_Sync.f_connect4SelfSync - * @see LibCommon_Sync.f_connect4ClientSync - */ - function f_connect4SelfOrClientSync() - runs on SelfSyncComp { - if ( self == mtc ) { - f_connect4SelfSync(); - } else { - f_connect4ClientSync(); - } - } - - /** - * @desc Calls self connect function if the invoking - * component is the MTC or otherwise disconnects the client - * from the server. This function allows to implement - * postambles in a way that they can be used in both - * non-concurrent as well as concurrent test cases. - * @remark This function should _not_ be called if the MTC - * acts as a client (and not a server) in a concurrent - * test case. In this case f_disconnect4ClientSync - * should be used instead. - * @see LibCommon_Sync.f_disconnect4SelfSync - * @see LibCommon_Sync.f_disconnect4ClientSync - */ - function f_disconnect4SelfOrClientSync() - runs on SelfSyncComp { - if ( self == mtc ) { - f_disconnect4SelfSync(); - } else { - f_disconnect4ClientSync(); - } - } - - } // end group syncCompTestConfiguration - - group syncFunctions { - - /** - * @desc Implements synchronization of 2 clients from server side - * on one or more synchronization points. - * If problem occurs, then server sends STOP to all clients. - * Waits for PX_TSYNC_TIME_LIMIT to let clients - * finish executing their behavior until this - * synchronization point. After passing all synchronization - * points successfuly the server waits for all clients - * to stop. - * See f_serverSyncClientsTimed for overwriting this - * the timing constraint! - * This function sets the server component verdict. - * @remark The use of this function requires prior connection of - * the server sync ports! - * @see LibCommon_Sync.f_connect4SelfOrClientSync - * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT - * @see LibCommon_Sync.f_serverSyncClientsTimed - * @see LibCommon_Sync.f_serverWaitForAllClientsToStop - * @param p_syncPointIds list of synchronization point name/ids - */ - function f_serverSync2ClientsAndStop( in SyncPointList p_syncPointIds ) - runs on ServerSyncComp { - f_serverSyncNClientsAndStop(2, p_syncPointIds); - } - - /** - * @desc Implements synchronization of 3 clients from server side - * on one or more synchronization points. - * If problem occurs, then server sends STOP to all clients. - * Waits for PX_TSYNC_TIME_LIMIT to let clients - * finish executing their behavior until this - * synchronization point. After passing all synchronization - * points successfuly the server waits for all clients - * to stop. - * See f_serverSyncClientsTimed for overwriting this - * the timing constraint! - * This function sets the server component verdict. - * @remark The use of this function requires prior connection of - * the server sync ports! - * @see LibCommon_Sync.f_connect4SelfOrClientSync - * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT - * @see LibCommon_Sync.f_serverSyncClientsTimed - * @see LibCommon_Sync.f_serverWaitForAllClientsToStop - * @param p_syncPointIds list of synchronization point name/ids - */ - function f_serverSync3ClientsAndStop( in SyncPointList p_syncPointIds ) - runs on ServerSyncComp { - f_serverSyncNClientsAndStop(3, p_syncPointIds); - } - - /** - * @desc Implements synchronization of 4 clients from server side - * on one or more synchronization points. - * If problem occurs, then server sends STOP to all clients. - * Waits for PX_TSYNC_TIME_LIMIT to let clients - * finish executing their behavior until this - * synchronization point. After passing all synchronization - * points successfuly the server waits for all clients - * to stop. - * See f_serverSyncClientsTimed for overwriting this - * the timing constraint! - * This function sets the server component verdict. - * @remark The use of this function requires prior connection of - * the server sync ports! - * @see LibCommon_Sync.f_connect4SelfOrClientSync - * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT - * @see LibCommon_Sync.f_serverSyncClientsTimed - * @see LibCommon_Sync.f_serverWaitForAllClientsToStop - * @param p_syncPointIds list of synchronization point name/ids - */ - function f_serverSync4ClientsAndStop( in SyncPointList p_syncPointIds ) - runs on ServerSyncComp { - f_serverSyncNClientsAndStop(4, p_syncPointIds); - } - - /** - * @desc Implements synchronization of N clients from server side - * on one or more synchronization points. - * If problem occurs, then server sends STOP to all clients. - * Waits for PX_TSYNC_TIME_LIMIT to let clients - * finish executing their behavior until this - * synchronization point. After passing all synchronization - * points successfuly the server waits for all clients - * to stop. - * See f_serverSyncClientsTimed for overwriting this - * the timing constraint! - * This function sets the server component verdict. - * @remark The use of this function requires prior connection of - * the server sync ports! - * @see LibCommon_Sync.f_connect4SelfOrClientSync - * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT - * @see LibCommon_Sync.f_serverSyncClientsTimed - * @see LibCommon_Sync.f_serverWaitForAllClientsToStop - * @param p_numClients number of synchronization clients - * @param p_syncPointIds list of synchronization point name/ids - */ - function f_serverSyncNClientsAndStop ( - in UInt p_numClients, - in SyncPointList p_syncPointIds ) - runs on ServerSyncComp { - var integer i, v_noOfSyncIds := sizeof(p_syncPointIds); - for ( i := 0; i < v_noOfSyncIds; i := i+1 ) { - f_serverSyncClientsTimed ( - p_numClients, - valueof(p_syncPointIds[i]), - PX_TSYNC_TIME_LIMIT ); - } - f_serverWaitForAllClientsToStop(); - } - - /** - * @desc Implements synchronization of 2 clients and 1 UT from server side - * on one or more synchronization points. - * If problem occurs, then server sends STOP to all clients. - * Waits for PX_TSYNC_TIME_LIMIT to let clients - * finish executing their behavior until this - * synchronization point. After passing all synchronization - * points successfuly the server waits for all clients - * to stop. - * See f_serverSyncClientsTimed for overwriting this - * the timing constraint! - * This function sets the server component verdict. - * @remark The use of this function requires prior connection of - * the server sync ports! - * @see LibCommon_Sync.f_connect4SelfOrClientSync - * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT - * @see LibCommon_Sync.f_serverSyncClientsTimed - * @see LibCommon_Sync.f_serverWaitForAllClientsToStop - * @param p_syncPointIds list of synchronization point name/ids - */ - function f_serverSync2ClientsUtAndStop( in SyncPointList p_syncPointIds ) - runs on ServerSyncComp { - var integer i, v_noOfSyncIds := sizeof(p_syncPointIds); - for ( i := 0; i < v_noOfSyncIds; i := i+1 ) { - f_serverSyncClientsTimed(3,valueof(p_syncPointIds[i]), PX_TSYNC_TIME_LIMIT); - } - f_serverWaitForAllClientsToStop(); - } - - /** - * @desc Calls either self synchronization function if - * invoking component is the MTC, otherwise - * calls client synchronization. After that it - * sets the verdict based on the specified return code. - * This function allows to implement TTCN-3 functions - * in a way that they can be used in both non-concurrent - * as well as concurrent test cases. - * @remark This function should _not_ be called if the MTC - * acts as a client (and not a server) in a concurrent - * test case. In this case f_clientSyncAndVerdict - * should be used instead. - * @param p_syncPoint Synchronization point name/id - * @param p_ret Current behavior execution status - * @see LibCommon_Sync.f_clientSyncAndVerdict - * @see LibCommon_VerdictControl.f_setVerdict - */ - function f_selfOrClientSyncAndVerdict( in charstring p_syncPoint, - in FncRetCode p_ret) - runs on SelfSyncComp { - if ( self == mtc ) { - // then assume we are running non-conurrent test case - f_selfSyncAndVerdict(p_syncPoint, p_ret); - } else { - f_clientSyncAndVerdict(p_syncPoint, p_ret); - } - } - - /** - * @desc Calls either self synchronization function if - * invoking component is the MTC, otherwise - * calls client synchronization. After that it - * sets a preamble specific verdict based on the - * specified return code. - * This function allows to implement TTCN-3 functions - * in a way that they can be used in both non-concurrent - * as well as concurrent test cases. - * @remark This function should _not_ be called if the MTC - * acts as a client (and not a server) in a concurrent - * test case. In this case f_clientSyncAndVerdictPreamble - * should be used instead. - * @param p_syncPoint Synchronization point name/id - * @param p_ret Current behavior execution status - * @see LibCommon_Sync.f_clientSyncAndVerdict - * @see LibCommon_VerdictControl.f_setVerdictPreamble - */ - function f_selfOrClientSyncAndVerdictPreamble( in charstring p_syncPoint, - in FncRetCode p_ret) - runs on SelfSyncComp { - if ( self == mtc ) { - // then assume we are running non-conurrent test case - f_selfSyncAndVerdictPreamble(p_syncPoint, p_ret); - } else { - f_clientSyncAndVerdictPreamble(p_syncPoint, p_ret); - } - } - - /** - * @desc Calls either self synchronization function if - * invoking component is the MTC, otherwise - * calls client synchronization. After that it - * sets a preamble specific verdict based on the - * specified return code. - * This function allows to implement TTCN-3 functions - * in a way that they can be used in both non-concurrent - * as well as concurrent test cases. - * @remark This function should _not_ be called if the MTC - * acts as a client (and not a server) in a concurrent - * test case. In this case f_clientSyncAndVerdictTestBody - * should be used instead. - * @param p_syncPoint Synchronization point name/id - * @param p_ret Current behavior execution status - * @see LibCommon_Sync.f_clientSyncAndVerdict - * @see LibCommon_VerdictControl.f_setVerdictPreamble - */ - function f_selfOrClientSyncAndVerdictTestBody( in charstring p_syncPoint, - in FncRetCode p_ret) - runs on SelfSyncComp { - if ( self == mtc ) { - // then assume we are running non-conurrent test case - f_selfSyncAndVerdictTestBody(p_syncPoint, p_ret); - } else { - f_clientSyncAndVerdictTestBody(p_syncPoint, p_ret); - } - } - - /** - * @desc Function kept for backward compatibility - * @see f_selfOrClientSyncAndVerdictPreamble - * - */ - function f_selfOrClientSyncAndVerdictPR( in charstring p_syncPoint, - in FncRetCode p_ret) - runs on SelfSyncComp { - f_selfOrClientSyncAndVerdictPreamble(p_syncPoint, p_ret); - } - - } // end group syncFunctions - - group syncCompStateHandling { - - /** - * - * @desc This function updates the state (stack) of a - * sync client or self sync component. This stack is - * key in the shutdown handling of test components. - * It adds the new state name to the top of the - * sync component stack of states. - * The state will only be added in case of a current - * execution status of e_success. - * @param p_newSyncCompState Name of state which was attempted to be reached. - * @param p_ret Current behavior execution status - * @remark If the state of component changes this function must be - * _at least_ called from your test suite prior to f_selfSync - * or f_clientSync which is the only definite place for the - * shutdown default invocation! - * @see LibCommon_Sync.a_dummyShutDown - * @see LibCommon_Sync.f_selfSync - * @see LibCommon_Sync.f_clientSync - */ - function f_addSyncCompState(in charstring p_newSyncCompState, - in FncRetCode p_ret) - runs on ClientSyncComp { - if ( p_ret == e_success ) { - if ( f_isItemOnStringStack(v_stateStack,p_newSyncCompState) ) { - log("**** f_addSyncCompState: WARNING: Attempt to add state which is already on sync state stack! No additition done.****"); - } else { - f_pushStringStack(v_stateStack,p_newSyncCompState); - } - } - } // end function f_addSyncCompState - - /** - * - * @desc This function returns the top state on the sync - * state stack of a sync client or self sync - * component and removes it from the stack - * This function cna be used, e.g., in a while - * statement within a postamble or shutdown - * implementation - * @param p_state State on top of the state stack. - * @return false if state stack is empty, true otherwise - * @see LibCommon_Sync.a_dummyShutDown - */ - function f_getTopSyncCompState( out charstring p_state ) - runs on ClientSyncComp - return boolean { - if ( not f_peekStringStackTop(v_stateStack,p_state) ) { - p_state := "IDLE"; - return false; - } - f_popStringStack(v_stateStack); - return true; - } // end function f_getTopSyncCompState - - /* - * @desc This function removes the last state on the state stack - * of a sync client or self sync component. - * This stack is key in the shutdown handling of test - * components. - * @see LibCommon_Sync.a_dummyShutDown - */ - function f_popSyncCompState() - runs on ClientSyncComp { - f_popStringStack(v_stateStack); - } // end function f_popSyncCompState - - /** - * - * @desc This function returns the top state on the sync state - * stack of a sync client or self sync component. It - * does not remove it from the stack - * This stack is key in the shutdown handling of test - * components. - * @param p_state State on top of the state stack. - * @return false if state stack is empty, true otherwise - * @see LibCommon_Sync.a_dummyShutDown - */ - function f_peekTopSyncCompState(out charstring p_state) - runs on ClientSyncComp - return boolean { - return f_peekStringStackTop(v_stateStack,p_state); - } // end function f_peekTopSyncCompState - - /** - * @desc This function checks if the sync state stack - * of a sync client or self sync component is empty. - * This stack is key in the shutdown handling of test - * components. - * @see LibCommon_Sync.a_dummyShutDown - */ - function f_isSyncCompStateStackEmpty() - runs on ClientSyncComp - return boolean { - return f_isStringStackEmpty(v_stateStack); - } // end function f_isSyncCompStateStackEmpty - - } // end group syncCompStateHandling - - group shutDownAltsteps { - - /** - * @desc This is an example of a shutdown altstep which can be - * used as a "template" for a interface specific shutdown - * altstep or possily as a first temporary solution in - * test case development.

- * This altstep shall be activated as a default as the - * first statement in each test case function which drives - * an interface, i.e., in MTC behavior of single component - * and in each client behavior of multi component test - * cases.
- * The required behavior from this altstep is to:

- * 1) expect the STOP either via the test component - * syncPort

- * 2) upon its arrival it should shut down the SUT - * gracefully based on the current component state

- * The current component state should have been - * previously kept uptodate from a test suite via the - * f_addSyncCompState function. This default will then be - * (automatically) invoked either from within f_selfSync - * or f_clientSync.
- * Note that shutdown defaults can be written as - * _interface specific_ - they do not need to be test case - * or test component specific! See another example of a - * shutdown altstep in the sync module. - * @see LibCommon_Sync.f_addSyncCompState - * @see LibCommon_Sync.f_selfSync - * @see LibCommon_Sync.f_clientSync - * @see LibCommon_SyncExamples.a_exampleShutDown - * @remark Your application specific shutdown altstep - * implementation(s) should _not_ be defined in this - * module but as part of your test suite or application specific - * modules. - */ - altstep a_dummyShutDown() - runs on SelfSyncComp { - [] syncPort.receive(m_syncServerStop){ - var charstring v_state := ""; - tc_sync.stop; - log("**** a_dummyShutDown: Test component received STOP signal from sync server - going to IDLE state ****"); - while ( f_getTopSyncCompState(v_state) ) { - if ( v_state == "x" ) { - // then do something - } else if ( v_state == "y" ) { - // then do something else - } - } // end while - f_disconnect4SelfOrClientSync(); - // unmap/disconnect more if needed - log("**** a_dummyShutDown: -> Test component stopping itself now! ****") ; - stop ; - } - } // end altstep a_dummyShutDown - - /** - * @desc Shutdown alstep in case the sync server is requesting shutdown. - * - * @remark User shall stop the component - */ - altstep a_shutdown() - runs on ClientSyncComp { - [] syncPort.receive(m_syncServerStop){ - tc_sync.stop ; - log("**** a_shutdown: Test component received STOP signal from MTC **** "); - } - } - - } // end group shutDownAltsteps - - } // end group basicUserRelevantDefinitions - - group advancedUserRelevantDefinitions { - - group serverRelated { - - /** - * @desc Implements synchronization of "n" clients from server - * side. If a problem occurs, then server sends STOP to - * all clients. Waits for PX_TSYNC_TIME_LIMIT to let - * clients finish executing their behavior until this - * synchronization point. See f_serverSyncClientsTimed for - * overwriting this later timing constraint! - * This function sets the server component verdict. - * @remark The use of this function requires prior connection of - * the server sync port! - * @see LibCommon_Sync.f_connect4SelfOrClientSync - * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT - * @see LibCommon_Sync.f_serverSyncClientsTimed - * @param p_noOfClients number of clients to be synchronized - * @param p_syncId synchronization point name/id - */ - function f_serverSyncClients( in UInt p_noOfClients, in charstring p_syncId ) - runs on ServerSyncComp { - f_serverSyncClientsTimed(p_noOfClients,p_syncId, PX_TSYNC_TIME_LIMIT); - } - - /** - * @desc Implements synchronization of "n" clients from server - * side including intermediate synchronization. - * If a problem occurs, then server sends STOP to - * all clients. Waits for PX_TSYNC_TIME_LIMIT to let - * clients finish executing their behavior until this - * synchronization point. See f_serverSyncClientsTimed for - * overwriting this later timing constraint! - * This function sets the server component verdict. - * @remark The use of this function requires prior connection of - * the server sync port! - * @see LibCommon_Sync.f_connect4SelfOrClientSync - * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT - * @see LibCommon_Sync.f_serverSyncClientsTimed - * @param p_noOfClients number of clients to be synchronized - * @param p_syncId synchronization point name/id - */ - function f_serverSyncClientsIntermediateSync( in UInt p_noOfClients, in charstring p_syncId, in UInt p_NoOfClientIntermediate, in template (present) charstring p_syncIdIntermediate ) - runs on ServerSyncComp { - f_serverSyncClientsTimedIntermediateSync(p_noOfClients,p_syncId, p_NoOfClientIntermediate, p_syncIdIntermediate, PX_TSYNC_TIME_LIMIT); - } - - /** - * @desc Handles synchronization of clients from server side. - * If problem occurs, then server sends STOP to all clients. - * This function sets the server verdict. - * @remark The use of this function requires prior connection of - * the server sync ports! - * @param p_NoOfClients number of clients to be synchronized - * @param p_syncId synchronization point name/id - * @param p_execTimeLimit time limit given to all clients to finish the execution - * of their behavior up to this synchronization point - * @see LibCommon_Sync.f_connect4SelfOrClientSync - */ - function f_serverSyncClientsTimed(in UInt p_NoOfClients, - in charstring p_syncId, - float p_execTimeLimit ) - runs on ServerSyncComp { - f_serverSyncClientsTimedIntermediateSync(p_NoOfClients, p_syncId, 0, ?, p_execTimeLimit ) - } // end function f_serverSyncClientsTimed - - /** @desc Handles synchronization of clients from server side including - * intermediate synchronization. - * If problem occurs, then server sends STOP to all clients. - * This function sets the server verdict. - * @remark The use of this function requires prior connection of - * the server sync ports! - * @param p_NoOfClients number of clients to be synchronized - * @param p_syncId synchronization point name/id - * @param p_execTimeLimit time limit given to all clients to finish the execution - * of their behavior up to this synchronization point - * @see LibCommon_Sync.f_connect4SelfOrClientSync - * @return execution status - */ - function f_serverSyncClientsTimedIntermediateSync( in UInt p_NoOfClients, - in charstring p_syncId, in UInt p_NoOfClientIntermediate, in template (present) charstring p_syncIdIntermediate, - float p_execTimeLimit ) - runs on ServerSyncComp { - - var integer v_noOfRecvdSyncMsgs := 0, v_noOfRecvdSyncMsgsIntermediate := 0; - var boolean v_stopClients := false; - var ClientSyncCompList v_clientRefs := {}, v_clientRefsIntermediate := {}; - var ClientSyncComp v_clientRef; - - if ( p_syncId == c_prDone ) { - log("**** f_serverSyncClientsTimed: Sync server now starting PREAMBLE synchronization ... ****") ; - } else if ( p_syncId == c_tbDone ) { - log("**** f_serverSyncClientsTimed: Sync server now starting TEST BODY synchronization ... ****") ; - } else if ( p_syncId == c_initDone ) { - log("**** f_serverSyncClientsTimed: Sync server now starting UPPER TESTER synchronization ... ****") ; - } else { - log("**** f_serverSyncClientsTimed: Sync server now starting handling of next synchronization point ... ****") ; - } - tc_sync.start(p_execTimeLimit) ; - alt{ - [v_noOfRecvdSyncMsgsIntermediate != p_NoOfClientIntermediate] syncPort.receive(m_syncClientReady(p_syncIdIntermediate)) -> sender v_clientRef { - if(not f_isPresentInArray(v_clientRef, v_clientRefsIntermediate)) { - v_clientRefsIntermediate[v_noOfRecvdSyncMsgsIntermediate] := v_clientRef; - v_noOfRecvdSyncMsgsIntermediate := v_noOfRecvdSyncMsgsIntermediate + 1; - if (v_noOfRecvdSyncMsgsIntermediate == p_NoOfClientIntermediate) { - f_serverSendToAllClients(v_clientRefsIntermediate, m_syncServerReady(p_syncIdIntermediate)); - } - } - repeat; - } - [] syncPort.receive(m_syncClientReady(p_syncId)) -> sender v_clientRef { - if(not f_isPresentInArray(v_clientRef, v_clientRefs)) { - v_clientRefs[v_noOfRecvdSyncMsgs] := v_clientRef; - v_noOfRecvdSyncMsgs := v_noOfRecvdSyncMsgs + 1; - } - if ( v_noOfRecvdSyncMsgs != p_NoOfClients ) { repeat; } - } - [] syncPort.receive(m_syncClientStop) -> sender v_clientRef { - log("**** f_serverSyncClientsTimed: Sync server received STOP signal from a client - server will wait for all clients to reach their next synchronization point and then stop them! ****") ; - v_stopClients := true; - if(not f_isPresentInArray(v_clientRef, v_clientRefs)) { - v_clientRefs[v_noOfRecvdSyncMsgs] := v_clientRef; - v_noOfRecvdSyncMsgs := v_noOfRecvdSyncMsgs + 1; - } - if ( v_noOfRecvdSyncMsgs != p_NoOfClients ) { repeat; } - - } - [] syncPort.receive(m_syncClientReady(?)) -> sender v_clientRef { - log("**** f_serverSyncClientsTimed: Sync server received client sync message with incorrect synchronization point id which is currently not handled - server will stop all clients! ****") ; - v_stopClients := true; - if(not f_isPresentInArray(v_clientRef, v_clientRefs)) { - v_clientRefs[v_noOfRecvdSyncMsgs] := v_clientRef; - } - } - [] syncPort.receive(SyncCmd :? ) { - log("**** f_serverSyncClientsTimed: Sync server received (invalid) sync message from other sync server - server will stop all clients! ****") ; - v_stopClients := true; } - [] any port.receive { - // leave it to be ok to receive anything else - // in case that the user has added any non-sync ports to - // his/her server component type definition! - repeat; - } - [] tc_sync.timeout{ - log("**** f_serverSyncClientsTimed: A client is not responding within specified time limit - sync server is sending stop to all clients! ****"); - v_stopClients := true; } - } //end alt - if (v_noOfRecvdSyncMsgsIntermediate != p_NoOfClientIntermediate) { - v_stopClients := true; - } - tc_sync.stop ; - if ( v_stopClients ) { - setverdict(inconc); - // then send out STOP sync msg - f_serverSendToAllClients(v_clientRefs, m_syncServerStop); - f_serverWaitForAllClientsToShutDown(); // function will never return! - } else { - setverdict(pass); - // then send out READY sync msg - f_serverSendToAllClients(v_clientRefs, m_syncServerReady(p_syncId)); - if ( p_syncId == c_prDone ) { - log("**** f_serverSyncClientsTimed: Sync server successfully passed PREAMBLE synchronization point. ****") ; - } else if ( p_syncId == c_tbDone ) { - log("**** f_serverSyncClientsTimed: Sync server successfully passed TEST BODY synchronization point. ****") ; - } else { - log("**** f_serverSyncClientsTimed: Sync server successfully passed synchronization point. ****") ; - } - } - } // end function f_serverSyncClientsTimedIntermediateSync - - /** - * @desc This function is intended only for use on the sync - * server component in concurrent TTCN-3 test cases. - * It waits for all components to finish execution within - * the PX_TSYNC_TIME_LIMIT. If a timeout occurs - * the server will stop all clients. - * This function sets the server component verdict. - */ - function f_serverWaitForAllClientsToStop() - runs on ServerSyncComp { - tc_sync.start; - alt { - [] all component.done { - tc_sync.stop; - log("**** f_serverWaitForAllClientsToStop: All sync clients have finished their execution. Sync server now terminating test case. ****") ; - } - [] tc_sync.timeout { - log("**** f_serverWaitForAllClientsToStop: Not all sync clients have finshed execution within the sync time limit. Sync server will stop test case! ****") ; - stop; - } - } // end alt - setverdict(pass); - } // end function f_serverWaitForAllClientsToStop - - } // end group serverRelated - - group clientRelated { - - /** - * @desc This function creates the connection needed to - * execute client synchronization functions - * @see LibCommon_Sync.f_clientSync - * @see LibCommon_Sync.f_clientSendStop - */ - function f_connect4ClientSync() - runs on ClientSyncComp { - connect(self:syncPort, mtc:syncPort); - }// end function f_connect4ClientSync - - /** - * @desc This function removes the connection needed - * to execute client synchronization functions - * @see LibCommon_Sync.f_clientSync - * @see LibCommon_Sync.f_clientSendStop - */ - function f_disconnect4ClientSync() - runs on ClientSyncComp { - disconnect(self:syncPort, mtc:syncPort); - }// end function f_disconnect4ClientSync - - /** - * @desc This function combines client verdict setting with its - * synchronization for use,e.g, after or within a - * test body implementation. - * Note that such premables can _not_ be reused in non- - * concurrent test cases. This can be achieved by using - * the f_selfOrClientSyncAndVerdict function instead. - * This function sets the client component verdict. - * @param p_syncId Synchronization point name/id - * @param p_ret Current behavior execution status - * @remark The use of this function requires prior connection - * of the client sync port! - * @see LibCommon_Sync.f_connect4ClientSync - * @see LibCommon_Sync.f_connect4SelfOrClientSync - * @see LibCommon_VerdictControl.f_setVerdict - * @see LibCommon_Sync.f_selfOrClientSyncAndVerdict - */ - function f_clientSyncAndVerdict(in charstring p_syncId, - in FncRetCode p_ret) - runs on ClientSyncComp { - if(vc_testcaseStep == e_preamble) { - f_clientSyncAndVerdictPreamble(p_syncId, p_ret); - } else if(vc_testcaseStep == e_testBody) { - f_clientSyncAndVerdictTestBody(p_syncId, p_ret); - } - else { - f_clientSyncAndVerdictPostamble(p_syncId, p_ret); - } - } - - /** - * @desc This function combines client verdict setting with its - * synchronization for use after or within a preamble - * implementation. - * Note that such preambles can _not_ be reused in non- - * concurrent test cases. - * This function sets the client component verdict. - * @remark The use of this function requires prior connection - * of the client sync port! - * @see LibCommon_Sync.f_connect4ClientSync - * @see LibCommon_Sync.f_connect4SelfOrClientSync - * @see LibCommon_VerdictControl.f_setVerdictPreamble - * @param p_syncId Synchronization point name/id - * @param p_ret Current behavior execution status - */ - function f_clientSyncAndVerdictPreamble(in charstring p_syncId , - FncRetCode p_ret) - runs on ClientSyncComp { - f_setVerdictPreamble(p_ret); - f_clientSync(p_syncId,p_ret); - vc_testcaseStep := e_testBody; - } - - /** - * @desc This function combines client verdict setting with its - * synchronization for use,e.g, after or within a - * test body implementation. - * Note that such premables can _not_ be reused in non- - * concurrent test cases. This can be achieved by using - * the f_selfOrClientSyncAndVerdict function instead. - * This function sets the client component verdict. - * @param p_syncId Synchronization point name/id - * @param p_ret Current behavior execution status - * @remark The use of this function requires prior connection - * of the client sync port! - * @see LibCommon_Sync.f_connect4ClientSync - * @see LibCommon_Sync.f_connect4SelfOrClientSync - * @see LibCommon_VerdictControl.f_setVerdict - * @see LibCommon_Sync.f_selfOrClientSyncAndVerdict - */ - function f_clientSyncAndVerdictTestBody(in charstring p_syncId, - in FncRetCode p_ret) - runs on ClientSyncComp { - f_setVerdict(p_ret); - f_clientSync(p_syncId,p_ret); - vc_testcaseStep := e_postamble; - } - - /** - * @desc This function combines client verdict setting with its - * synchronization for use after or within a - * postamble implementation. - * Note that such prostambles can _not_ be reused in non- - * concurrent test cases. - * This function sets the client component verdict. - * @remark The use of this function requires prior connection - * of the client sync port! - * @see LibCommon_Sync.f_connect4ClientSync - * @see LibCommon_Sync.f_connect4SelfOrClientSync - * @see LibCommon_VerdictControl.f_setVerdictPostamble - * @param p_syncId Synchronization point name/id - * @param p_ret Current behavior execution status - */ - function f_clientSyncAndVerdictPostamble(in charstring p_syncId , - in FncRetCode p_ret) - runs on ClientSyncComp { - f_setVerdictPostamble(p_ret); - f_clientSync(p_syncId,p_ret); - } - - /** - * @desc This function handles synchronization of a sync client - * with the server. In case of successful execution it sends - * a READY message to the server and waits the READY back. - * The time used for waiting is defined by PX_TSYNC_TIME_LIMIT. - * In case of a non successful execution status it - * sends a STOP message to the server. - * In both cases the receipt of a STOP message or no - * response from the server it will trigger the shutdown - * default (if activated). - * This function will set only the client verdict to INCONC - * (and stop its execution) if no STOP response is received - * from the server within the PX_TSYNC_TIME_LIMIT - * or if no shutdown default is activated. In all other - * cases the client verdict is NOT set. - * @param p_syncId Synchronization point name/id - * @param p_ret Current behavior execution status - * @remark The use of this function requires prior connection - * of the client sync port! - * @see LibCommon_Sync.f_connect4ClientSync - * @see LibCommon_Sync.f_connect4SelfOrClientSync - * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT - * @see LibCommon_Sync.a_dummyShutDown - * @see LibCommon_Sync.f_clientSendStop - * @return Updated execution status - */ - function f_clientSync( in charstring p_syncId , - in FncRetCode p_ret ) - runs on ClientSyncComp - return FncRetCode{ - - if (p_ret == e_success){ - syncPort.send(m_syncClientReady(p_syncId)); - tc_sync.start; - alt{ - [] syncPort.receive(m_syncServerReady(p_syncId)){ - tc_sync.stop ; } - [] tc_sync.timeout{ - log("**** f_clientSync: Sync client did not receive message from sync server within the specified time limit - sync client will ask sync server to stop test case! ****") ; - f_clientSendStop(); } // function will not return! - } //end alt - } //end if - else { - log("**** f_clientSync: Execution status indicates that execution of test component behavior was not successful - sync client will ask sync server to stop test case! ****") ; - f_clientSendStop(); // function will not return! - } - if ( p_syncId == c_prDone ) { - log("**** f_clientSync: Sync client successfully passed PREAMBLE synchronization point. ****") ; - } else if ( p_syncId == c_tbDone ) { - log("**** f_clientSync: Sync client successfully passed TEST BODY synchronization point. ****") ; - } else { - log("**** f_clientSync: Sync client successfully passed synchronization point. ****") ; - } - return e_success ; - - } // end function f_clientSync - - /** - * @desc This function can be used to request the shutdown a - * multi component test case _prior_ to reaching a - * synchronization point. It sends a STOP message to - * the sync server and awaits then the STOP from the server - * which will trigger the shutdown default (if activated). - * This function will set the server verdict to INCONC (and - * stop the test case) if no shutdown default is activated. - * This function will set only the client verdict to INCONC - * (and stop its execution) if no STOP response is received - * from the server within the PX_TSYNC_TIME_LIMIT - * or if no shutdown default is activated. In all other - * cases the client verdict is NOT set. - * @remark The use of this function requires prior connection - * of the client sync port! - * @see LibCommon_Sync.f_connect4ClientSync - * @see LibCommon_Sync.f_connect4SelfOrClientSync - * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT - * @see LibCommon_Sync.a_dummyShutDown - */ - function f_clientSendStop() - runs on ClientSyncComp { - log("**** f_clientSendStop: Sync client requesting from server to stop test case (including itself). ****") ; - syncPort.send(m_syncClientStop) ; - tc_sync.start; - alt{ - [] tc_sync.timeout{ - log("**** f_clientSendStop: Stopping sync client without shutdown - either no shutdown default active or no stop received from server. ****") ; - setverdict(inconc); - stop ; - } - }//end alt - tc_sync.stop; - stop; // stop here if shutdown default does not stop - } - - } // end group clientRelated - - } // end group advancedUserRelevantDefinitions - - group otherSyncModuleDefinitions { - - group syncModuleparams { - /** - * - * @desc Default time limit for a sync client to reach a - * synchronization point - */ - modulepar float PX_TSYNC_TIME_LIMIT := 120.0; - - /* - * @desc Default time limit for a sync client to finish - * its execution of the shutdown default - */ - modulepar float PX_TSHUT_DOWN_TIME_LIMIT := 120.0; - } - - group otherSyncTypes { - - type record of charstring SyncPointList; - - type record of ClientSyncComp ClientSyncCompList; - - } // end group otherSyncTypes - - group otherSelfSyncRelatedDefinitions { - - /** - * @desc This function creates the connection needed to - * execute self sync functions - * @see LibCommon_Sync.f_selfSync - * @see LibCommon_Sync.f_selfSyncStop - */ - function f_connect4SelfSync() - runs on SelfSyncComp { - connect(self:syncSendPort, self:syncPort); - }// end function f_connect4SelfSync - - /** - * @desc This function removes the connection needed - * to execute self sync functions - * @see LibCommon_Sync.f_selfSync - * @see LibCommon_Sync.f_selfSyncStop - */ - function f_disconnect4SelfSync() - runs on SelfSyncComp { - disconnect(self:syncSendPort, self:syncPort); - }// end function f_disconnect4SelfSync - - /** - * @desc This function combines MTC verdict setting with self - * synchronization for use in the preamble / test body / postamble - * @param p_syncId Synchronization point name/id - * @param p_ret Current behavior execution status - * @see LibCommon_VerdictControl.f_setVerdict - * @see LibCommon_Sync.f_selfSync - * @see LibCommon_Sync.a_dummyShutDown - */ - function f_selfSyncAndVerdict( in charstring p_syncId, - in FncRetCode p_ret ) - runs on SelfSyncComp { - if(vc_testcaseStep == e_preamble) { - f_selfSyncAndVerdictPreamble(p_syncId, p_ret); - } else if(vc_testcaseStep == e_testBody) { - f_selfSyncAndVerdictTestBody(p_syncId, p_ret); - } - else { - f_selfSyncAndVerdictPostamble(p_syncId, p_ret); - } - } - - /** - * @desc This function combines MTC verdict setting with self - * synchronization for use after the preamble. - * @param p_syncId Synchronization point name/id - * @param p_ret Current behavior execution status - * @see LibCommon_VerdictControl.f_setVerdictPreamble - * @see LibCommon_Sync.f_selfSync - */ - function f_selfSyncAndVerdictPreamble( in charstring p_syncId, - in FncRetCode p_ret ) - runs on SelfSyncComp { - f_setVerdictPreOrPostamble(p_ret); - f_selfSync(p_syncId,p_ret); - vc_testcaseStep := e_testBody; - } - - /** - * @desc This function combines MTC verdict setting with self - * synchronization for use after the test body. - * @param p_syncId Synchronization point name/id - * @param p_ret Current behavior execution status - * @see LibCommon_VerdictControl.f_setVerdict - * @see LibCommon_Sync.f_selfSync - */ - function f_selfSyncAndVerdictTestBody( in charstring p_syncId, - in FncRetCode p_ret ) - runs on SelfSyncComp { - f_setVerdict(p_ret); - f_selfSync(p_syncId,p_ret); - vc_testcaseStep := e_postamble; - } - - /** - * @desc This function combines MTC verdict setting with self - * synchronization for use after the postamble. - * @param p_syncId Synchronization point name/id - * @param p_ret Current behavior execution status - * @see LibCommon_VerdictControl.f_setVerdictPostamble - * @see LibCommon_Sync.f_selfSync - */ - function f_selfSyncAndVerdictPostamble( in charstring p_syncId , - in FncRetCode p_ret ) - runs on SelfSyncComp { - f_setVerdictPreOrPostamble(p_ret); - f_selfSync(p_syncId,p_ret); - } - - /** - * @desc This function synchronizes a MTC with itself. In case - * of a non successful execution status it sends a STOP - * message to itself and invokes that way the - * shutdown default (if activated). - * This function will set the server verdict to INCONC (and - * stop the test case) if no shutdown default is activated. - * Otherwise no verdict is set. - * @remark Sync ports should be connected prior to the invocation - * of this function! - * @param p_syncId Synchronization point name/id - * @param p_ret Current behavior execution status - * @return Updated execution status - * @see LibCommon_Sync.f_connect4SelfSync - * @see LibCommon_Sync.a_dummyShutDown - */ - function f_selfSync( in charstring p_syncId , - in FncRetCode p_ret ) - runs on SelfSyncComp - return FncRetCode{ - if (p_ret != e_success){ - f_selfSyncStop() ; // function will not return! - } - if ( p_syncId == c_prDone ) { - log("**** f_selfSync: Successfully passed PREAMBLE synchronization point. ****") ; - } else if ( p_syncId == c_tbDone ) { - log("**** f_selfSync: Successfully passed TEST BODY synchronization point. ****") ; - } else { - log("**** f_selfSync: Successfully passed synchronization point. ****") ; - } - return e_success ; - }// end function f_selfSync - - /** - * @desc This function can be used to shut down a test case _prior_ - * to reaching a synchronization point. it sends a STOP - * message to itself and invokes that way the - * shutdown default (if activated). - * This function will set the server verdict to INCONC (and - * stop the test case) if no shutdown default is activated. - * Otherwise no verdict is set. - * @remark Sync ports should be connected prior to the invocation - * of this function! - * @see LibCommon_Sync.f_connect4SelfSync - */ - function f_selfSyncStop() - runs on SelfSyncComp { - - log("**** f_selfSyncStop: MTC requests to stop test case (itself). ****") ; - syncSendPort.send(m_syncServerStop) ; // this MUST be _server_ for the default to catch! - tc_sync.start(PX_TSYNC_TIME_LIMIT); - alt{ - [] tc_sync.timeout{ - log("**** f_selfSyncStop: Stopping MTC without shutdown - either no shutdown default active or missing syncPort connection ****") ; - setverdict(inconc); - stop ; - } - }//end alt - tc_sync.stop; - stop; // if shutdown default is not activated or if it does not stop - } // end function f_selfSyncStop - - } // end group otherSelfSyncRelatedDefinitions - - /** - * - * @desc The sychronization protocol is conceptually based on - * named synchronization. Each synchronization point - * has it own specific synchronization message. This - * makes each synchronization unique, and allows, e.g., to - * ensure that a server synchronizes only clients which have - * reached the same synchronization point. - */ - group syncProtocolDefinition { - - type union SyncCmd { - ClientReady clientReady, - ServerReady serverReady, - ClientStop clientStop, - ServerStop serverStop - } - - type record ClientReady { - charstring syncPointId - } - - type record ServerReady { - charstring syncPointId - } - - type record ClientStop {} - - type record ServerStop {} - - } // end group syncProtocolDefinition - - group syncMessages { - template SyncCmd m_syncClientReady( template (present) charstring p_syncId ) := { - clientReady := { p_syncId } - } - - template SyncCmd m_syncServerReady( template (present) charstring p_syncId ) := { - serverReady := { p_syncId } - } - - template SyncCmd m_syncClientStop := { - clientStop := {} - } - - template SyncCmd m_syncServerStop := { - serverStop := {} - } - - } // end group syncMessages - - group otherSyncFunctions { - - /** - * @desc Makes server send a sync message to all known clients - * @param p_clientRefs List of client references to which the message is to be send - * @param p_syncCmd The actual synchronization message to be sent out - */ - function f_serverSendToAllClients( in ClientSyncCompList p_clientRefs, - in template (value) SyncCmd p_syncCmd) - runs on ServerSyncComp { - var integer i:=0; - for (i:=0; i< sizeof(p_clientRefs); i:=i+1 ){ - syncPort.send(p_syncCmd) to valueof(p_clientRefs[i]); - } - } // end function f_serverSendToAllClients - - /** - * @desc This function is intended only for use on server in concurrent - * TTCN-3 test cases. It waits for all components to shut down - * within the PX_TSHUT_DOWN_TIME_LIMIT. If a timeout occurs - * it aborts the test case (no matter how far clients got with their - * shutdown). - * This function sets the server verdict. - */ - function f_serverWaitForAllClientsToShutDown() - runs on ServerSyncComp { - - tc_shutDown.start(PX_TSHUT_DOWN_TIME_LIMIT); - alt { - [] syncPort.receive { - // clients may still try to send some sync message - } - [] all component.done { - tc_shutDown.stop; - log("**** f_serverWaitForAllClientsToShutDown: All components have properly shut down. Sync server will now terminate the test case. ****") ; - } - [] tc_shutDown.timeout { - log("**** f_serverWaitForAllClientsToShutDown: Not all clients have properly shutdown within the shut down time limit. Sync server will now terminate test case! ****") ; - } - } // end alt - // cover case that shut down default is NOT activated - setverdict(inconc); - //mtc.stop; - syncPort.send(m_syncServerStop) to self; // this MUST be _server_ for the default to catch! - tc_sync.start(PX_TSYNC_TIME_LIMIT); - alt{ - [] tc_sync.timeout{ - log("**** f_selfSyncStop: Stopping MTC without shutdown - either no shutdown default active or missing syncPort connection ****") ; - setverdict(inconc); - stop ; - } - }//end alt - tc_sync.stop; - stop; // if shutdown default is not activated or if it does not stop - } // end function f_serverWaitForAllClientsToShutDown - - function f_isPresentInArray(in ClientSyncComp p_clientRef, in ClientSyncCompList p_clientRefs) - return boolean { - var integer i; - for(i:=0; i < sizeof(p_clientRefs); i:=i+1) { - if(p_clientRefs[i] == p_clientRef) { - return true; - } - } - return false; - } - } // end group otherSyncFunctions - - } // end group otherSyncDefinitions - -} // end module LibCommon_Sync diff --git a/ttcn/patch_lib_common_titan/module.mk b/ttcn/patch_lib_common_titan/module.mk index 3b3b660..905b488 100644 --- a/ttcn/patch_lib_common_titan/module.mk +++ b/ttcn/patch_lib_common_titan/module.mk @@ -1,9 +1,9 @@ sources := \ ttcn/LibCommon_AbstractData.ttcn \ - ttcn/LibCommon_BasicTypesAndValues.ttcn \ - ttcn/LibCommon_DataStrings.ttcn \ - ttcn/LibCommon_Sync.ttcn \ ttcn/LibCommon_TextStrings.ttcn \ ttcn/LibCommon_Time.ttcn \ - ttcn/LibCommon_VerdictControl.ttcn + ttcn/LibCommon_VerdictControl.ttcn \ + ../patch_lib_common_titan/ttcn/LibCommon_BasicTypesAndValues.ttcn \ + ../patch_lib_common_titan/ttcn/LibCommon_DataStrings.ttcn \ + ../patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn \ diff --git a/ttcn/patch_lib_common_titan/ttcn/LibCommon_BasicTypesAndValues.ttcn b/ttcn/patch_lib_common_titan/ttcn/LibCommon_BasicTypesAndValues.ttcn index 5758c7c..9b5477d 100644 --- a/ttcn/patch_lib_common_titan/ttcn/LibCommon_BasicTypesAndValues.ttcn +++ b/ttcn/patch_lib_common_titan/ttcn/LibCommon_BasicTypesAndValues.ttcn @@ -172,38 +172,38 @@ const integer c_int32Max := 2147483647; type integer Int; - type integer Int1 (c_int1Min .. c_int1Max) with { variant "1 bit, COMP(2scompl)" }; - type integer Int2 (c_int2Min .. c_int2Max) with { variant "2 bit, COMP(2scompl)" }; - type integer Int3 (c_int3Min .. c_int3Max) with { variant "3 bit, COMP(2scompl)" }; - type integer Int4 (c_int4Min .. c_int4Max) with { variant "4 bit, COMP(2scompl)" }; - type integer Int5 (c_int5Min .. c_int5Max) with { variant "5 bit, COMP(2scompl)" }; - type integer Int6 (c_int6Min .. c_int6Max) with { variant "6 bit, COMP(2scompl)" }; - type integer Int7 (c_int7Min .. c_int7Max) with { variant "7 bit, COMP(2scompl)" }; - type integer Int8 (c_int8Min .. c_int8Max) with { variant "8 bit, COMP(2scompl)" }; - type integer Int9 (c_int9Min .. c_int9Max) with { variant "9 bit, COMP(2scompl)" }; - type integer Int10 (c_int10Min .. c_int10Max) with { variant "10 bit, COMP(2scompl)" }; - type integer Int11 (c_int11Min .. c_int11Max) with { variant "11 bit, COMP(2scompl)" }; - type integer Int12 (c_int12Min .. c_int12Max) with { variant "12 bit, COMP(2scompl)" }; - type integer Int13 (c_int13Min .. c_int13Max) with { variant "13 bit, COMP(2scompl)" }; - type integer Int14 (c_int14Min .. c_int14Max) with { variant "14 bit, COMP(2scompl)" }; - type integer Int15 (c_int15Min .. c_int15Max) with { variant "15 bit, COMP(2scompl)" }; - type integer Int16 (c_int16Min .. c_int16Max) with { variant "16 bit, COMP(2scompl)" }; - type integer Int17 (c_int17Min .. c_int17Max) with { variant "17 bit, COMP(2scompl)" }; - type integer Int18 (c_int18Min .. c_int18Max) with { variant "18 bit, COMP(2scompl)" }; - type integer Int19 (c_int19Min .. c_int19Max) with { variant "19 bit, COMP(2scompl)" }; - type integer Int20 (c_int20Min .. c_int20Max) with { variant "20 bit, COMP(2scompl)" }; - type integer Int21 (c_int21Min .. c_int21Max) with { variant "21 bit, COMP(2scompl)" }; - type integer Int22 (c_int22Min .. c_int22Max) with { variant "22 bit, COMP(2scompl)" }; - type integer Int23 (c_int23Min .. c_int23Max) with { variant "23 bit, COMP(2scompl)" }; - type integer Int24 (c_int24Min .. c_int24Max) with { variant "24 bit, COMP(2scompl)" }; - type integer Int25 (c_int25Min .. c_int25Max) with { variant "25 bit, COMP(2scompl)" }; - type integer Int26 (c_int26Min .. c_int26Max) with { variant "26 bit, COMP(2scompl)" }; - type integer Int27 (c_int27Min .. c_int27Max) with { variant "27 bit, COMP(2scompl)" }; - type integer Int28 (c_int28Min .. c_int28Max) with { variant "28 bit, COMP(2scompl)" }; - type integer Int29 (c_int29Min .. c_int29Max) with { variant "29 bit, COMP(2scompl)" }; - type integer Int30 (c_int30Min .. c_int30Max) with { variant "30 bit, COMP(2scompl)" }; - type integer Int31 (c_int31Min .. c_int31Max) with { variant "31 bit, COMP(2scompl)" }; - type integer Int32 (c_int32Min .. c_int32Max) with { variant "32 bit, COMP(2scompl)" }; + type integer Int1 (c_int1Min .. c_int1Max) with { variant "1 bit"}; + type integer Int2 (c_int2Min .. c_int2Max) with { variant "2 bit"}; + type integer Int3 (c_int3Min .. c_int3Max) with { variant "3 bit"}; + type integer Int4 (c_int4Min .. c_int4Max) with { variant "4 bit"}; + type integer Int5 (c_int5Min .. c_int5Max) with { variant "5 bit"}; + type integer Int6 (c_int6Min .. c_int6Max) with { variant "6 bit"}; + type integer Int7 (c_int7Min .. c_int7Max) with { variant "7 bit"}; + type integer Int8 (c_int8Min .. c_int8Max) with { variant "8 bit"}; + type integer Int9 (c_int9Min .. c_int9Max) with { variant "9 bit"}; + type integer Int10 (c_int10Min .. c_int10Max) with { variant "10 bit"}; + type integer Int11 (c_int11Min .. c_int11Max) with { variant "11 bit"}; + type integer Int12 (c_int12Min .. c_int12Max) with { variant "12 bit"}; + type integer Int13 (c_int13Min .. c_int13Max) with { variant "13 bit"}; + type integer Int14 (c_int14Min .. c_int14Max) with { variant "14 bit"}; + type integer Int15 (c_int15Min .. c_int15Max) with { variant "15 bit"}; + type integer Int16 (c_int16Min .. c_int16Max) with { variant "16 bit"}; + type integer Int17 (c_int17Min .. c_int17Max) with { variant "17 bit"}; + type integer Int18 (c_int18Min .. c_int18Max) with { variant "18 bit"}; + type integer Int19 (c_int19Min .. c_int19Max) with { variant "19 bit"}; + type integer Int20 (c_int20Min .. c_int20Max) with { variant "20 bit"}; + type integer Int21 (c_int21Min .. c_int21Max) with { variant "21 bit"}; + type integer Int22 (c_int22Min .. c_int22Max) with { variant "22 bit"}; + type integer Int23 (c_int23Min .. c_int23Max) with { variant "23 bit"}; + type integer Int24 (c_int24Min .. c_int24Max) with { variant "24 bit"}; + type integer Int25 (c_int25Min .. c_int25Max) with { variant "25 bit"}; + type integer Int26 (c_int26Min .. c_int26Max) with { variant "26 bit"}; + type integer Int27 (c_int27Min .. c_int27Max) with { variant "27 bit"}; + type integer Int28 (c_int28Min .. c_int28Max) with { variant "28 bit"}; + type integer Int29 (c_int29Min .. c_int29Max) with { variant "29 bit"}; + type integer Int30 (c_int30Min .. c_int30Max) with { variant "30 bit"}; + type integer Int31 (c_int31Min .. c_int31Max) with { variant "31 bit"}; + type integer Int32 (c_int32Min .. c_int32Max) with { variant "32 bit"}; } // end group signedIntegerDefintions diff --git a/ttcn/patch_lib_common_titan/LibCommon_DataStrings.ttcn b/ttcn/patch_lib_common_titan/ttcn/LibCommon_DataStrings.ttcn similarity index 100% rename from ttcn/patch_lib_common_titan/LibCommon_DataStrings.ttcn rename to ttcn/patch_lib_common_titan/ttcn/LibCommon_DataStrings.ttcn diff --git a/ttcn/patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn b/ttcn/patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn index 7b95770..5b2ae66 100644 --- a/ttcn/patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn +++ b/ttcn/patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn @@ -1,7 +1,7 @@ /** * @author ETSI - * @version $URL: https://oldforge.etsi.org/svn/LibCommon/tags/v1.4.0/ttcn/LibCommon_Sync.ttcn $ - * $Id: LibCommon_Sync.ttcn 66 2017-03-06 09:59:41Z filatov $ + * @version $URL$ + * $Id$ * @desc This module implements _one_ generic synchronization mechanism * for TTCN-3 test cases with one or more test components. * Key concept is here that one test component acts as a diff --git a/virtualization/docker-dev/Dockerfile.stfubuntu b/virtualization/docker-dev/Dockerfile.stfubuntu index 57104b3..9fa6645 100644 --- a/virtualization/docker-dev/Dockerfile.stfubuntu +++ b/virtualization/docker-dev/Dockerfile.stfubuntu @@ -1,7 +1,6 @@ FROM ubuntu:20.04 -MAINTAINER ETSI STF - +LABEL ETSI CTI LABEL description="STF Docker Ubuntu image" ENV TERM=linux \ @@ -10,11 +9,8 @@ ENV TERM=linux \ RUN echo "docker-STF-dev" > /etc/hostname \ && DEBIAN_FRONTEND=noninteractive apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y \ - && DEBIAN_FRONTEND=noninteractive apt-get install software-properties-common -y \ - && DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:linuxuprising/java -y \ && DEBIAN_FRONTEND=noninteractive apt-get update \ - && ( echo "oracle-java17-installer shared/accepted-oracle-license-v1-3 boolean true" | debconf-set-selections -v ) \ - && DEBIAN_FRONTEND=noninteractive apt-get --allow-unauthenticated install -y \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y \ autoconf \ bison \ build-essential \ @@ -25,10 +21,9 @@ RUN echo "docker-STF-dev" > /etc/hostname \ emacs \ expect \ flex \ - g++-8 \ - gcc-8 \ - gdb \ - git-core \ + g++-9 \ + gcc-9 \ + git \ gnutls-bin \ graphviz \ iputils-ping \ @@ -40,43 +35,27 @@ RUN echo "docker-STF-dev" > /etc/hostname \ libjsoncpp-dev \ libncurses5-dev \ libpcap-dev \ - libqt5svg5-dev \ - libreadline-dev \ libssl-dev \ libtool-bin \ libtool \ - libwireshark-dev \ libxml2-dev \ libxml2-utils \ libyaml-dev \ lsof \ - net-tools \ ntp \ - oracle-java17-installer \ - oracle-java17-set-default \ openssh-server \ pkg-config \ python3-dev \ python3-pip \ python3-setuptools \ - qt5-default \ - qtmultimedia5-dev \ - subversion \ sudo \ sshpass \ tcpdump \ texlive-font-utils \ - texlive-latex-base \ texlive-latex-extra \ - tshark \ tzdata \ valgrind \ - vim \ - vsftpd \ xutils-dev \ - tree \ - unzip \ - wget \ xsltproc \ && DEBIAN_FRONTEND=noninteractive apt-get autoremove --purge -y \ && DEBIAN_FRONTEND=noninteractive apt-get autoclean \ -- GitLab From e7746012b75bf622caf8bc6569bfa2ac7e72eb9a Mon Sep 17 00:00:00 2001 From: garciay Date: Thu, 6 Jul 2023 18:28:22 +0200 Subject: [PATCH 16/58] Bug fixed in install.sh --- Makefile | 2 +- config.mk | 3 ++- install.sh | 4 ++-- titan-test-system-framework | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 80b364a..62e6da4 100644 --- a/Makefile +++ b/Makefile @@ -123,7 +123,7 @@ $(cc_objects) : $(outdir)/%.o : %.cc $(gen_sources): $(outdir)/.generate $(outdir)/.generate: Makefile $(tt_sources) - $(TTCN3_DIR)/bin/compiler -b -d -e -f -g -l -L -M -n -O -r -R -U none -x -X -o $(outdir) $(tt_sources) + $(TTCN3_DIR)/bin/compiler $(TTCN3_COMPILER_OPTIONS) -o $(outdir) $(tt_sources) touch $@ $(foreach S, $(ttcn_sources), $(eval $(outdir)/$(notdir $(patsubst %.ttcn, %.cc, $(S))): $(S))) diff --git a/config.mk b/config.mk index 66a7380..d5d4014 100644 --- a/config.mk +++ b/config.mk @@ -1,4 +1,5 @@ -#TTCN3_DIR := /cygdrive/c/Tools/Titan +TTCN3_COMPILER_OPTIONS := -b -d -e -f -g -l -L -M -n -O -r -R -U none -x -X +TTCN3_DIR := $(HOME)/frameworks/titan/titan.core/Install #WPCAP_DLL_PATH := /cygdrive/c/windows/system32/npcap/wpcap.dll #NPCAP_INCLUDE := /cygdrive/c/PROGRA~1/Npcap/sdk/include T3Q_PATH=./tools/t3q-v2.0.0b30 diff --git a/install.sh b/install.sh index 98a0865..c8048c9 100755 --- a/install.sh +++ b/install.sh @@ -7,9 +7,9 @@ BASE_PATH=`pwd` git submodule update --init --recursive --remote -if [ ! -f ./titan-test-system-framework ] +if [ ! -d ./titan-test-system-framework ] then - git clone --recurse-submodules --single-branch --branch devel https://labs.etsi.org/rep/cti-tools/titan-test-system-framework.git + git clone --recurse-submodules --branch devel https://labs.etsi.org/rep/cti-tools/titan-test-system-framework.git cd ./titan-test-system-framework else cd ./titan-test-system-framework diff --git a/titan-test-system-framework b/titan-test-system-framework index 554d6b6..524df4e 160000 --- a/titan-test-system-framework +++ b/titan-test-system-framework @@ -1 +1 @@ -Subproject commit 554d6b6b3ce1e51d88267a3c946cd30caac97a55 +Subproject commit 524df4ef9a2fed2c32c1d9166ebebdb51fa666ba -- GitLab From 4f034fd66264bbc65bf872afd27e1f6abde31eb4 Mon Sep 17 00:00:00 2001 From: garciay Date: Mon, 17 Jul 2023 10:15:39 +0200 Subject: [PATCH 17/58] Rebuild AtsMec with new typing --- .jenkins.sh | 14 +- ccsrc/Protocols/Json/json_codec.cc | 86 +-- .../AtsMec_Location_Mockoon.cf_ | 16 +- .../AtsMec_Location_Sandbox.cf_ | 14 +- .../AtsMec_Ams/AtsMec_Ams_TestControl.ttcn | 23 - ...ceApplicationInterfaceAPI_TestControl.ttcn | 24 +- ...leAndOperationGrantingAPI_TestControl.ttcn | 23 - .../AtsMec_LocationAPI_TestCases.ttcn | 416 +++++++-------- .../AtsMec_LocationAPI_TestControl.ttcn | 8 +- ttcn/AtsMec_Location/module.mk | 1 + .../ttcn/LocationAPI_Functions.ttcn | 353 +++++++------ .../LocationAPI/ttcn/LocationAPI_Pixits.ttcn | 18 +- .../ttcn/LocationAPI_Templates.ttcn | 496 +++++++++++++++--- .../ttcn/LocationAPI_TypesAndValues.ttcn | 77 +-- .../ttcn/TrafficManagementAPI_Functions.ttcn | 8 +- .../V2XInformationServiceAPI_Functions.ttcn | 63 +-- ...XInformationServiceAPI_TypesAndValues.ttcn | 2 +- .../WlanInformationAPI_TypesAndValues.ttcn | 1 - ttcn/LibMec/ttcn/LibMec_Pics.ttcn | 2 +- ttcn/LibMec/ttcn/LibMec_Pixits.ttcn | 12 +- .../ttcn/LibHttp_JsonMessageBodyTypes.ttcn | 19 +- .../ttcn/LibHttp_JsonTemplates.ttcn | 364 +++++++------ 22 files changed, 1180 insertions(+), 860 deletions(-) diff --git a/.jenkins.sh b/.jenkins.sh index 54e5a9f..260dfdf 100755 --- a/.jenkins.sh +++ b/.jenkins.sh @@ -10,8 +10,16 @@ cd $(dirname $0) run_dir=`pwd` # Docker version 2 -cd ./virtualization/docker +cd ./virtualization/docker-dev ./build.sh #--force-stfubuntu +ret_code=`echo $?` + +if [ $ret_code != 0 ] +then + cd $run_dir + exit -1 +fi + #./run.sh if [ "$1" == "--remove" ] @@ -19,4 +27,6 @@ then docker rmi --force mec_devel:latest fi -cd - +cd $run_dir + +exit 0 diff --git a/ccsrc/Protocols/Json/json_codec.cc b/ccsrc/Protocols/Json/json_codec.cc index 230da83..8d8bdec 100644 --- a/ccsrc/Protocols/Json/json_codec.cc +++ b/ccsrc/Protocols/Json/json_codec.cc @@ -20,26 +20,26 @@ int json_codec::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTE const UEidentityAPI__TypesAndValues::UeIdentityTagInfo& ue_identity_tag_info = msg.ueIdentityTagInfo(); ue_identity_tag_info.encode(UEidentityAPI__TypesAndValues::UeIdentityTagInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()); - } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_userTrackingSubscription)) { - const LocationAPI__TypesAndValues::UserTrackingSubscription& user_tracking_subscription = msg.userTrackingSubscription(); - user_tracking_subscription.encode(LocationAPI__TypesAndValues::UserTrackingSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = char2oct(CHARSTRING("{\"userTrackingSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); - } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_periodicNotificationSubscription)) { - const LocationAPI__TypesAndValues::PeriodicNotificationSubscription& periodic_notification_subscription = msg.periodicNotificationSubscription(); - periodic_notification_subscription.encode(LocationAPI__TypesAndValues::PeriodicNotificationSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = char2oct(CHARSTRING("{\"periodicNotificationSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); - } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_zonalTrafficSubscription)) { - const LocationAPI__TypesAndValues::ZonalTrafficSubscription& zonal_traffic_subscription = msg.zonalTrafficSubscription(); - zonal_traffic_subscription.encode(LocationAPI__TypesAndValues::ZonalTrafficSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = char2oct(CHARSTRING("{\"zonalTrafficSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); - } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_circleNotificationSubscription)) { - const LocationAPI__TypesAndValues::CircleNotificationSubscription& notif = msg.circleNotificationSubscription(); - notif.encode(LocationAPI__TypesAndValues::CircleNotificationSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = char2oct(CHARSTRING("{\"circleNotificationSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); - } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_distanceNotificationSubscription)) { - const LocationAPI__TypesAndValues::DistanceNotificationSubscription& notif = msg.distanceNotificationSubscription(); - notif.encode(LocationAPI__TypesAndValues::DistanceNotificationSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = char2oct(CHARSTRING("{\"distanceNotificationSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_userLocationEventSubscription)) { + const LocationAPI__TypesAndValues::UserLocationEventSubscription& user_location_event_subscription = msg.userLocationEventSubscription(); + user_location_event_subscription.encode(LocationAPI__TypesAndValues::UserLocationEventSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = char2oct(CHARSTRING("{\"userLocationEventSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_userLocationPeriodicSubscription)) { + const LocationAPI__TypesAndValues::UserLocationPeriodicSubscription& user_location_periodic_subscription = msg.userLocationPeriodicSubscription(); + user_location_periodic_subscription.encode(LocationAPI__TypesAndValues::UserLocationPeriodicSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = char2oct(CHARSTRING("{\"userLocationPeriodicSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_zoneLocationEventSubscription)) { + const LocationAPI__TypesAndValues::ZoneLocationEventSubscription& zone_location_event_subscription = msg.zoneLocationEventSubscription(); + zone_location_event_subscription.encode(LocationAPI__TypesAndValues::ZoneLocationEventSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = char2oct(CHARSTRING("{\"zoneLocationEventSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_userAreaSubscription)) { + const LocationAPI__TypesAndValues::UserAreaSubscription& notif = msg.userAreaSubscription(); + notif.encode(LocationAPI__TypesAndValues::UserAreaSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = char2oct(CHARSTRING("{\"userAreaSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_userDistanceSubscription)) { + const LocationAPI__TypesAndValues::UserDistanceSubscription& notif = msg.userDistanceSubscription(); + notif.encode(LocationAPI__TypesAndValues::UserDistanceSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = char2oct(CHARSTRING("{\"userDistanceSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_cellChangeSubscription)) { const RnisAPI__TypesAndValues::CellChangeSubscription& cell_change_subscription = msg.cellChangeSubscription(); cell_change_subscription.encode(RnisAPI__TypesAndValues::CellChangeSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); @@ -146,44 +146,44 @@ int json_codec::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes LocationAPI__TypesAndValues::AccessPointList access_point_list; access_point_list.decode(LocationAPI__TypesAndValues::AccessPointList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.accessPointList() = access_point_list; - } else if (it->second.find("\"userTrackingSubscription\"") != std::string::npos) { + } else if (it->second.find("\"userLocationEventSubscription\"") != std::string::npos) { int idx_begin = it->second.find(":"); int idx_end = it->second.rfind("}") - 1; // Remove the last '}' str = it->second.substr(idx_begin + 1, idx_end - idx_begin); TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - LocationAPI__TypesAndValues::UserTrackingSubscription user_tracking_subscription; - user_tracking_subscription.decode(LocationAPI__TypesAndValues::UserTrackingSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.userTrackingSubscription() = user_tracking_subscription; + LocationAPI__TypesAndValues::UserLocationEventSubscription user_location_event_subscription; + user_location_event_subscription.decode(LocationAPI__TypesAndValues::UserLocationEventSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.userLocationEventSubscription() = user_location_event_subscription; - } else if (it->second.find("\"periodicNotificationSubscription\"") != std::string::npos) { + } else if (it->second.find("\"userLocationPeriodicSubscription\"") != std::string::npos) { int idx_begin = it->second.find(":"); int idx_end = it->second.rfind("}") - 1; // Remove the last '}' str = it->second.substr(idx_begin + 1, idx_end - idx_begin); TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - LocationAPI__TypesAndValues::PeriodicNotificationSubscription periodic_notification_subscription; - periodic_notification_subscription.decode(LocationAPI__TypesAndValues::PeriodicNotificationSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.periodicNotificationSubscription() = periodic_notification_subscription; - } else if (it->second.find("\"zonalTrafficSubscription\"") != std::string::npos) { + LocationAPI__TypesAndValues::UserLocationPeriodicSubscription user_location_periodic_subscription; + user_location_periodic_subscription.decode(LocationAPI__TypesAndValues::UserLocationPeriodicSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.userLocationPeriodicSubscription() = user_location_periodic_subscription; + } else if (it->second.find("\"zoneLocationEventSubscription\"") != std::string::npos) { int idx_begin = it->second.find(":"); int idx_end = it->second.rfind("}") - 1; // Remove the last '}' str = it->second.substr(idx_begin + 1, idx_end - idx_begin); TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - LocationAPI__TypesAndValues::ZonalTrafficSubscription zonal_traffic_subscription; - zonal_traffic_subscription.decode(LocationAPI__TypesAndValues::ZonalTrafficSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.zonalTrafficSubscription() = zonal_traffic_subscription; - } else if (it->second.find("\"periodicTrackingSubscription\"") != std::string::npos) { + LocationAPI__TypesAndValues::ZoneLocationEventSubscription zone_location_event_subscription; + zone_location_event_subscription.decode(LocationAPI__TypesAndValues::ZoneLocationEventSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.zoneLocationEventSubscription() = zone_location_event_subscription; + } else if (it->second.find("\"userLocationPeriodicSubscription\"") != std::string::npos) { int idx_begin = it->second.find(":"); int idx_end = it->second.rfind("}") - 1; // Remove the last '}' str = it->second.substr(idx_begin + 1, idx_end - idx_begin); TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - LocationAPI__TypesAndValues::PeriodicTrackingSubscription periodic_tracking_subscription; - periodic_tracking_subscription.decode(LocationAPI__TypesAndValues::PeriodicTrackingSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.periodicTrackingSubscription() = periodic_tracking_subscription; + LocationAPI__TypesAndValues::UserLocationPeriodicSubscription periodic_tracking_subscription; + periodic_tracking_subscription.decode(LocationAPI__TypesAndValues::UserLocationPeriodicSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.userLocationPeriodicSubscription() = periodic_tracking_subscription; } else if (it->second.find("\"accessPointId\"") != std::string::npos) { LocationAPI__TypesAndValues::UserInfo user_info; user_info.decode(LocationAPI__TypesAndValues::UserInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); @@ -201,17 +201,17 @@ int json_codec::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes int idx_end = it->second.rfind("}") - 1; // Remove the last '}' str = it->second.substr(idx_begin + 1, idx_end - idx_begin); TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - LocationAPI__TypesAndValues::CircleNotificationSubscription notif; - notif.decode(LocationAPI__TypesAndValues::CircleNotificationSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.circleNotificationSubscription() = notif; - } else if (it->second.find("\"distanceNotificationSubscription\"") != std::string::npos) { + LocationAPI__TypesAndValues::UserAreaSubscription notif; + notif.decode(LocationAPI__TypesAndValues::UserAreaSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.userAreaSubscription() = notif; + } else if (it->second.find("\"userDistanceSubscription\"") != std::string::npos) { int idx_begin = it->second.find(":"); int idx_end = it->second.rfind("}") - 1; // Remove the last '}' str = it->second.substr(idx_begin + 1, idx_end - idx_begin); TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - LocationAPI__TypesAndValues::DistanceNotificationSubscription notif; - notif.decode(LocationAPI__TypesAndValues::DistanceNotificationSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.distanceNotificationSubscription() = notif; + LocationAPI__TypesAndValues::UserDistanceSubscription notif; + notif.decode(LocationAPI__TypesAndValues::UserDistanceSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.userDistanceSubscription() = notif; } else if (it->second.find("\"ueIdentityTagInfo\"") != std::string::npos) { UEidentityAPI__TypesAndValues::UeIdentityTagInfo ue_identity_tag_info; ue_identity_tag_info.decode(UEidentityAPI__TypesAndValues::UeIdentityTagInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); diff --git a/etc/AtsMec_Location/AtsMec_Location_Mockoon.cf_ b/etc/AtsMec_Location/AtsMec_Location_Mockoon.cf_ index 52e927a..292a40d 100644 --- a/etc/AtsMec_Location/AtsMec_Location_Mockoon.cf_ +++ b/etc/AtsMec_Location/AtsMec_Location_Mockoon.cf_ @@ -313,16 +313,16 @@ AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_0 #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_BR # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_NF -# Check that the IUT acknowledges the UE location change subscription request when commanded by a MEC Application and notifies it when the location changes -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_BR +# Check that the IUT acknowledges the subscription by a MEC Application to notifications user location event +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_BR_01 # Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_002_OK # Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_002_NF -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UETRACKSUB_001_OK +# Check that the IUT acknowledges the subscription by a MEC Application to notifications user location periodic +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02 # Check that the IUT acknowledges the UE location change subscription request when commanded by a MEC Application and notifies it when the UE changes location #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UETRACKSUB_001_BR # Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application @@ -335,7 +335,7 @@ AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_0 #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_BR # Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_NF -# Check that the IUT acknowledges the UE information change subscription request when commanded by a MEC Application and notifies it when the location changes +# Check that the IUT responds with a list zones when queried by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFSUB_001_OK # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFSUB_001_BR @@ -348,7 +348,7 @@ AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_0 # Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_RLOCLOOK_001_NF # Check that the IUT acknowledges the UE area change subscription request when commanded by a MEC Application and notifies it when the UE enters the specified circle -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_001_OK +#AtsMec_LocationAPI_TestCases.TP_MEC_MEC013_SRV_UEAREASUB_001_OK # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_001_BR # Check that the IUT acknowledges the cancellation of UE area change notifications when commanded by a MEC Application diff --git a/etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ b/etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ index b9c2f57..8de3d45 100644 --- a/etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ +++ b/etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ @@ -82,16 +82,16 @@ AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_OK #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_BR # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_NF -# Check that the IUT acknowledges the UE location change subscription request when commanded by a MEC Application and notifies it when the location changes +# Check that the IUT acknowledges the subscription by a MEC Application to notifications user location event #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_BR +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_BR_01 # Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_002_OK # Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_002_NF -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UETRACKSUB_001_OK +# Check that the IUT acknowledges the subscription by a MEC Application to notifications user location periodic +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02 # Check that the IUT acknowledges the UE location change subscription request when commanded by a MEC Application and notifies it when the UE changes location #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UETRACKSUB_001_BR # Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application @@ -104,7 +104,7 @@ AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_OK #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_BR # Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_NF -# Check that the IUT acknowledges the UE information change subscription request when commanded by a MEC Application and notifies it when the location changes +# Check that the IUT responds with a list zones when queried by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFSUB_001_OK # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFSUB_001_BR @@ -117,7 +117,7 @@ AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_OK # Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_RLOCLOOK_001_NF # Check that the IUT acknowledges the UE area change subscription request when commanded by a MEC Application and notifies it when the UE enters the specified circle -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_001_OK +#AtsMec_LocationAPI_TestCases.TP_MEC_MEC013_SRV_UEAREASUB_001_OK # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_001_BR # Check that the IUT acknowledges the cancellation of UE area change notifications when commanded by a MEC Application diff --git a/ttcn/AtsMec/AtsMec_Ams/AtsMec_Ams_TestControl.ttcn b/ttcn/AtsMec/AtsMec_Ams/AtsMec_Ams_TestControl.ttcn index 4c74736..9aace58 100644 --- a/ttcn/AtsMec/AtsMec_Ams/AtsMec_Ams_TestControl.ttcn +++ b/ttcn/AtsMec/AtsMec_Ams/AtsMec_Ams_TestControl.ttcn @@ -17,7 +17,6 @@ module AtsMec_TestControl { import from LibMec_Pics all; // AtsMec - import from AtsMec_LocationAPI_TestCases all; import from AtsMec_UEidentityAPI_TestCases all; // import from AtsMec_RadioNodeLocationAPI_TestCases all; import from AtsMec_RnisAPI_TestCases all; @@ -37,28 +36,6 @@ module AtsMec_TestControl { execute(TC_MEC_MEC014_SRV_UETAG_002_PF()); } if (PICS_LOCATION_API_SUPPORTED) { - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_OK()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_BR()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_NF()); - - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_002_NF()); - - execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_NF()); - - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK()); - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_BR()); - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_NF()); - - execute(TC_MEC_MEC013_SRV_UEINFSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_002_NF()); // execute(TC_MEC_PLAT_RLOC_001_OK()); // execute(TC_MEC_PLAT_RLOC_001_NF()); diff --git a/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn b/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn index 4c74736..cb02a26 100644 --- a/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn +++ b/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn @@ -17,7 +17,6 @@ module AtsMec_TestControl { import from LibMec_Pics all; // AtsMec - import from AtsMec_LocationAPI_TestCases all; import from AtsMec_UEidentityAPI_TestCases all; // import from AtsMec_RadioNodeLocationAPI_TestCases all; import from AtsMec_RnisAPI_TestCases all; @@ -37,28 +36,7 @@ module AtsMec_TestControl { execute(TC_MEC_MEC014_SRV_UETAG_002_PF()); } if (PICS_LOCATION_API_SUPPORTED) { - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_OK()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_BR()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_NF()); - - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_002_NF()); - - execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_NF()); - - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK()); - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_BR()); - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_NF()); - - execute(TC_MEC_MEC013_SRV_UEINFSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_002_NF()); + // execute(TC_MEC_PLAT_RLOC_001_OK()); // execute(TC_MEC_PLAT_RLOC_001_NF()); diff --git a/ttcn/AtsMec/AtsMec_LcRRm/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn b/ttcn/AtsMec/AtsMec_LcRRm/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn index 4c74736..9aace58 100644 --- a/ttcn/AtsMec/AtsMec_LcRRm/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn +++ b/ttcn/AtsMec/AtsMec_LcRRm/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn @@ -17,7 +17,6 @@ module AtsMec_TestControl { import from LibMec_Pics all; // AtsMec - import from AtsMec_LocationAPI_TestCases all; import from AtsMec_UEidentityAPI_TestCases all; // import from AtsMec_RadioNodeLocationAPI_TestCases all; import from AtsMec_RnisAPI_TestCases all; @@ -37,28 +36,6 @@ module AtsMec_TestControl { execute(TC_MEC_MEC014_SRV_UETAG_002_PF()); } if (PICS_LOCATION_API_SUPPORTED) { - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_OK()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_BR()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_NF()); - - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_002_NF()); - - execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_NF()); - - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK()); - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_BR()); - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_NF()); - - execute(TC_MEC_MEC013_SRV_UEINFSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_002_NF()); // execute(TC_MEC_PLAT_RLOC_001_OK()); // execute(TC_MEC_PLAT_RLOC_001_NF()); diff --git a/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn index 58ee7f9..20105f0 100644 --- a/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn +++ b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn @@ -1,5 +1,5 @@ /** - * @author ETSI / STF569 + * @author ETSI / STF569 / TTF T027 * @version $URL:$ * $ID:$ * @desc This module provides the MEC test cases. @@ -37,8 +37,6 @@ module AtsMec_LocationAPI_TestCases { /** * @desc Check that the IUT responds with a list for the location of User Equipments when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELOC/PlatUeLocationLookup.tplan2 - * @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo */ testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -61,7 +59,7 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")), + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, v_headers ) ) @@ -216,10 +214,9 @@ module AtsMec_LocationAPI_TestCases { group ueLocSub { /** - * @desc Check that the IUT acknowledges the UE location change subscription request when commanded by a MEC Application and notifies it when the location changes - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UELOCSUB/PlatUeLocationSubscription.tplan2 + * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications user location event */ - testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; @@ -241,20 +238,15 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LOC_SUB_URI, + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_user_tracking_subscription( - m_user_tracking_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_USER - ) - ) - ) - ) - ) - ); + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + PX_CLIENT_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -264,12 +256,13 @@ module AtsMec_LocationAPI_TestCases { mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_user_tracking_subscription( - mw_user_tracking_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_USER - )))))) -> value v_response { + mw_body_json_user_location_event_subscription( + mw_user_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + -, + PX_CLIENT_ID + )))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a callbackURL ***"); @@ -282,15 +275,14 @@ module AtsMec_LocationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_user_tracking_subscription(v_response.response.body.json_body.userTrackingSubscription); + f_delete_user_location_event_subscription(v_response.response.body.json_body.userLocationEventSubscription); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01 /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UELOCSUB/PlatUeLocationSubscription.tplan2 + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided */ - testcase TC_MEC_MEC013_SRV_UELOCSUB_001_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UELOCSUB_001_BR_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; @@ -311,20 +303,14 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LOC_SUB_URI & "_Invalid", + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_user_tracking_subscription( - m_user_tracking_subscription( - PX_CLIENT_ID_UNKNOWN, - PX_CALLBACK_REF_URL, - PX_USER_UNKNOWN - ) - ) - ) - ) - ) - ); + m_body_json_user_location_event_subscription( + m_user_location_event_subscription_error( + PX_USER, + PX_CLIENT_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -347,7 +333,7 @@ module AtsMec_LocationAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_BR + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_BR_01 /** * @desc Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application @@ -355,7 +341,7 @@ module AtsMec_LocationAPI_TestCases { */ testcase TC_MEC_MEC013_SRV_UELOCSUB_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables - var UserTrackingSubscription v_user_tracking_subscription; + var UserLocationEventSubscription v_userLocationEventSubscription; var Headers v_headers; var charstring v_uri; @@ -372,10 +358,10 @@ module AtsMec_LocationAPI_TestCases { // Test adapter configuration // Preamble - f_create_user_tracking_subscription(v_user_tracking_subscription); + f_create_user_location_event_subscription(v_userLocationEventSubscription); v_uri :=regexp( - oct2char(unichar2oct(v_user_tracking_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_USERS_LOC_SUB_URI & "/(?*)", + oct2char(unichar2oct(v_userLocationEventSubscription.links_.self_.href)), + "?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)", 0 ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -385,7 +371,7 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LOC_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_uri, v_headers ) ) @@ -436,7 +422,7 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LOC_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ) ) @@ -467,13 +453,12 @@ module AtsMec_LocationAPI_TestCases { } // End of group ueLocSub - group ueTrackSub { + group ueLocPeriodicSub { /** - * @desc Check that the IUT acknowledges the UE location change subscription request when commanded by a MEC Application and notifies it when the UE changes location - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UETRACKSUB/PlatUeTrackingSubscription.tplan2 + * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications user location periodic */ - testcase TC_MEC_MEC013_SRV_UETRACKSUB_001_OK() runs on HttpComponent system HttpTestAdapter { + testcase TP_MEC_MEC013_SRV_UELOCSUB_001_OK_02() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; @@ -495,16 +480,14 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_USERS_TRACK_SUB_URI, + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_periodic_notification_subscription( - m_periodic_notification_subscription( - { PX_IP_ADDRESS }, - PX_CALLBACK_REF_URL, - -, -, - PX_USER - )))))); + m_body_json_user_location_periodic_subscription( + m_user_location_periodic_subscription( + PX_CALLBACK_REF_URL, + PX_USER + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -514,14 +497,11 @@ module AtsMec_LocationAPI_TestCases { mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_periodic_notification_subscription( - mw_periodic_notification_subscription( - { PX_IP_ADDRESS }, - PX_CALLBACK_REF_URL, - -, -, - PX_USER, - ? - )))))) -> value v_response { + mw_body_json_user_location_periodic_subscription( + mw_user_location_periodic_subscription( + PX_CALLBACK_REF_URL, + PX_USER + )))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a callbackURL ***"); @@ -534,9 +514,9 @@ module AtsMec_LocationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_periodic_notification_subscription(v_response.response.body.json_body.periodicNotificationSubscription); + f_delete_user_location_periodic_subscription(v_response.response.body.json_body.userLocationPeriodicSubscription); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UETRACKSUB_001_OK + } // End of testcase TP_MEC_MEC013_SRV_UELOCSUB_001_OK_02 /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application @@ -563,20 +543,15 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "_Invalid", + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "_Invalid", v_headers, m_http_message_body_json( - m_body_json_user_tracking_subscription( - m_user_tracking_subscription( - PX_CLIENT_ID_UNKNOWN, - PX_CALLBACK_REF_URL, - PX_USER - ) - ) - ) - ) - ) - ); + m_body_json_user_location_periodic_subscription( + m_user_location_periodic_subscription( + PX_CALLBACK_REF_URL, + PX_CLIENT_ID_UNKNOWN, + PX_USER + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -608,7 +583,7 @@ module AtsMec_LocationAPI_TestCases { testcase TC_MEC_MEC013_SRV_UETRACKSUB_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var PeriodicNotificationSubscription v_position_notification_subscription; + var UserLocationPeriodicSubscription v_position_notification_subscription; var charstring v_uri; // Test control @@ -624,17 +599,17 @@ module AtsMec_LocationAPI_TestCases { // Test adapter configuration // Preamble - f_create_periodic_notification_subscription(v_position_notification_subscription); + f_create_user_location_periodic_subscription(v_position_notification_subscription); v_uri := regexp( - oct2char(unichar2oct(v_position_notification_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "/(?*)", + oct2char(unichar2oct(v_position_notification_subscription.links_.self_.href)), + "?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)", 0 ); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_uri, v_headers ) ) @@ -688,7 +663,7 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ) ) @@ -717,7 +692,7 @@ module AtsMec_LocationAPI_TestCases { f_cf_01_http_down(); } // End of testcase TC_MEC_MEC013_SRV_UETRACKSUB_002_NF - } // End of group ueTrackSub + } // End of group ueLocPeriodicSub group ueInfLook { @@ -916,20 +891,15 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_USERS_INF_SUB_URI, + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_zonal_traffic_subscription( - m_zonal_traffic_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_ZONE_ID - ) - ) - ) - ) - ) - ); + m_body_json_zone_location_event_subscription( + m_zone_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_CLIENT_ID, + PX_ZONE_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -939,12 +909,12 @@ module AtsMec_LocationAPI_TestCases { mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_zonal_traffic_subscription( - mw_zonal_traffic_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_ZONE_ID - )))))) -> value v_response { + mw_body_json_zone_location_event_subscription( + mw_zone_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_CLIENT_ID, + PX_ZONE_ID + )))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a callbackURL ***"); @@ -957,7 +927,7 @@ module AtsMec_LocationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_zonal_traffic_subscription(v_response.response.body.json_body.zonalTrafficSubscription); + f_delete_zone_location_event_subscription(v_response.response.body.json_body.zoneLocationEventSubscription); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC013_SRV_UEINFSUB_001_OK @@ -986,11 +956,11 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & "/invilad/" & PX_ME_APP_Q_USERS_INF_SUB_URI, + PICS_ROOT_API & "/invilad/" & PX_LOC_API_ZONES_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_zonal_traffic_subscription( - m_zonal_traffic_subscription( + m_body_json_zone_location_event_subscription( + m_zone_location_event_subscription( PX_CLIENT_ID, PX_CALLBACK_REF_URL, PX_ZONE_ID @@ -1030,7 +1000,7 @@ module AtsMec_LocationAPI_TestCases { testcase TC_MEC_MEC013_SRV_UEINFSUB_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var ZonalTrafficSubscription v_zonal_traffic_subscription; + var ZoneLocationEventSubscription v_zone_location_event_subscription; var charstring v_uri; // Test control @@ -1046,17 +1016,17 @@ module AtsMec_LocationAPI_TestCases { // Test adapter configuration // Preamble - f_create_zonal_traffic_subscription(v_zonal_traffic_subscription); + f_create_zone_location_event_subscription(v_zone_location_event_subscription); v_uri := regexp( - oct2char(unichar2oct(v_zonal_traffic_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_USERS_INF_SUB_URI & "/(?*)", + oct2char(unichar2oct(v_zone_location_event_subscription.links_.self_.href)), + "?+" & PX_LOC_API_ZONES_SUB_URI & "/(?*)", 0 ); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_INF_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & v_uri, v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -1108,7 +1078,7 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_INF_SUB_URI & "/" & oct2char(unichar2oct(PX_USER_UNKNOWN, "UTF-8")), + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & oct2char(unichar2oct(PX_USER_UNKNOWN, "UTF-8")), v_headers ) ) @@ -1267,9 +1237,9 @@ module AtsMec_LocationAPI_TestCases { group ueAreaSubscribe { /** - * @desc Check that the IUT acknowledges the UE area change subscription request when commanded by a MEC Application and notifies it when the UE enters the specified circle + * @desc Check that the IUT acknowledges the creation of UE area subscription request when commanded by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UEAREASUB_001_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEAREASUB_001_OK_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; @@ -1291,20 +1261,23 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_AREA_SUB_URI, + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_circle_notification_subscription( - m_circle_notification_subscription( - PX_CLIENT_ID, //clientCorrelator - PX_AREA_SUB_CALLBACK_URI, // callbackReference - { PX_IP_ADDRESS } // address - ) - ) - ) - ) - ) - ); + m_body_json_user_area_subscription( + m_user_area_subscription( + PX_AREA_SUB_CALLBACK_URI, // callbackReference + PX_USER, + m_area_info( + ELLIPSOID_POINT_UNCERT_CIRCLE, + { + m_point({PX_UE_COORD_LAT}, {PX_UE_COORD_LONG}) + }, + PX_RADIUS + ), + PX_TRACKIMNG_ACCURACY, + PX_CLIENT_ID //clientCorrelator + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1314,25 +1287,23 @@ module AtsMec_LocationAPI_TestCases { mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_circle_notification_subscription( - mw_circle_notification_subscription( - PX_CLIENT_ID )))))) -> value v_response { - // TODO how to send this when the UE enters the area? The TP has the IUT doing this immediately. Do we want this or will it be discarded as part of the test? -// // MEC 013, clause 7.3.11.3 -// the IUT entity sends a vPOST containing, -// uri indicating value CALLBACK_URL -// body containing -// subscriptionNotification containing -// terminalLocation containing -// address set to IP_ADDRESS -// ; -// ; -// ; -// ; -// to the MEC_APP entity + mw_body_json_user_area_subscription( + mw_user_area_subscription( + PX_AREA_SUB_CALLBACK_URI, // callbackReference + -, -, + mw_area_info( + ELLIPSOID_POINT_UNCERT_CIRCLE, + { + m_point({PX_UE_COORD_LAT}, {PX_UE_COORD_LONG}) + }, + PX_RADIUS + ), + PX_TRACKIMNG_ACCURACY, + PX_CLIENT_ID //clientCorrelator + )))))) -> value v_response { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a circleNotificationSubscription ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userAreaSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1342,9 +1313,9 @@ module AtsMec_LocationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_circle_notification_subscription(v_response.response.body.json_body.circleNotificationSubscription); + f_delete_user_area_subscription(v_response.response.body.json_body.userAreaSubscription); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_001_OK + } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_001_OK_01 /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application @@ -1370,20 +1341,23 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_AREA_SUB_URI, + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_circle_notification_subscription( - m_circle_notification_subscription( - PX_CLIENT_ID_UNKNOWN, //clientCorrelator - PX_AREA_SUB_CALLBACK_URI, // callbackReference - { PX_IP_ADDRESS } // address - ) - ) - ) - ) - ) - ); + m_body_json_user_area_subscription( + m_user_area_subscription( + PX_AREA_SUB_CALLBACK_URI, // callbackReference + PX_USER, + m_area_info( + ELLIPSOID_POINT_UNCERT_CIRCLE, + { + m_point({PX_UE_COORD_LAT}, {PX_UE_COORD_LONG}) + } + // No radius + ), + PX_TRACKIMNG_ACCURACY, + PX_CLIENT_ID //clientCorrelator + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1414,7 +1388,7 @@ module AtsMec_LocationAPI_TestCases { testcase TC_MEC_MEC013_SRV_UEAREASUB_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var CircleNotificationSubscription v_circle_notification_subscription; + var UserAreaSubscription v_user_area_subscription; var charstring v_uri; // Test control @@ -1431,16 +1405,16 @@ module AtsMec_LocationAPI_TestCases { // Preamble f_init_default_headers_list(-, -, v_headers); - f_create_circle_notification_subscription(v_circle_notification_subscription); + f_create_user_area_subscription(v_user_area_subscription); v_uri := regexp( - oct2char(unichar2oct(v_circle_notification_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_AREA_SUB_URI & "/(?*)", + oct2char(unichar2oct(v_user_area_subscription.links_.self_.href)), + "?+" & PX_LOC_API_AREA_SUB_URI & "/(?*)", 0 ); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_AREA_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & v_uri, v_headers ) ) @@ -1494,7 +1468,7 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_AREA_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ) ) @@ -1673,19 +1647,20 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_DIST_URI, + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_distance_notification_subscription( - m_distance_notification_subscription( - PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference - -, // checkImmediate - PX_CLIENT_ID, //clientCorrelator - -, // criteria - 10.0, // distance - -, - { PX_UE_MONITORED_IP_ADDRESS } // monitoredAddress - )))))); + m_body_json_user_distance_subscription( + m_user_distance_subscription( + PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference + PX_USER, + { PX_UE_MONITORED_IP_ADDRESS }, // monitoredAddress + PX_DISTANCE, + PX_TRACKIMNG_ACCURACY, + AllWithinDistance, + -, // checkImmediate + PX_CLIENT_ID //clientCorrelator + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1695,31 +1670,21 @@ module AtsMec_LocationAPI_TestCases { mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_distance_notification_subscription( - mw_distance_notification_subscription( - PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference - -, - PX_CLIENT_ID, //clientCorrelator - -, -, -, - { PX_UE_MONITORED_IP_ADDRESS } // monitoredAddress - )))))) -> value v_response { - // TODO how to send this when the UE enters the area? The TP has the IUT doing this immediately. Do we want this or will it be discarded as part of the test? -// - // MEC 013, clause 7.3.11.3 -// the IUT entity sends a vPOST containing, // uri indicating value CALLBACK_URL -// body containing -// subscriptionNotification containing -// terminalLocation containing -// address set to IP_ADDRESS -// ; -// ; -// ; -// ; -// to the MEC_APP entity - + mw_body_json_user_distance_subscription( + mw_user_distance_subscription( + PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference + -, + PX_USER, + { PX_UE_MONITORED_IP_ADDRESS }, // monitoredAddressPX_CLIENT_ID, //clientCorrelator + PX_DISTANCE, + PX_TRACKIMNG_ACCURACY, + AllWithinDistance, + -, // checkImmediate + PX_CLIENT_ID //clientCorrelator + )))))) -> value v_response { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a circleNotificationSubscription ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userDistanceSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1729,7 +1694,7 @@ module AtsMec_LocationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_distance_notification_subscription(v_response.response.body.json_body.distanceNotificationSubscription); + f_delete_user_distance_subscription(v_response.response.body.json_body.userDistanceSubscription); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_OK @@ -1757,27 +1722,20 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_DIST_URI & "_INVALID", + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI & "_INVALID", v_headers, m_http_message_body_json( - m_body_json_distance_notification_subscription( - // TODO the TP uses a wrong field name to trigger an error response. Do we create a new data structure just for this or - // change the test to use another trigger (e.g.: invalid IP address)? - m_distance_notification_subscription( - PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference - -, // checkImmediate - PX_CLIENT_ID, //clientCorrelator - -, // criteria - 10.0, // distance - -, // frequency - { PX_UE_MONITORED_IP_ADDRESS }, // monitoredAddress - { PX_IP_ADDRESS } // referenceAddress - ) - ) - ) - ) - ) - ); + m_body_json_user_distance_subscription( + m_user_distance_subscription( + PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference + PX_USER, + { }, // monitoredAddress is empty + PX_DISTANCE, + PX_TRACKIMNG_ACCURACY, + AllWithinDistance, + -, // checkImmediate + PX_CLIENT_ID //clientCorrelator + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1809,7 +1767,7 @@ module AtsMec_LocationAPI_TestCases { testcase TC_MEC_MEC013_SRV_UEDISTSUB_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var DistanceNotificationSubscription v_distance_notification_subscription; + var UserDistanceSubscription v_user_distance_subscription; var charstring v_uri; // Test control @@ -1826,16 +1784,16 @@ module AtsMec_LocationAPI_TestCases { // Preamble f_init_default_headers_list(-, -, v_headers); - f_create_distance_notification_subscription(v_distance_notification_subscription); + f_create_user_distance_subscription(v_user_distance_subscription); v_uri := regexp( - oct2char(unichar2oct(v_distance_notification_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_DIST_URI & "/(?*)", + oct2char(unichar2oct(v_user_distance_subscription.links_.self_.href)), + "?+" & PX_LOC_API_DISTANCE_SUB_URI & "/(?*)", 0 ); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_DIST_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI & "/" & v_uri, v_headers ) ) @@ -1889,7 +1847,7 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_DIST_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ) ) diff --git a/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn index aef4802..fb4852e 100644 --- a/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn +++ b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn @@ -17,12 +17,12 @@ module AtsMec_LocationAPI_TestControl { execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_BR()); execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_NF()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR_01()); execute(TC_MEC_MEC013_SRV_UELOCSUB_002_OK()); execute(TC_MEC_MEC013_SRV_UELOCSUB_002_NF()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_OK()); + execute(TP_MEC_MEC013_SRV_UELOCSUB_001_OK_02()); execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_BR()); execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_OK()); execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_NF()); @@ -35,6 +35,8 @@ module AtsMec_LocationAPI_TestControl { execute(TC_MEC_MEC013_SRV_UEINFSUB_001_BR()); execute(TC_MEC_MEC013_SRV_UEINFSUB_002_OK()); execute(TC_MEC_MEC013_SRV_UEINFSUB_002_NF()); + + execute(TC_MEC_MEC013_SRV_UEAREASUB_001_OK_01()); } } } // End of 'control' statement diff --git a/ttcn/AtsMec_Location/module.mk b/ttcn/AtsMec_Location/module.mk index 8232228..f34f292 100644 --- a/ttcn/AtsMec_Location/module.mk +++ b/ttcn/AtsMec_Location/module.mk @@ -7,6 +7,7 @@ sources := \ modules := ../LibCommon \ ../../titan-test-system-framework/ttcn/LibHelpers \ ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ ../../titan-test-system-framework/ttcn/LibJson \ ../patch_lib_http \ ../LibMec \ diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn index 6035b6a..e783c0b 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn @@ -37,9 +37,9 @@ module LocationAPI_Functions { import from LibMec_Pics all; import from LibMec_Pixits all; - function f_create_user_tracking_subscription( - out UserTrackingSubscription p_user_tracking_subscription - ) runs on HttpComponent { + function f_create_user_location_event_subscription( + out UserLocationEventSubscription p_user_location_event_subscription + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -47,47 +47,46 @@ module LocationAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LOC_SUB_URI, + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_user_tracking_subscription( - m_user_tracking_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_USER - )))))); + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_USER + )))))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_user_tracking_subscription( - mw_user_tracking_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_USER - )))))) -> value v_response { + mw_body_json_user_location_event_subscription( + mw_user_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_USER + )))))) -> value v_response { tc_ac.stop; - p_user_tracking_subscription := v_response.response.body.json_body.userTrackingSubscription; - log("f_create_user_tracking_subscription: INFO: IUT successfully responds to the subscription: ", p_user_tracking_subscription); + // FIXME Extract HTTP Location header + p_user_location_event_subscription := v_response.response.body.json_body.userLocationEventSubscription; + log("f_create_user_location_event_subscription: INFO: IUT successfully responds to the subscription: ", p_user_location_event_subscription); } [] tc_ac.timeout { - log("f_create_user_tracking_subscription: INCONC: Expected message not received"); + log("f_create_user_location_event_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_create_user_tracking_subscription + } // End of function f_create_user_location_event_subscription - function f_delete_user_tracking_subscription( - in UserTrackingSubscription p_user_tracking_subscription - ) runs on HttpComponent { + function f_delete_user_location_event_subscription( + in UserLocationEventSubscription p_user_location_event_subscription + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; var charstring v_uri :=regexp( - oct2char(unichar2oct(p_user_tracking_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_USERS_LOC_SUB_URI & "/(?*)", + oct2char(unichar2oct(p_user_location_event_subscription.links_.self_.href)), + "?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)", 0 ); @@ -95,7 +94,7 @@ module LocationAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LOC_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_uri, v_headers ))); tc_ac.start; @@ -107,15 +106,15 @@ module LocationAPI_Functions { tc_ac.stop; } [] tc_ac.timeout { - log("f_delete_user_tracking_subscription: INCONC: Expected message not received"); + log("f_delete_user_location_event_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_delete_user_tracking_subscription + } // End of function f_delete_user_location_event_subscription - function f_create_periodic_notification_subscription( - out PeriodicNotificationSubscription p_periodic_notification_subscription - ) runs on HttpComponent { + function f_create_user_location_periodic_subscription( + out UserLocationPeriodicSubscription p_user_location_periodic_subscription + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -123,50 +122,44 @@ module LocationAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_USERS_TRACK_SUB_URI, + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_periodic_notification_subscription( - m_periodic_notification_subscription( - { PX_IP_ADDRESS }, - PX_CALLBACK_REF_URL, - -, -, - PX_USER - )))))); + m_body_json_user_location_periodic_subscription( + m_user_location_periodic_subscription( + PX_CALLBACK_REF_URL + )))))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_periodic_notification_subscription( - mw_periodic_notification_subscription( - { PX_IP_ADDRESS }, - PX_CALLBACK_REF_URL, - -, -, - PX_USER, - ? - )))))) -> value v_response { + mw_body_json_user_location_periodic_subscription( + mw_user_location_periodic_subscription( + PX_CALLBACK_REF_URL + )))))) -> value v_response { tc_ac.stop; - p_periodic_notification_subscription := v_response.response.body.json_body.periodicNotificationSubscription; - log("f_create_periodic_notification_subscription: INFO: IUT successfully responds to the subscription: ", p_periodic_notification_subscription); + // FIXME Extract HTTP Location header + p_user_location_periodic_subscription := v_response.response.body.json_body.userLocationPeriodicSubscription; + log("f_create_user_location_periodic_subscription: INFO: IUT successfully responds to the subscription: ", p_user_location_periodic_subscription); } [] tc_ac.timeout { - log("f_create_periodic_notification_subscription: INCONC: Expected message not received"); + log("f_create_user_location_periodic_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_create_periodic_notification_subscription + } // End of function f_create_user_location_periodic_subscription - function f_delete_periodic_notification_subscription( - in PeriodicNotificationSubscription p_position_notification_subscription - ) runs on HttpComponent { + function f_delete_user_location_periodic_subscription( + in UserLocationPeriodicSubscription p_position_notification_subscription + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; var charstring v_uri := regexp( - oct2char(unichar2oct(p_position_notification_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "/(?*)", + oct2char(unichar2oct(p_position_notification_subscription.links_.self_.href)), + "?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)", 0 ); @@ -174,7 +167,7 @@ module LocationAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_uri, v_headers ))); tc_ac.start; @@ -186,14 +179,14 @@ module LocationAPI_Functions { tc_ac.stop; } [] tc_ac.timeout { - log("f_delete_periodic_notification_subscription: INCONC: Expected message not received"); + log("f_delete_user_location_periodic_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_delete_periodic_notification_subscription + } // End of function f_delete_user_location_periodic_subscription - function f_create_zonal_traffic_subscription( - out ZonalTrafficSubscription p_zonal_traffic_subscription - ) runs on HttpComponent { + function f_create_zone_location_event_subscription( + out ZoneLocationEventSubscription p_zone_location_event_subscription + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -201,11 +194,11 @@ module LocationAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_USERS_INF_SUB_URI, + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_zonal_traffic_subscription( - m_zonal_traffic_subscription( + m_body_json_zone_location_event_subscription( + m_zone_location_event_subscription( PX_CLIENT_ID, PX_CALLBACK_REF_URL, PX_ZONE_ID @@ -216,32 +209,33 @@ module LocationAPI_Functions { mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_zonal_traffic_subscription( - mw_zonal_traffic_subscription( + mw_body_json_zone_location_event_subscription( + mw_zone_location_event_subscription( PX_CLIENT_ID, PX_CALLBACK_REF_URL, PX_ZONE_ID )))))) -> value v_response { tc_ac.stop; - p_zonal_traffic_subscription := v_response.response.body.json_body.zonalTrafficSubscription; - log("f_create_zonal_traffic_subscription: INFO: IUT successfully responds to the subscription: ", p_zonal_traffic_subscription); + // FIXME Extract HTTP Location header + p_zone_location_event_subscription := v_response.response.body.json_body.zoneLocationEventSubscription; + log("f_create_zone_location_event_subscription: INFO: IUT successfully responds to the subscription: ", p_zone_location_event_subscription); } [] tc_ac.timeout { - log("f_create_zonal_traffic_subscription: INCONC: Expected message not received"); + log("f_create_zone_location_event_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_create_zonal_traffic_subscription + } // End of function f_create_zone_location_event_subscription - function f_delete_zonal_traffic_subscription( - in ZonalTrafficSubscription p_zonal_traffic_subscription - ) runs on HttpComponent { + function f_delete_zone_location_event_subscription( + in ZoneLocationEventSubscription p_zone_location_event_subscription + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; var charstring v_uri := regexp( - oct2char(unichar2oct(p_zonal_traffic_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_USERS_INF_SUB_URI & "/(?*)", + oct2char(unichar2oct(p_zone_location_event_subscription.links_.self_.href)), + "?+" & PX_LOC_API_ZONES_SUB_URI & "/(?*)", 0 ); @@ -249,7 +243,7 @@ module LocationAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_INF_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & v_uri, v_headers ))); tc_ac.start; @@ -261,14 +255,14 @@ module LocationAPI_Functions { tc_ac.stop; } [] tc_ac.timeout { - log("f_delete_zonal_traffic_subscription: INCONC: Expected message not received"); + log("f_delete_zone_location_event_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_delete_zonal_traffic_subscription + } // End of function f_delete_zone_location_event_subscription - function f_create_circle_notification_subscription( - out CircleNotificationSubscription p_circle_notification_subscription - ) runs on HttpComponent { + function f_create_zone_status_subscription( + out ZoneStatusSubscription p_zone_status_subscription + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -276,45 +270,46 @@ module LocationAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_AREA_SUB_URI, + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_circle_notification_subscription( - m_circle_notification_subscription( - PX_CLIENT_ID, //clientCorrelator - PX_AREA_SUB_CALLBACK_URI, // callbackReference - { PX_IP_ADDRESS } // address - )))))); + m_body_json_zone_status_subscription( + m_zone_status_subscription( + PX_AREA_SUB_CALLBACK_URI, + PX_USER, + PX_ZONE_ID + )))))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_circle_notification_subscription( - mw_circle_notification_subscription( - PX_CLIENT_ID - )))))) -> value v_response { + mw_body_json_zone_status_subscription( + mw_zone_status_subscription( + PX_AREA_SUB_CALLBACK_URI + )))))) -> value v_response { tc_ac.stop; - p_circle_notification_subscription := v_response.response.body.json_body.circleNotificationSubscription; - log("f_create_circle_notification_subscription: INFO: IUT successfully responds to the subscription: ", p_circle_notification_subscription); + // FIXME Extract HTTP Location header + p_zone_status_subscription := v_response.response.body.json_body.zoneStatusSubscription; + log("f_create_zone_status_subscription: INFO: IUT successfully responds to the subscription: ", p_zone_status_subscription); } [] tc_ac.timeout { - log("f_create_circle_notification_subscription: INCONC: Expected message not received"); + log("f_create_zone_status_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_create_circle_notification_subscription + } // End of function f_create_zone_status_subscription - function f_delete_circle_notification_subscription( - in CircleNotificationSubscription p_circle_notification_subscription - ) runs on HttpComponent { + function f_delete_zone_status_subscription( + in ZoneStatusSubscription p_zone_status_subscription + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; var charstring v_uri := regexp( - oct2char(unichar2oct(p_circle_notification_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_AREA_SUB_URI & "/(?*)", + oct2char(unichar2oct(p_zone_status_subscription.links_.self_.href)), + "?+" & PX_LOC_API_AREA_SUB_URI & "/(?*)", 0 ); @@ -322,7 +317,7 @@ module LocationAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_AREA_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & v_uri, v_headers ))); tc_ac.start; @@ -334,24 +329,93 @@ module LocationAPI_Functions { tc_ac.stop; } [] tc_ac.timeout { - log("f_delete_circle_notification_subscription: INCONC: Expected message not received"); + log("f_delete_zone_status_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_delete_circle_notification_subscription - - - - - - - - + } // End of function f_delete_zone_status_subscription + function f_create_user_area_subscription( + out UserAreaSubscription p_user_area_subscription + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_area_subscription( + m_user_area_subscription( + PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference + PX_USER, + m_area_info( + ELLIPSOID_POINT_UNCERT_CIRCLE, + { m_point({PX_UE_COORD_LAT}, {PX_UE_COORD_LONG}) }, + PX_RADIUS + ), // AreaInfo + PX_TRACKIMNG_ACCURACY // TrackingAccuracy + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_user_area_subscription( + mw_user_area_subscription( + PX_UE_DIST_SUB_CALLBACK_URI + )))))) -> value v_response { + tc_ac.stop; + + // FIXME Extract HTTP Location header + p_user_area_subscription := v_response.response.body.json_body.userAreaSubscription; + log("f_create_user_area_subscription: INFO: IUT successfully responds to the subscription: ", p_user_area_subscription); + } + [] tc_ac.timeout { + log("f_create_user_area_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_user_area_subscription + function f_delete_user_area_subscription( + in UserAreaSubscription p_user_area_subscription + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + var charstring v_uri := regexp( + oct2char(unichar2oct(p_user_area_subscription.links_.self_.href)), + "?+" & PX_LOC_API_AREA_SUB_URI & "/(?*)", + 0 + ); + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & v_uri, + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_user_area_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_delete_user_area_subscription - function f_create_distance_notification_subscription( - out DistanceNotificationSubscription p_distance_notification_subscription - ) runs on HttpComponent { + function f_create_user_distance_subscription( + out UserDistanceSubscription p_user_distance_subscription + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -359,53 +423,48 @@ module LocationAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_DIST_URI, + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_distance_notification_subscription( - m_distance_notification_subscription( - PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference - -, // checkImmediate - PX_CLIENT_ID, //clientCorrelator - -, // criteria - 10.0, // distance - -, - { PX_UE_MONITORED_IP_ADDRESS } // monitoredAddress - )))))); + m_body_json_user_distance_subscription( + m_user_distance_subscription( + PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference + PX_USER, + { PX_UE_MONITORED_IP_ADDRESS }, + PX_DISTANCE, + PX_TRACKIMNG_ACCURACY + )))))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_distance_notification_subscription( - mw_distance_notification_subscription( - PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference - -, - PX_CLIENT_ID, //clientCorrelator - -, -, -, - { PX_UE_MONITORED_IP_ADDRESS } // monitoredAddress - )))))) -> value v_response { + mw_body_json_user_distance_subscription( + mw_user_distance_subscription( + PX_UE_DIST_SUB_CALLBACK_URI + )))))) -> value v_response { tc_ac.stop; - p_distance_notification_subscription := v_response.response.body.json_body.distanceNotificationSubscription; - log("f_create_distance_notification_subscription: INFO: IUT successfully responds to the subscription: ", p_distance_notification_subscription); + // FIXME Extract HTTP Location header + p_user_distance_subscription := v_response.response.body.json_body.userDistanceSubscription; + log("f_create_user_distance_subscription: INFO: IUT successfully responds to the subscription: ", p_user_distance_subscription); } [] tc_ac.timeout { - log("f_create_distance_notification_subscription: INCONC: Expected message not received"); + log("f_create_user_distance_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_create_distance_notification_subscription + } // End of function f_create_user_distance_subscription - function f_delete_distance_notification_subscription( - in DistanceNotificationSubscription p_distance_notification_subscription - ) runs on HttpComponent { + function f_delete_user_distance_subscription( + in UserDistanceSubscription p_user_distance_subscription + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; var charstring v_uri := regexp( - oct2char(unichar2oct(p_distance_notification_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_DIST_URI & "/(?*)", + oct2char(unichar2oct(p_user_distance_subscription.links_.self_.href)), + "?+" & PX_LOC_API_DISTANCE_SUB_URI & "/(?*)", 0 ); @@ -413,7 +472,7 @@ module LocationAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_DIST_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI & "/" & v_uri, v_headers ))); tc_ac.start; @@ -425,9 +484,9 @@ module LocationAPI_Functions { tc_ac.stop; } [] tc_ac.timeout { - log("f_delete_distance_notification_subscription: INCONC: Expected message not received"); + log("f_delete_user_distance_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_delete_distance_notification_subscription + } // End of function f_delete_user_distance_subscription } // End of module LocationAPI_Functions diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn index 1a397ef..87c88ea 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn @@ -35,15 +35,15 @@ module LocationAPI_Pixits { modulepar UInt32 PX_NB_USERS := 10; - modulepar CallbackReference PX_CALLBACK_REF_URL := { notifyURL := "http://clientApp.example.com/location_notifications/123456", callbackData := omit, notificationFormat := omit }; + modulepar CallbackReference PX_CALLBACK_REF_URL := "http://clientApp.example.com/location_notifications/123456"; - modulepar CallbackReference PX_UE_PERIODIC_SUB_CALLBACK_URI := { notifyURL := "http://clientApp.example.com/location_notifications/123456", callbackData := omit, notificationFormat := omit }; + modulepar CallbackReference PX_UE_PERIODIC_SUB_CALLBACK_URI := "http://clientApp.example.com/location_notifications/123456"; modulepar Address PX_IP_ADDRESS := "acr:10.0.0.3"; - modulepar CallbackReference PX_AREA_SUB_CALLBACK_URI := { notifyURL := "http://clientApp.example.com/location_notifications/123456", callbackData := omit, notificationFormat := omit }; + modulepar CallbackReference PX_AREA_SUB_CALLBACK_URI := "http://clientApp.example.com/location_notifications/123456"; - modulepar CallbackReference PX_UE_DIST_SUB_CALLBACK_URI := { notifyURL := "http://clientApp.example.com/location_notifications/123456", callbackData := omit, notificationFormat := omit }; + modulepar CallbackReference PX_UE_DIST_SUB_CALLBACK_URI := "http://clientApp.example.com/location_notifications/123456"; modulepar Address PX_UE_MONITORED_IP_ADDRESS := "acr:10.0.0.1"; @@ -56,11 +56,17 @@ module LocationAPI_Pixits { modulepar Json.Number PX_UE_COORD_LAT := -80.86302; modulepar Json.Number PX_UE_COORD_LONG := 41.277306; + + modulepar Json.Number PX_DISTANCE := 1000.0; + + modulepar Json.UInteger PX_RADIUS := 500; + + modulepar Json.Number PX_TRACKIMNG_ACCURACY := 1000.0; modulepar Address PX_ACR_SOME_IP := ""; - modulepar CallbackReference PX_USERTRACK_SUB_CALLBACK_URI := { "" }; + modulepar CallbackReference PX_USERTRACK_SUB_CALLBACK_URI := ""; - modulepar CallbackReference PX_TRAFFIC_SUB_CALLBACK_URI := { "" }; + modulepar CallbackReference PX_TRAFFIC_SUB_CALLBACK_URI := ""; } // End of module LocationAPI_Pixits diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn index f7e52a2..15b6974 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn @@ -1,15 +1,15 @@ module LocationAPI_Templates { - + // JSON import from Json all; - + // LibCommon import from LibCommon_BasicTypesAndValues all; - + // LibMec/LocationAPI import from LocationAPI_TypesAndValues all; import from LocationAPI_Pixits all; - + template (value) UserInfo m_user_info( in Address p_address := PX_USER, in AccessPointId p_access_point_id := PX_ACCESS_POINT_ID, @@ -27,7 +27,7 @@ module LocationAPI_Templates { contextLocationInfo := omit, ancillaryInfo := omit } // End of template m_user_info - + template (present) UserInfo mw_user_info( template (present) Address p_address := ?, template (present) AccessPointId p_access_point_id := ?, @@ -53,7 +53,7 @@ module LocationAPI_Templates { user := p_userInfo, resourceURL := p_resource_url } // End of template m_user_list - + template UserList mw_user_list( template UserInfos p_userInfo := *, template (present) ResourceURL p_resource_url := ? @@ -61,7 +61,7 @@ module LocationAPI_Templates { user := p_userInfo, resourceURL := p_resource_url } // End of template mw_user_list - + template (value) LocationInfo m_location_info( in Latitude p_latitude, in Longitude p_longitude, @@ -84,7 +84,7 @@ module LocationAPI_Templates { timestamp_ := omit, velocity := omit } // End of template m_location_info - + template (present) LocationInfo mw_location_info( template (present) Latitude p_latitude := ?, template (present) Longitude p_longitude := ?, @@ -106,7 +106,7 @@ module LocationAPI_Templates { timestamp_ := *, velocity := * } // End of template mw_location_info - + template (value) ZoneInfo m_zone_info( in ZoneId p_zone_id := PX_ZONE_ID, in NumberOfAccessPoints p_number_of_access_points := PX_NB_ACCESS_POINTS, @@ -120,7 +120,7 @@ module LocationAPI_Templates { numberOfUsers := p_number_of_users, resourceURL := p_resource_url } // End of template m_zone_info - + template (present) ZoneInfo mw_zone_info( template (present) ZoneId p_zone_id := ?, template (present) NumberOfAccessPoints p_number_of_access_points := ?, @@ -134,7 +134,7 @@ module LocationAPI_Templates { numberOfUsers := p_number_of_users, resourceURL := p_resource_url } // End of template mw_zone_info - + template (omit) AccessPointList m_access_point_list( in ZoneId p_zoneId := PX_ZONE_ID, in ResourceURL p_resourceURL, @@ -144,84 +144,430 @@ module LocationAPI_Templates { accessPoint := p_accessPoint, resourceURL := p_resourceURL } // End of template m_access_point_list - - template AccessPointList mw_access_point_list( - template (present) ZoneId p_zoneId := ?, - template (present) ResourceURL p_resourceURL := ?, - template AccessPointInfos p_accessPoint := * - ) := { + + template (present) AccessPointList mw_access_point_list( + template (present) ZoneId p_zoneId := ?, + template (present) ResourceURL p_resourceURL := ?, + template AccessPointInfos p_accessPoint := * + ) := { zoneId := p_zoneId, accessPoint := p_accessPoint, resourceURL := p_resourceURL } // End of template mw_access_point_list - - template (value) UserTrackingSubscription m_user_tracking_subscription( - in ClientCorrelator p_clientCorrelator, - in CallbackReference p_callbackReference, - in Address p_address := PX_USER, - in UserEventCriteria p_userEventCriteria := { Entering } - ) := { - clientCorrelator := p_clientCorrelator, - callbackReference := p_callbackReference, - address_ := p_address, - userEventCriteria := p_userEventCriteria, - resourceURL := omit - } // End of template m_user_tracking_subscription - - template (present) UserTrackingSubscription mw_user_tracking_subscription( - template (present) ClientCorrelator p_clientCorrelator := ?, + + template (omit) Subscription m_subscription( + in Json.String p_subscriptionType, + in template (omit) Json.AnyURI p_href := omit + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template m_subscription + + template (present) Subscription mw_subscription( + template (present) Json.String p_subscriptionType := ?, + template Json.AnyURI p_href := * + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template mw_subscription + + template (omit) NotificationSubscriptionList m_notification_subscription_list( + in template (value) ResourceURL p_resourceURL, + in template (omit) Subscriptions p_subscription := omit + ) := { + subscription := p_subscription, + resourceURL := p_resourceURL + } // End of template m_notification_subscription_list + + template (present) NotificationSubscriptionList mw_notification_subscription_list( + template (present) ResourceURL p_resourceURL := ?, + template Subscriptions p_subscription := * + ) := { + subscription := p_subscription, + resourceURL := p_resourceURL + } // End of template mw_notification_subscription_list + + template (omit) UserLocationEventSubscription m_user_location_event_subscription( + in CallbackReference p_callbackReference, + in Address p_address := PX_USER, + in template (omit) ClientCorrelator p_clientCorrelator := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) UserEventPara p_userEventPara := omit, + in template (omit) LocationEventCriteria p_locationEventCriteria := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "UserLocationEventSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, + address_ := p_address, + userEventPara := p_userEventPara, + locationEventCriteria := p_locationEventCriteria, + expiryDeadline := p_expiryDeadline + } // End of template m_user_location_event_subscription + + template (omit) UserLocationEventSubscription m_user_location_event_subscription_error( + in Address p_address := PX_USER, + in template (omit) ClientCorrelator p_clientCorrelator := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) UserEventPara p_userEventPara := omit, + in template (omit) LocationEventCriteria p_locationEventCriteria := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "UserLocationEventSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := omit, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, + address_ := p_address, + userEventPara := p_userEventPara, + locationEventCriteria := p_locationEventCriteria, + expiryDeadline := p_expiryDeadline + } // End of template m_user_location_event_subscription_error + + template (present) UserLocationEventSubscription mw_user_location_event_subscription( + template (present) CallbackReference p_callbackReference := ?, + template (present) Address p_address := ?, + template (present) Links p_links_ := ?, + template ClientCorrelator p_clientCorrelator := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template UserEventPara p_userEventPara := *, + template LocationEventCriteria p_locationEventCriteria := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "UserLocationEventSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := p_links_, + address_ := p_address, + userEventPara := p_userEventPara, + locationEventCriteria := p_locationEventCriteria, + expiryDeadline := p_expiryDeadline + } // End of template mw_user_location_event_subscription + + template (omit) UserLocationPeriodicSubscription m_user_location_periodic_subscription( + in CallbackReference p_callbackReference, + in Address p_address := PX_USER, + in template (omit) ClientCorrelator p_clientCorrelator := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) PeriodicEventInfo p_periodicEventInfo := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "UserLocationPeriodicSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, + address_ := p_address, + periodicEventInfo := p_periodicEventInfo, + expiryDeadline := p_expiryDeadline + } // End of template m_user_location_periodic_subscription + + template (present) UserLocationPeriodicSubscription mw_user_location_periodic_subscription( + template (present) CallbackReference p_callbackReference := ?, + template (present) Address p_address := ?, + template (present) Links p_links_ := ?, + template ClientCorrelator p_clientCorrelator := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template PeriodicEventInfo p_periodicEventInfo := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "UserLocationPeriodicSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, + address_ := p_address, + periodicEventInfo := p_periodicEventInfo, + expiryDeadline := p_expiryDeadline + } // End of template mw_user_location_periodic_subscription + + template (omit) ZoneLocationEventSubscription m_zone_location_event_subscription( + in CallbackReference p_callbackReference, + in Address p_address := PX_USER, + in ZoneId p_zoneId, + in template (omit) ClientCorrelator p_clientCorrelator := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) LocationEventCriteria p_locationEventCriteria := omit, + in template (omit) ReportingCtrl p_reportingCtrl := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "ZoneLocationEventSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, + zoneId := p_zoneId, + locationEventCriteria := p_locationEventCriteria, + reportingCtrl := p_reportingCtrl, + expiryDeadline := p_expiryDeadline + } // End of template m_zone_location_event_subscription + + template (present) ZoneLocationEventSubscription mw_zone_location_event_subscription( + template (present) CallbackReference p_callbackReference := ?, + template (present) Address p_address := ?, + template (present) ZoneId p_zoneId := ?, + template (present) Links p_links_ := ?, + template ClientCorrelator p_clientCorrelator := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template LocationEventCriteria p_locationEventCriteria := *, + template ReportingCtrl p_reportingCtrl := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "ZoneLocationEventSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := p_links_, + zoneId := p_zoneId, + locationEventCriteria := p_locationEventCriteria, + reportingCtrl := p_reportingCtrl, + expiryDeadline := p_expiryDeadline + } // End of template mw_zone_location_event_subscription + + template (omit) ZoneStatusSubscription m_zone_status_subscription( + in CallbackReference p_callbackReference, + in Address p_address := PX_USER, + in ZoneId p_zoneId, + in template (omit) ClientCorrelator p_clientCorrelator := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) Json.UInteger p_upperNumberOfUsersZoneThreshold := omit, + in template (omit) Json.UInteger p_lowerNumberOfUsersZoneThreshold := omit, + in template (omit) Json.UInteger p_upperNumberOfUsersAPThreshold := omit, + in template (omit) Json.UInteger p_lowerNumberOfUsersAPThreshold := omit, + in template (omit) OperationStatus p_operationStatus := omit, + in template (omit) ReportingCtrl p_reportingCtrl := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "ZoneStatusSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, + zoneId := p_zoneId, + upperNumberOfUsersZoneThreshold := p_upperNumberOfUsersZoneThreshold, + lowerNumberOfUsersZoneThreshold := p_lowerNumberOfUsersZoneThreshold, + upperNumberOfUsersAPThreshold := p_upperNumberOfUsersAPThreshold, + lowerNumberOfUsersAPThreshold := p_lowerNumberOfUsersAPThreshold, + operationStatus := p_operationStatus, + reportingCtrl := p_reportingCtrl, + expiryDeadline := p_expiryDeadline + } // End of template m_zone_status_subscription + + template (present) ZoneStatusSubscription mw_zone_status_subscription( + template (present) CallbackReference p_callbackReference := ?, + template (present) Address p_address := ?, + template (present) ZoneId p_zoneId := ?, + template (present) Links p_links_ := ?, + template ClientCorrelator p_clientCorrelator := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template Json.UInteger p_upperNumberOfUsersZoneThreshold := *, + template Json.UInteger p_lowerNumberOfUsersZoneThreshold := *, + template Json.UInteger p_upperNumberOfUsersAPThreshold := *, + template Json.UInteger p_lowerNumberOfUsersAPThreshold := *, + template OperationStatus p_operationStatus := *, + template ReportingCtrl p_reportingCtrl := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "ZoneStatusSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := p_links_, + zoneId := p_zoneId, + upperNumberOfUsersZoneThreshold := p_upperNumberOfUsersZoneThreshold, + lowerNumberOfUsersZoneThreshold := p_lowerNumberOfUsersZoneThreshold, + upperNumberOfUsersAPThreshold := p_upperNumberOfUsersAPThreshold, + lowerNumberOfUsersAPThreshold := p_lowerNumberOfUsersAPThreshold, + operationStatus := p_operationStatus, + reportingCtrl := p_reportingCtrl, + expiryDeadline := p_expiryDeadline + } // End of template mw_zone_status_subscription + + template (omit) UserAreaSubscription m_user_area_subscription( + in CallbackReference p_callbackReference, + in Address p_address := PX_USER, + in template (value) AreaInfo p_areaDefine, + in Json.Number p_trackingAccuracy, + in template (omit) ClientCorrelator p_clientCorrelator := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) LocationEventCriteria p_locationEventCriteria := omit, + in template (omit) ReportingCtrl p_reportingCtrl := omit, + in template (omit) Json.Bool p_reportingLocationReq := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "UserAreaSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, + areaDefine := p_areaDefine, + trackingAccuracy := p_trackingAccuracy, + locationEventCriteria := p_locationEventCriteria, + reportingCtrl := p_reportingCtrl, + reportingLocationReq := p_reportingLocationReq, + expiryDeadline := p_expiryDeadline + } // End of template m_user_area_subscription + + template (present) UserAreaSubscription mw_user_area_subscription( + template (present) CallbackReference p_callbackReference := ?, + template (present) Address p_address := ?, + template (present) Links p_links_ := ?, + template (present) AreaInfo p_areaDefine := ?, + template (present) Json.Number p_trackingAccuracy := ?, + template ClientCorrelator p_clientCorrelator := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template LocationEventCriteria p_locationEventCriteria := *, + template ReportingCtrl p_reportingCtrl := *, + template Json.Bool p_reportingLocationReq := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "UserAreaSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, + areaDefine := p_areaDefine, + trackingAccuracy := p_trackingAccuracy, + locationEventCriteria := p_locationEventCriteria, + reportingCtrl := p_reportingCtrl, + reportingLocationReq := p_reportingLocationReq, + expiryDeadline := p_expiryDeadline + } // End of template mw_user_area_subscription + + template (omit) UserDistanceSubscription m_user_distance_subscription( + in CallbackReference p_callbackReference, + in Address p_address := PX_USER, + in template (value) Json.AnyURIArray p_monitoredAddress, + in Json.Number p_distance, + in Json.Number p_trackingAccuracy, + in template (value) DistanceCriteria p_criteria := AllWithinDistance, + in Json.Bool p_checkImmediate := true, + in template (omit) ClientCorrelator p_clientCorrelator := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) Json.AnyURI p_referenceAddress := omit, + in template (omit) ReportingCtrl p_reportingCtrl := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "UserAreaSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, + referenceAddress := p_referenceAddress, + monitoredAddress := p_monitoredAddress, + distance := p_distance, + trackingAccuracy := p_trackingAccuracy, + criteria := p_criteria, + checkImmediate := p_checkImmediate, + reportingCtrl := p_reportingCtrl, + expiryDeadline := p_expiryDeadline + } // End of template m_user_distance_subscription + + template (present) UserDistanceSubscription mw_user_distance_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Address p_address := PX_USER, - template (present) UserEventCriteria p_userEventCriteria := { Entering }, - template (present) ResourceURL p_resourceURL := ? + template (present) Links p_links_ := ?, + template (present) Address p_address := ?, + template (present) Json.AnyURIArray p_monitoredAddress := ?, + template (present) Json.Number p_distance := ?, + template (present) Json.Number p_trackingAccuracy := ?, + template (present) DistanceCriteria p_criteria := ?, + template (present) Json.Bool p_checkImmediate := ?, + template ClientCorrelator p_clientCorrelator := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template Json.AnyURI p_referenceAddress := *, + template ReportingCtrl p_reportingCtrl := *, + template TimeStamp p_expiryDeadline := * ) := { - clientCorrelator := p_clientCorrelator, - callbackReference := p_callbackReference, - address_ := p_address, - userEventCriteria := p_userEventCriteria, - resourceURL := p_resourceURL - } // End of template mw_user_tracking_subscription - - template (value) PeriodicTrackingSubscription m_periodic_tracking_subscription( - in ClientCorrelator p_clientCorrelator, - in CallbackReference p_callbackReference, - in Address p_address := PX_USER, - in Json.Number p_frequency := 10.0, - in Json.Number p_requestedAccuracy := 10.0 - ) := { - clientCorrelator := p_clientCorrelator, - callbackReference := p_callbackReference, - address_ := p_address, - frequency := p_frequency, - requestedAccuracy := p_requestedAccuracy, - resourceURL := omit - } // End of template m_periodic_tracking_subscription - - template (present) PeriodicTrackingSubscription mw_periodic_tracking_subscription( - template (present) ClientCorrelator p_clientCorrelator := ?, - template (present) CallbackReference p_callbackReference := ?, - template (present) Address p_address := PX_USER, - template (present) Json.Number p_frequency := ?, - template (present) Json.Number p_requestedAccuracy := ? - ) := { - clientCorrelator := p_clientCorrelator, - callbackReference := p_callbackReference, - address_ := p_address, - frequency := p_frequency, - requestedAccuracy := p_requestedAccuracy, - resourceURL := * - } // End of template mw_periodic_tracking_subscription - + subscriptionType := "UserAreaSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := p_links_, + referenceAddress := p_referenceAddress, + monitoredAddress := p_monitoredAddress, + distance := p_distance, + trackingAccuracy := p_trackingAccuracy, + criteria := p_criteria, + checkImmediate := p_checkImmediate, + reportingCtrl := p_reportingCtrl, + expiryDeadline := p_expiryDeadline + } // End of template mw_user_distance_subscription + + template (omit) AreaInfo m_area_info( + in template (value) Shape p_shape, + in template (value) Points p_points, + in template (omit) Json.UInteger p_radius := omit + ) := { + shape := p_shape, + points := p_points, + radius := p_radius + } // End of template m_area_info + + template (present) AreaInfo mw_area_info( + template (present) Shape p_shape := ?, + template (present) Points p_points := ?, + template Json.UInteger p_radius := * + ) := { + shape := p_shape, + points := p_points, + radius := p_radius + } // End of template mw_area_info + + template (value) Point m_point( + in Latitude p_latitude, + in Longitude p_longitude + ) := { + latitude := p_latitude, + longitude := p_longitude + } // End of template m_point + + template (present) Point mw_point( + template (present) Latitude p_latitude := ?, + template (present) Longitude p_longitude := ? + ) := { + latitude := p_latitude, + longitude := p_longitude + } // End of template mw_point + template (value) TerminalDistance m_terminal_distance(in Json.Number p_distance) := { distance := p_distance, accuracy := omit, timestamp_ := omit } // End of template m_terminal_distance - + template (present) TerminalDistance mw_terminal_distance(template (present) Json.Number p_distance := ?) := { distance := p_distance, accuracy := *, timestamp_ := * } // End of template mw_terminal_distance - + } // End of module LocationAPI_Templates diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn index 6f5c286..0693c57 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn @@ -310,31 +310,10 @@ module LocationAPI_TypesAndValues { */ type Json.String AncillaryInfo; - /** - * @desc CallBackData if passed by the application during the associated ZonalTrafficSubscription and UserTrackingSubscription operation. See [\ -REST_NetAPI_Common]. - */ - type Json.String CallbackData; // TODO To be removed - - /** - * @desc Notification serialization format - */ - type enumerated NotificationFormat { - JSON (1), - XML (2) - } - /** * @desc CallbackData description - * @member callbackData Data the application can register with the server when subscribing to notifications, and that are passed back unchanged in each of the related notifications. These data can be used by the application in the processing of the notification, e.g. for correlation purposes - * @member notificationFormat - * @member notifyURL Notify Callback URL - */ - type record CallbackReference { - NotifyURL notifyURL, - CallbackData callbackData optional, - NotificationFormat notificationFormat optional - } + */ + type Json.AnyURI CallbackReference; /** * @desc Uniquely identifies this create subscription request. If there is a communication failure during the request, using the same clientCorrelator when retrying the request allows the operator to avoid creating a duplicate subscription. @@ -649,39 +628,6 @@ REST_NetAPI_Common]. } type Json.String AncillaryMapInfo; - /** - * @desc A type containing user tracking subscription. - * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server - * @member callbackReference - * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) to monitor - * @member userEventCriteria List of user event values to generate notifications for (these apply to address specified). If this element is missing, a notification is requested to be generated for any change in user event - * @member resourceURL Self referring URL - */ - type record UserTrackingSubscription { - ClientCorrelator clientCorrelator optional, - CallbackReference callbackReference, - Address address_, - UserEventCriteria userEventCriteria optional, - ResourceURL resourceURL optional - } with { - variant (address_) "name as 'address'"; - } - - /** - * @desc A type containing periodic tracking subscription. - * @member - */ - type record PeriodicTrackingSubscription { - ClientCorrelator clientCorrelator optional, - CallbackReference callbackReference, - Address address_, - Json.Number frequency, - Json.Number requestedAccuracy, - ResourceURL resourceURL optional - } with { - variant (address_) "name as 'address'"; - } - /** * @desc Identifier of zone */ @@ -763,16 +709,17 @@ REST_NetAPI_Common]. type record Subscription { Json.AnyURI href optional, Json.String subscriptionType - } + } + type record of Subscription Subscriptions; /** * @desc This type contains a list of subscriptions - * @member subscription Subscription element + * @member subscription Subscription elements * @member resourceURL Self-referring URL * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.3 Type: NotificationSubscriptionList */ type record NotificationSubscriptionList { - Subscription subscription optional, + Subscriptions subscription optional, ResourceURL resourceURL } @@ -793,7 +740,7 @@ REST_NetAPI_Common]. type record UserLocationEventSubscription { Json.String subscriptionType, Json.String clientCorrelator optional, - Json.AnyURI callbackReference optional, + CallbackReference callbackReference optional, Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, Links links_ optional, @@ -822,7 +769,7 @@ REST_NetAPI_Common]. type record UserLocationPeriodicSubscription{ Json.String subscriptionType, Json.String clientCorrelator optional, - Json.AnyURI callbackReference optional, + CallbackReference callbackReference optional, Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, Links links_ optional, @@ -877,7 +824,7 @@ REST_NetAPI_Common]. type record ZoneLocationEventSubscription { Json.String subscriptionType, Json.String clientCorrelator optional, - Json.AnyURI callbackReference optional, + CallbackReference callbackReference optional, Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, Links links_ optional, @@ -910,7 +857,7 @@ REST_NetAPI_Common]. type record ZoneStatusSubscription { Json.String subscriptionType, Json.String clientCorrelator optional, - Json.AnyURI callbackReference optional, + CallbackReference callbackReference optional, Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, Links links_ optional, @@ -945,7 +892,7 @@ REST_NetAPI_Common]. type record UserAreaSubscription { Json.String subscriptionType, Json.String clientCorrelator optional, - Json.AnyURI callbackReference optional, + CallbackReference callbackReference optional, Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, Links links_ optional, @@ -981,7 +928,7 @@ REST_NetAPI_Common]. type record UserDistanceSubscription { Json.String subscriptionType, Json.String clientCorrelator optional, - Json.AnyURI callbackReference optional, + CallbackReference callbackReference optional, Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, Links links_ optional, diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn index 36ab7e9..6e92be6 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn @@ -126,13 +126,7 @@ module TrafficManagementAPI_Functions { APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type m_qosd, // QoS LowCost, // MtsMode - Downlink, // TrafficDirection - { - m_session_filter( - "10.10.10.10", - 1010 - ) - } // FlowFilter + Downlink // TrafficDirection )))))); tc_ac.start; alt { diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Functions.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Functions.ttcn index 9af2041..8953fac 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Functions.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Functions.ttcn @@ -52,7 +52,6 @@ module V2XInformationServiceAPI_Functions { m_http_message_body_json( m_body_json_prov_chg_uu_uni_subscription( m_prov_chg_uu_uni_subscription( - PX_PROV_UU_UNI_SUB_CALLBACK, m_prov_chg_uu_uni_filter_criteria( m_location_info( m_ecgi( @@ -65,7 +64,9 @@ module V2XInformationServiceAPI_Functions { m_v2x_application_server( oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) - )))))))); + )), + PX_PROV_UU_UNI_SUB_CALLBACK + )))))); tc_ac.start; alt { @@ -75,8 +76,8 @@ module V2XInformationServiceAPI_Functions { mw_http_message_body_json( mw_body_json_prov_chg_uu_uni_subscription( mw_prov_chg_uu_uni_subscription( - PX_PROV_UU_UNI_SUB_CALLBACK, -, + PX_PROV_UU_UNI_SUB_CALLBACK, ? )))))) -> value v_response { tc_ac.stop; @@ -100,7 +101,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & p_prov_chg_uu_uni_subscription.links.self_, + PICS_ROOT_API & p_prov_chg_uu_uni_subscription.links.self_.href, v_headers ))); @@ -134,7 +135,6 @@ module V2XInformationServiceAPI_Functions { m_http_message_body_json( m_body_json_prov_chg_uu_mbms_subscription( m_prov_chg_uu_mbms_subscription( - PX_PROV_UU_MBMS_SUB_CALLBACK, m_prov_chg_uu_mbms_filter_criteria( m_location_info( m_ecgi( @@ -144,18 +144,20 @@ module V2XInformationServiceAPI_Functions { 43.72, 10.41 )), - m_v2x_server_usd( - { PX_V2X_MBMS_SERVICE_ID }, - m_sdp_info( - PX_V2X_MC_SERVER, - PX_V2X_MC_PORT - ), - m_tmgi( - PX_V2X_SERVICE_AREA_ID, - PX_MCC, - PX_MNC + m_v2x_server_usd( + { PX_V2X_MBMS_SERVICE_ID }, + m_sdp_info( + PX_V2X_MC_SERVER, + PX_V2X_MC_PORT + ), + m_tmgi( + PX_V2X_SERVICE_AREA_ID, + PX_MCC, + PX_MNC ) - )))))))); + )), + PX_PROV_UU_MBMS_SUB_CALLBACK + )))))); tc_ac.start; alt { @@ -165,8 +167,8 @@ module V2XInformationServiceAPI_Functions { mw_http_message_body_json( mw_body_json_prov_chg_uu_mbms_subscription( mw_prov_chg_uu_mbms_subscription( - PX_PROV_UU_MBMS_SUB_CALLBACK, -, + PX_PROV_UU_MBMS_SUB_CALLBACK, ? )))))) -> value v_response { tc_ac.stop; @@ -190,7 +192,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & p_prov_chg_uu_mbms_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & p_prov_chg_uu_mbms_subscription.links.self_.href, v_headers ))); @@ -224,7 +226,6 @@ module V2XInformationServiceAPI_Functions { m_http_message_body_json( m_body_json_prov_chg_pc5_subscription( m_prov_chg_pc5_subscription( - PX_PROV_PC5_SUB_CALLBACK, m_filter_criteria( PX_V2X_DST_LAYER_2_ID, m_location_info( @@ -234,7 +235,9 @@ module V2XInformationServiceAPI_Functions { m_location_info_geo_area( 43.72, 10.41 - ))))))))); + ))), + PX_PROV_PC5_SUB_CALLBACK + )))))); tc_ac.start; alt { @@ -243,11 +246,11 @@ module V2XInformationServiceAPI_Functions { mw_http_response_201_created( mw_http_message_body_json( mw_body_json_prov_chg_pc5_subscription( - mw_prov_chg_pc5_subscription( - PX_PROV_PC5_SUB_CALLBACK, - -, - ? - )))))) -> value v_response { + mw_prov_chg_pc5_subscription( + -, + PX_PROV_PC5_SUB_CALLBACK, + ? + )))))) -> value v_response { tc_ac.stop; p_prov_chg_pc5_subscription := v_response.response.body.json_body.provChgPc5Subscription; @@ -269,7 +272,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & p_prov_chg_pc5_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & p_prov_chg_pc5_subscription.links.self_.href, v_headers ))); @@ -303,8 +306,8 @@ module V2XInformationServiceAPI_Functions { m_http_message_body_json( m_body_json_v2x_msg_subscription( m_v2x_msg_subscription( - PX_PROV_V2X_SUB_CALLBACK, - m_v2x_msg_subscription_filter_criteria + m_v2x_msg_subscription_filter_criteria, + PX_PROV_V2X_SUB_CALLBACK )))))); tc_ac.start; @@ -315,8 +318,8 @@ module V2XInformationServiceAPI_Functions { mw_http_message_body_json( mw_body_json_v2x_msg_subscription( mw_v2x_msg_subscription( - PX_PROV_V2X_SUB_CALLBACK, -, + PX_PROV_V2X_SUB_CALLBACK, ? )))))) -> value v_response { tc_ac.stop; @@ -340,7 +343,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & p_v2x_msg_subscription.links.self_, + PICS_ROOT_API & p_v2x_msg_subscription.links.self_.href, v_headers ))); diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn index cd235c9..045f4f4 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn @@ -93,7 +93,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @member locationInfo Location information to identify a particular geographical area of interest to the service consumer for receiving V2X messages * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.5-1: Attributes of the V2xMsgDistributionServerInfo */ - type record Pc5ProvisioningInfo { + type record V2xMsgDistributionServerInfo { V2xMsgDistributionServer v2xMsgDistributionServer, LocationInfo locationInfo optional } diff --git a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn index 212da04..a87f639 100644 --- a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn @@ -254,7 +254,6 @@ module WlanInformationAPI_TypesAndValues { } with { variant (links) "name as '_links'"; } - type record of StaDataRateSubscription StaDataRateSubscriptionList; /** * @desc Notification from WLAN Access Information Service with regards to client stations associated to the targeted Access Point diff --git a/ttcn/LibMec/ttcn/LibMec_Pics.ttcn b/ttcn/LibMec/ttcn/LibMec_Pics.ttcn index 18ace6f..3d77f14 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pics.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pics.ttcn @@ -36,7 +36,7 @@ module LibMec_Pics { modulepar boolean PICS_APP_PACKAGE_NOTIFICATIONS := true; - modulepar charstring PICS_ROOT_API := "exampleAPI"; + modulepar charstring PICS_ROOT_API := "/"; modulepar boolean PIC_APP_LCM_NOTIFICATIONS := true; diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index f4b79b4..1752a7d 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -4,15 +4,13 @@ module LibMec_Pixits { modulepar charstring PX_ME_APP_Q_USERS_LIST_URI := "/location/v3/queries/users"; - modulepar charstring PX_ME_APP_Q_DIST_URI := "/location/v3/subscriptions/distance"; - - modulepar charstring PX_ME_APP_Q_USERS_LOC_SUB_URI := "/location/v3/subscriptions/userTracking"; - - modulepar charstring PX_ME_APP_Q_USERS_TRACK_SUB_URI := "/location/v3/subscriptions/periodic"; + modulepar charstring PX_LOC_API_USERS_SUB_URI := "/location/v3/subscriptions/users"; - modulepar charstring PX_ME_APP_Q_USERS_INF_SUB_URI := "/location/v3/subscriptions/zonalTraffic"; + modulepar charstring PX_LOC_API_ZONES_SUB_URI := "/location/v3/subscriptions/zones"; - modulepar charstring PX_ME_APP_Q_AREA_SUB_URI := "/location/v3/subscriptions/area/circle"; + modulepar charstring PX_LOC_API_AREA_SUB_URI := "/location/v3/subscriptions/area"; + + modulepar charstring PX_LOC_API_DISTANCE_SUB_URI := "/location/v3/subscriptions/distance"; modulepar charstring PX_ME_APP_Q_UE_IDENTITY_ID_URI := "/ui/v1/"; diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index 7d0d715..7d94b67 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -30,14 +30,19 @@ module LibHttp_JsonMessageBodyTypes { * In accordance with your TTCN-3 module LibItsHttp_JSONTypes, you have to change the JsonBody typing. */ // TODO Add here your custom RFCs import - + type union JsonBody { - UserInfo userInfo, - UserList userList, - LocationAPI_TypesAndValues.ZoneInfo zoneInfo, - AccessPointList accessPointList, - UserTrackingSubscription userTrackingSubscription, - PeriodicTrackingSubscription periodicTrackingSubscription, + UserInfo userInfo, // ETSI GS MEC 013 V3.1.1 Clause 6.2.2 Type: UserInfo + UserList userList, // ETSI GS MEC 013 V3.1.1 Clause 6.2.5 Type: UserList + LocationAPI_TypesAndValues.ZoneInfo zoneInfo, // ETSI GS MEC 013 V3.1.1 Clause 6.2.1 Zonal presence data types + AccessPointList accessPointList, // ETSI GS MEC 013 V3.1.1 Clause 6.2.1 Zonal presence data types + NotificationSubscriptionList notificationSubscriptionList, // ETSI GS MEC 013 V3.1.1 Clause 6.3.3 Type: NotificationSubscriptionList + UserLocationEventSubscription userLocationEventSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.4 Type: UserLocationEventSubscription + UserLocationPeriodicSubscription userLocationPeriodicSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.5 Type: UserLocationPeriodicSubscription + ZoneLocationEventSubscription zoneLocationEventSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.6 Type: ZoneLocationEventSubscription + ZoneStatusSubscription zoneStatusSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.7 Type: ZoneStatusSubscription + UserAreaSubscription userAreaSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.8 Type: UserAreaSubscription + UserDistanceSubscription userDistanceSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.9 Type: UserDistanceSubscription TerminalDistance terminalDistance, LibMec_TypesAndValues.ProblemDetails problemDetails, UeIdentityTagInfo ueIdentityTagInfo, diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn index 660b1a0..0f1b54b 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -2,7 +2,7 @@ module LibHttp_JsonTemplates { // LibHttp import from LibHttp_JsonMessageBodyTypes all; - + // LibMec import from LibMec_TypesAndValues all; import from LibMec_Templates all; @@ -33,7 +33,7 @@ module LibHttp_JsonTemplates { // LibMec/UEAppInterfaceAPI import from UEAppInterfaceAPI_TypesAndValues all; - + // LibMec/module FixedAccessInformationServiceAPI import from FixedAccessInformationServiceAPI_TypesAndValues all; @@ -45,7 +45,7 @@ module LibHttp_JsonTemplates { // LibMec/V2XInformationServiceAPI import from V2XInformationServiceAPI_TypesAndValues all; - + template (value) JsonBody m_json_body_raw( in template (value) charstring p_raw ) := { @@ -65,35 +65,35 @@ module LibHttp_JsonTemplates { } // End of template mw_body_json_problem_details group granting_api { - + template (value) JsonBody m_body_json_grant_request( in template (value) GrantRequest p_grant_request ) := { grantRequest := p_grant_request } // End of template m_body_json_grant_request - + template (present) JsonBody mw_body_json_grant_response( template (present) Grant p_grant_response := ? ) := { grantResponse := p_grant_response } // End of template m_wbody_json_grant_request - + } // End of group granting_api group meo_pkg_mgmt_api { - + template (value) JsonBody m_body_json_create_package_management( in template (value) CreateAppPkg p_create_pkg ) := { createAppPkg := p_create_pkg } // End of template m_body_json_create_package_management - + template (present) JsonBody mw_body_json_create_package_management( template (present) CreateAppPkg p_create_pkg := ? ) := { createAppPkg := p_create_pkg } // End of template mw_body_json_create_package_management - + template (present) JsonBody mw_body_json_app_pkg_info( in template (present) AppPkgInfo p_app_pkg_info := ? ) := { @@ -111,13 +111,13 @@ module LibHttp_JsonTemplates { ) := { appPkgInfoModifications := p_app_pkg_info_modification } // End of template m_body_json_app_pkg_info_modification - + template (present) JsonBody mw_body_json_app_pkg_info_modification( template (present) AppPkgInfoModifications p_app_pkg_info_modification := ? ) := { appPkgInfoModifications := p_app_pkg_info_modification } // End of template mw_body_json_app_pkg_info_modification - + template (value) JsonBody m_body_json_pkgm_subscription( in template (value) AppPkgSubscription p_app_pkg_subscription ) := { @@ -135,23 +135,23 @@ module LibHttp_JsonTemplates { ) := { appPkgSubscriptionLinkList := p_app_pkg_subscription_link_list } // End of template mw_body_json_pkgm_subscription_link_list - + template (present) JsonBody mw_body_json_app_package_notification ( template (present) AppPkgNotification p_app_pkg_notification := ? ) := { appPkgNotification := p_app_pkg_notification } // End of template mw_body_json_app_package_notification - + } // End of group meo_pkg_mgmt_api group mepm_lifcyclemgt { - + template (value) JsonBody m_body_json_config_platform_for_app_request( in template (value) ConfigPlatformForAppRequest p_config_platform_for_app_request ) := { configPlatformForAppRequest := p_config_platform_for_app_request } // End of template m_body_json_config_platform_for_app_request - + template (present) JsonBody mw_body_json_config_platform_for_app_request( template (present) ConfigPlatformForAppRequest p_config_platform_for_app_request := ? ) := { @@ -159,87 +159,87 @@ module LibHttp_JsonTemplates { } // End of template mw_body_json_config_platform_for_app_request } // End of mepm_lifcyclemgt - + group mex_lifcyclemgt { - + template (value) JsonBody m_body_json_create_app_instance_request ( in template (value) CreateAppInstanceRequest p_create_app_instance_request ) := { createAppInstanceRequest := p_create_app_instance_request } // End of template m_body_json_create_app_instance_request - + template (value) JsonBody m_body_json_app_instance_info ( in template (value) AppInstanceInfo p_app_instance_info ) := { appInstanceInfo := p_app_instance_info } // End of template m_body_json_app_instance_info - + template (present) JsonBody mw_body_json_app_instance_info ( template (present) AppInstanceInfo p_app_instance_info := ? ) := { appInstanceInfo := p_app_instance_info } // End of template mw_body_json_app_instance_info - + template (present) JsonBody mw_body_json_app_instance_info_list ( template (present) AppInstanceInfoList p_app_instance_info_list := ? ) := { appInstanceInfoList := p_app_instance_info_list } // End of template mw_body_json_app_instance_info_list - + /*template (present) JsonBody mw_body_json_mex_lcm_instance_info_list ( in template (present) AppInstanceInfoList p_app_instance_info_list ) := { appInstanceInfoList := p_app_instance_info_list } - - + + template (present) JsonBody m_body_json_lifecycle_management_instantiate ( in template (present) InstantiateAppRequest p_app_instance_instantiate ) := { appInstanceInstantiate := p_app_instance_instantiate } - + template (present) JsonBody m_body_json_lifecycle_management_instantiate_with_error ( in template (present) InstantiateAppRequestWithError p_app_instance_instantiate_with_error ) := { appInstanceInstantiateWithError := p_app_instance_instantiate_with_error } - - - + + + template (present) JsonBody m_body_json_lifecycle_management_terminate ( in template (present) TerminateAppRequest p_app_instance_terminate ) := { terminateType := p_app_instance_terminate } - + template (present) JsonBody m_body_json_lifecycle_management_terminate_with_error ( in template (present) TerminateAppRequestWithError p_app_instance_terminate_with_error ) := { terminateTypeWithError := p_app_instance_terminate_with_error } - - - + + + template (present) JsonBody m_body_json_lifecycle_management_operate ( in template (present) OperateAppRequest p_app_instance_operate ) := { changeStateTo := p_app_instance_operate } - + template (present) JsonBody m_body_json_lifecycle_management_operate_with_error ( in template (present) OperateAppRequestWithError p_app_instance_operate_with_error ) := { changeStateToWithError := p_app_instance_operate_with_error } - - + + template (present) JsonBody mw_body_json_lifecycle_op_occ_list ( in template (present) AppInstanceLcmOpOccList p_app_instance_op_occ_list ) := { appInstanceLcmOpOccList := p_app_instance_op_occ_list } - + template (present) JsonBody mw_body_json_lifecycle_op_occ ( in template (present) AppInstanceLcmOpOcc p_app_instance_op_occ ) := { @@ -257,8 +257,8 @@ module LibHttp_JsonTemplates { ) := { subscriptionRequestWithError := p_app_lcm_request_with_error } - - + + template (present) JsonBody mw_body_json_lcm_subscription_list( in template (present) SubscriptionInfoList p_app_lcm_subscription_list ) := { @@ -270,8 +270,8 @@ module LibHttp_JsonTemplates { ) := { subscriptionInfo := p_app_lcm_subscription } - - + + template (present) JsonBody mw_body_json_lcm_notification ( in template (present) Notification p_lcm_notification ) := { @@ -332,8 +332,8 @@ group ams_api { ) := { subscriptionLinkList_ams := p_amsSubscriptionLinkList } // End of template mw_body_json_ue_identity_problem_details - - + + template (present) JsonBody mw_body_json_mobility_procedure_notification( template (present) Ams_TypesAndValues.MobilityProcedureSubscription_ p_amsSubscriptionLinkList := ? ) := { @@ -356,91 +356,151 @@ group ams_api { } // end of group ams api group location_api { - + template (value) JsonBody m_body_json_user_info( in template (value) UserInfo p_user_info ) := { userInfo := p_user_info } // End of template m_body_json_user_info - + template (present) JsonBody mw_body_json_user_info( template (present) UserInfo p_user_info := ? ) := { userInfo := p_user_info } // End of template mw_body_json_user_info - + template (value) JsonBody m_body_json_user_list( in template (value) UserList p_user_list ) := { userList := p_user_list } // End of template m_body_json_user_list - + template (present) JsonBody mw_body_json_user_list( template (present) UserList p_user_list := ? ) := { userList := p_user_list } // End of template mw_body_json_user_list - + template (value) JsonBody m_body_json_zone_info( in template (value) LocationAPI_TypesAndValues.ZoneInfo p_zone_info ) := { zoneInfo := p_zone_info } // End of template m_body_json_zone_info - + template (present) JsonBody mw_body_json_zone_info( template (present) LocationAPI_TypesAndValues.ZoneInfo p_zone_info := ? ) := { zoneInfo := p_zone_info } // End of template mw_body_json_zone_info - + template (value) JsonBody m_body_json_access_point_list( in template (value) AccessPointList p_access_point_list ) := { accessPointList := p_access_point_list } // End of template m_body_json_access_point_list - + template (present) JsonBody mw_body_json_access_point_list( template (present) AccessPointList p_access_point_list := ? ) := { accessPointList := p_access_point_list } // End of template mw_body_json_access_point_list - - template (value) JsonBody m_body_json_user_tracking_subscription( - in template (value) UserTrackingSubscription p_user_tracking_subscription - ) := { - userTrackingSubscription := p_user_tracking_subscription - } // End of template m_body_json_user_tracking_subscription - - template (present) JsonBody mw_body_json_user_tracking_subscription( - template (present) UserTrackingSubscription p_user_tracking_subscription := ? - ) := { - userTrackingSubscription := p_user_tracking_subscription - } // End of template mw_body_json_user_rtracking_subscription - - template (value) JsonBody m_body_json_periodic_tracking_subscription( - in template (value) PeriodicTrackingSubscription p_periodic_tracking_subscription + + template (value) JsonBody m_body_json_notification_subscription_list( + in template (value) NotificationSubscriptionList p_notification_subscription_list + ) := { + notificationSubscriptionList := p_notification_subscription_list + } // End of template m_body_json_notification_subscription_list + + template (present) JsonBody mw_body_json_notification_subscription_list( + template (present) NotificationSubscriptionList p_notification_subscription_list := ? + ) := { + notificationSubscriptionList := p_notification_subscription_list + } // End of template mw_body_json_notification_subscription_list + + template (value) JsonBody m_body_json_user_location_event_subscription( + in template (value) UserLocationEventSubscription p_user_location_event_subscription + ) := { + userLocationEventSubscription := p_user_location_event_subscription + } // End of template m_body_json_user_location_event_subscription + + template (present) JsonBody mw_body_json_user_location_event_subscription( + template (present) UserLocationEventSubscription p_user_location_event_subscription := ? + ) := { + userLocationEventSubscription := p_user_location_event_subscription + } // End of template mw_body_json_user_location_event_subscription + + template (value) JsonBody m_body_json_user_location_periodic_subscription( + in template (value) UserLocationPeriodicSubscription p_user_location_periodic_subscription + ) := { + userLocationPeriodicSubscription := p_user_location_periodic_subscription + } // End of template m_body_json_user_location_periodic_subscription + + template (present) JsonBody mw_body_json_user_location_periodic_subscription( + template (present) UserLocationPeriodicSubscription p_user_location_periodic_subscription := ? + ) := { + userLocationPeriodicSubscription := p_user_location_periodic_subscription + } // End of template mw_body_json_user_location_periodic_subscription + + template (value) JsonBody m_body_json_zone_location_event_subscription( + in template (value) ZoneLocationEventSubscription p_zone_location_event_subscription + ) := { + zoneLocationEventSubscription := p_zone_location_event_subscription + } // End of template m_body_json_zone_location_event_subscription + + template (present) JsonBody mw_body_json_zone_location_event_subscription( + template (present) ZoneLocationEventSubscription p_zone_location_event_subscription := ? + ) := { + zoneLocationEventSubscription := p_zone_location_event_subscription + } // End of template mw_body_json_zone_location_event_subscription + + template (value) JsonBody m_body_json_zone_status_subscription( + in template (value) ZoneStatusSubscription p_zone_status_subscription + ) := { + zoneStatusSubscription := p_zone_status_subscription + } // End of template m_body_json_zone_status_subscription + + template (present) JsonBody mw_body_json_zone_status_subscription( + template (present) ZoneStatusSubscription p_zone_status_subscription := ? + ) := { + zoneStatusSubscription := p_zone_status_subscription + } // End of template mw_body_json_zone_status_subscription + + template (value) JsonBody m_body_json_user_area_subscription( + in template (value) UserAreaSubscription p_user_area_subscription + ) := { + userAreaSubscription := p_user_area_subscription + } // End of template m_body_json_user_area_subscription + + template (present) JsonBody mw_body_json_user_area_subscription( + template (present) UserAreaSubscription p_user_area_subscription := ? + ) := { + userAreaSubscription := p_user_area_subscription + } // End of template mw_body_json_user_area_subscription + + template (value) JsonBody m_body_json_user_distance_subscription( + in template (value) UserDistanceSubscription p_user_distance_subscription ) := { - periodicTrackingSubscription := p_periodic_tracking_subscription - } // End of template m_body_json_periodic_tracking_subscription - - template (present) JsonBody mw_body_json_periodic_tracking_subscription( - template (present) PeriodicTrackingSubscription p_periodic_tracking_subscription := ? + userDistanceSubscription := p_user_distance_subscription + } // End of template m_body_json_user_distance_subscription + + template (present) JsonBody mw_body_json_user_distance_subscription( + template (present) UserDistanceSubscription p_user_distance_subscription := ? ) := { - periodicTrackingSubscription := p_periodic_tracking_subscription - } // End of template mw_body_json_periodic_rtracking_subscription - + userDistanceSubscription := p_user_distance_subscription + } // End of template mw_body_json_user_distance_subscription + template (value) JsonBody m_body_json_terminal_distance( in template (value) TerminalDistance p_terminal_distance ) := { terminalDistance := p_terminal_distance } // End of template m_body_json_terminal_distance - + template (present) JsonBody mw_body_json_terminal_distance( template (present) TerminalDistance p_terminal_distance := ? ) := { terminalDistance := p_terminal_distance } // End of template mw_body_json_terminal_distance - + } // End of group location_api group ue_identity_api { @@ -450,13 +510,13 @@ group ams_api { ) := { ueIdentityTagInfo := p_ueIdentityTagInfo } // End of template m_body_json_ue_identity_tag_info - + template (present) JsonBody mw_body_json_ue_identity_tag_info( template (present) UeIdentityTagInfo p_ueIdentityTagInfo := ? ) := { ueIdentityTagInfo := p_ueIdentityTagInfo } // End of template mw_body_json_ue_identity_tag_info - + } // End of group ue_identity_api group rnis_subscriptions { @@ -466,189 +526,189 @@ group ams_api { ) := { subscriptionLinkList := p_subscriptionLinkList } // End of template m_body_json_subscriptions_list - + template (present) JsonBody mw_body_json_subscriptions_list( template (present) RnisAPI_TypesAndValues.SubscriptionLinkList p_subscriptionLinkList := ? ) := { subscriptionLinkList := p_subscriptionLinkList } // End of template mw_body_json_subscriptions_list - + template (value) JsonBody m_body_json_cell_change_subscription( in template (value) CellChangeSubscription p_cellChangeSubscription ) := { cellChangeSubscription := p_cellChangeSubscription } // End of template m_body_json_cell_change_subscription - + template (present) JsonBody mw_body_json_cell_change_subscription( template (present) CellChangeSubscription p_cellChangeSubscription := ? ) := { cellChangeSubscription := p_cellChangeSubscription } // End of template mw_body_json_cell_change_subscription - + template (value) JsonBody m_body_json_rab_info( in template (value) RabInfo p_rabInfo ) := { rabInfo := p_rabInfo } // End of template m_body_json_rab_info - + template (present) JsonBody mw_body_json_rab_info( template (present) RabInfo p_rabInfo := ? ) := { rabInfo := p_rabInfo } // End of template mw_body_json_rab_info - + template (value) JsonBody m_body_json_plmn_infos( in template (value) PlmnInfos p_plmnInfos ) := { plmnInfos := p_plmnInfos } // End of template m_body_json_plmn_infos - + template (present) JsonBody mw_body_json_plmn_infos( template (present) PlmnInfos p_plmnInfos := ? ) := { plmnInfos := p_plmnInfos } // End of template mw_body_json_plmn_infos - + template (value) JsonBody m_body_json_s1_bearer_info( in template (value) S1BearerInfo p_s1BearerInfo ) := { s1BearerInfo := p_s1BearerInfo } // End of template m_body_json_s1_bearer_info - + template (present) JsonBody mw_body_json_s1_bearer_info( template (present) S1BearerInfo p_s1BearerInfo := ? ) := { s1BearerInfo := p_s1BearerInfo } // End of template mw_body_json_s1_bearer_info - + template (value) JsonBody m_body_json_rab_est_subscription( in template (value) RabEstSubscription p_rabEstSubscription ) := { rabEstSubscription := p_rabEstSubscription } // End of template m_body_json_rab_est_subscription - + template (present) JsonBody mw_body_json_rab_est_subscription( template (present) RabEstSubscription p_rabEstSubscription := ? ) := { rabEstSubscription := p_rabEstSubscription } // End of template mw_body_json_rab_est_subscription - + template (value) JsonBody m_body_json_rab_mod_subscription( in template (value) RabModSubscription p_rabModSubscription ) := { rabModSubscription := p_rabModSubscription } // End of template m_body_json_rab_mod_subscription - + template (present) JsonBody mw_body_json_rab_mod_subscription( template (present) RabModSubscription p_rabModSubscription := ? ) := { rabModSubscription := p_rabModSubscription } // End of template mw_body_json_rab_mod_subscription - + template (value) JsonBody m_body_json_rab_rel_subscription( in template (value) RabRelSubscription p_rabRelSubscription ) := { rabRelSubscription := p_rabRelSubscription } // End of template m_body_json_rab_rel_subscription - + template (present) JsonBody mw_body_json_rab_rel_subscription( template (present) RabRelSubscription p_rabRelSubscription := ? ) := { rabRelSubscription := p_rabRelSubscription } // End of template mw_body_json_rab_rel_subscription - + template (value) JsonBody m_body_json_meas_rep_ue_subscription( in template (value) MeasRepUeSubscription p_measRepUeSubscription ) := { measRepUeSubscription := p_measRepUeSubscription } // End of template m_body_json_meas_rep_ue_subscription - + template (present) JsonBody mw_body_json_meas_rep_ue_subscription( template (present) MeasRepUeSubscription p_measRepUeSubscription := ? ) := { measRepUeSubscription := p_measRepUeSubscription } // End of template mw_body_json_meas_rep_ue_subscription - + template (value) JsonBody m_body_json_meas_ta_subscription( in template (value) MeasTaSubscription p_measTaSubscription ) := { measTaSubscription := p_measTaSubscription } // End of template m_body_json_meas_ta_subscription - + template (present) JsonBody mw_body_json_meas_ta_subscription( template (present) MeasTaSubscription p_measTaSubscription := ? ) := { measTaSubscription := p_measTaSubscription } // End of template mw_body_json_meas_ta_subscription - + template (value) JsonBody m_body_json_ca_reconf_subscription( in template (value) CaReConfSubscription p_caReconfSubscription ) := { caReConfSubscription := p_caReconfSubscription } // End of template m_body_json_ca_reconf_subscription - + template (present) JsonBody mw_body_json_ca_reconf_subscription( template (present) CaReConfSubscription p_caReconfSubscription := ? ) := { caReConfSubscription := p_caReconfSubscription } // End of template mw_body_json_ca_reconf_subscription - + template (value) JsonBody m_body_json_s1_bearer_subscription( in template (value) S1BearerSubscription p_s1BearerSubscription ) := { s1BearerSubscription := p_s1BearerSubscription } // End of template m_body_json_s1_bearer_subscription - + template (present) JsonBody mw_body_json_s1_bearer_subscription( template (present) S1BearerSubscription p_s1BearerSubscription := ? ) := { s1BearerSubscription := p_s1BearerSubscription } // End of template mw_body_json_s1_bearer_subscription - + template (value) JsonBody m_body_json_l2_meas_subscription( in template (value) L2Meas p_l2Meas ) := { l2Meas := p_l2Meas } // End of template m_body_json_l2_meas_subscription - + template (present) JsonBody mw_body_json_l2_meas_subscription( template (present) L2Meas p_l2Meas := ? ) := { l2Meas := p_l2Meas } // End of template mw_body_json_l2_meas_subscription - + } // End of group rnis_subscriptions - + group rnis_notifications { - + } // End of group rnis_notifications - + group traffic_management_api { - + template (value) JsonBody m_body_json_bw_info( in template (value) BwInfo p_bwInfo ) := { bwInfo := p_bwInfo } // End of template m_body_json_bw_info - + template (present) JsonBody mw_body_json_bw_info( template (present) BwInfo p_bwInfo := ? ) := { bwInfo := p_bwInfo } // End of template mw_body_json_bw_info - + template (value) JsonBody m_body_json_bw_info_deltas( in template (value) BwInfoDeltas p_bwInfoDeltas ) := { bwInfoDeltas := p_bwInfoDeltas } // End of template m_body_json_bw_info_deltas - + template (present) JsonBody mw_body_json_bw_info_deltas( template (present) BwInfoDeltas p_bwInfoDeltas := ? ) := { bwInfoDeltas := p_bwInfoDeltas } // End of template mw_body_json_bw_info_deltas - + template (present) JsonBody mw_body_json_bw_info_list( template (present) BwInfoList p_bwInfoList := ? ) := { @@ -660,35 +720,35 @@ group ams_api { ) := { mtsCapabilityInfo := p_mtsCapabilityInfo } // End of template m_body_json_mts_capability_info - + template (present) JsonBody mw_body_json_mts_capability_info( template (present) MtsCapabilityInfo p_mtsCapabilityInfo := ? ) := { mtsCapabilityInfo := p_mtsCapabilityInfo } // End of template mw_body_json_mts_capability_info - + template (value) JsonBody m_body_json_mts_session_info( in template (value) MtsSessionInfo p_mtsSessionInfo ) := { mtsSessionInfo := p_mtsSessionInfo } // End of template m_body_json_mts_session_info - + template (present) JsonBody mw_body_json_mts_session_info( template (present) MtsSessionInfo p_mtsSessionInfo := ? ) := { mtsSessionInfo := p_mtsSessionInfo } // End of template mw_body_json_mts_session_info - + template (present) JsonBody mw_body_json_mts_session_info_list( template (present) MtsSessionInfos p_mtsSessionInfos := ? ) := { mtsSessionInfos := p_mtsSessionInfos } // End of template mw_body_json_mts_session_info_list - + } // End of group traffic_management_api group app_enablement_api { - + template (value) JsonBody m_body_json_service_info_list( in template (value) ServiceInfoList p_serviceInfoList ) := { @@ -712,7 +772,7 @@ group ams_api { ) := { serviceInfo := p_serviceInfo } // End of template mw_body_json_service_info - + template (value) JsonBody m_body_json_subscription_link_list( in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.SubscriptionLinkList p_subscription_link_list ) := { @@ -778,125 +838,125 @@ group ams_api { ) := { transportInfoList := p_transportInfoList } // End of template m_body_json_transport_info_list - + template (present) JsonBody mw_body_json_transport_info_list( template (present) TransportInfoList p_transportInfoList := ? ) := { transportInfoList := p_transportInfoList } // End of template mw_body_json_transport_info_list - + template (value) JsonBody m_body_json_dns_rule( in template (value) DnsRule p_dnsRule ) := { dnsRule := p_dnsRule } // End of template m_body_json_dns_rule - + template (present) JsonBody mw_body_json_dns_rule( template (present) DnsRule p_dnsRule := ? ) := { dnsRule := p_dnsRule } // End of template mw_body_json_dns_rule - + template (value) JsonBody m_body_json_dns_rule_list( in template (value) DnsRuleList p_dnsRuleList ) := { dnsRuleList := p_dnsRuleList } // End of template m_body_json_dns_rule_list - + template (present) JsonBody mw_body_json_dns_rule_list( template (present) DnsRuleList p_dnsRuleList := ? ) := { dnsRuleList := p_dnsRuleList } // End of template mw_body_json_dns_rule_list - + template (value) JsonBody m_body_json_srv_avail_notif_subscription( in template (value) SerAvailabilityNotificationSubscription p_serAvailabilityNotificationSubscription ) := { serAvailabilityNotificationSubscription := p_serAvailabilityNotificationSubscription } // End of template m_body_json_srv_avail_notif_subscription - + template (present) JsonBody mw_body_json_srv_avail_notif_subscription( template (present) SerAvailabilityNotificationSubscription p_serAvailabilityNotificationSubscription := ? ) := { serAvailabilityNotificationSubscription := p_serAvailabilityNotificationSubscription } // End of template mw_body_json_srv_avail_notif_subscription - + template (value) JsonBody m_body_json_timing_caps( in template (value) TimingCaps p_timingCaps ) := { timingCaps := p_timingCaps } // End of template m_body_json_timing_caps - + template (present) JsonBody mw_body_json_timing_caps( template (present) TimingCaps p_timingCaps := ? ) := { timingCaps := p_timingCaps } // End of template mw_body_json_timing_caps - + template (value) JsonBody m_body_json_current_time( in template (value) CurrentTime p_currentTime ) := { currentTime := p_currentTime } // End of template m_body_json_current_time - + template (present) JsonBody mw_body_json_current_time( template (present) CurrentTime p_currentTime := ? ) := { currentTime := p_currentTime } // End of template mw_body_json_current_time - + template (value) JsonBody m_body_json_traffic_rule( in template (value) TrafficRule p_trafficRule ) := { trafficRule := p_trafficRule } // End of template m_body_json_traffic_rule - + template (present) JsonBody mw_body_json_traffic_rule( template (present) TrafficRule p_trafficRule := ? ) := { trafficRule := p_trafficRule } // End of template mw_body_json_traffic_rule - + template (value) JsonBody m_body_json_traffic_rule_list( in template (value) TrafficRuleList p_trafficRuleList ) := { trafficRuleList := p_trafficRuleList } // End of template m_body_json_traffic_rule_list - + template (present) JsonBody mw_body_json_traffic_rule_list( template (present) TrafficRuleList p_trafficRuleList := ? ) := { trafficRuleList := p_trafficRuleList } // End of template mw_body_json_traffic_rule_list - + } // End of group app_enablement_api - + group ue_app_ctx { - + template (value) JsonBody m_body_json_app_context( in template (value) UEAppInterfaceAPI_TypesAndValues.AppContext p_appContext ) := { appContext := p_appContext } // End of template m_body_json_app_context - + template (present) JsonBody mw_body_json_app_context( template (present) UEAppInterfaceAPI_TypesAndValues.AppContext p_appContext := ? ) := { appContext := p_appContext } // End of template mw_body_json_app_context - + template (value) JsonBody m_body_json_app_info( in template (value) UEAppInterfaceAPI_TypesAndValues.AppInfo p_appInfo ) := { appInfo := p_appInfo } // End of template m_body_json_app_info - + template (present) JsonBody mw_body_json_app_info( template (present) UEAppInterfaceAPI_TypesAndValues.AppInfo p_appInfo := ? ) := { appInfo := p_appInfo } // End of template mw_body_json_app_info - + } // End of group ue_app_ctx group device_information { @@ -1188,79 +1248,79 @@ group ams_api { } // End of group v2x_information_service group fai { - + template (value) JsonBody m_body_json_fai_fa_info( in template (value) FaInfo p_faInfo ) := { faInfo := p_faInfo } // End of template m_body_json_fai_fa_info - + template (present) JsonBody mw_body_json_fai_fa_info( template (present) FaInfo p_faInfo := ? ) := { faInfo := p_faInfo } // End of template mw_body_json_fai_fa_info - + template (value) JsonBody m_body_json_fai_device_info( in template (value) DeviceInfo p_deviceInfo ) := { deviceInfo := p_deviceInfo } // End of template m_body_json_fai_device_info - + template (present) JsonBody mw_body_json_fai_device_info( template (present) DeviceInfo p_deviceInfo := ? ) := { deviceInfo := p_deviceInfo } // End of template mw_body_json_fai_device_info - + template (value) JsonBody m_body_json_fai_cable_line_info( in template (value) CableLineInfo p_cableLineInfo ) := { cableLineInfo := p_cableLineInfo } // End of template m_body_json_fai_cable_line_info - + template (present) JsonBody mw_body_json_fai_cable_line_info( template (present) CableLineInfo p_cableLineInfo := ? ) := { cableLineInfo := p_cableLineInfo } // End of template mw_body_json_fai_cable_line_info - + template (value) JsonBody m_body_json_fai_pon_info( in template (value) PonInfo p_ponInfo ) := { ponInfo := p_ponInfo } // End of template m_body_json_fai_pon_info - + template (present) JsonBody mw_body_json_fai_pon_info( template (present) PonInfo p_ponInfo := ? ) := { ponInfo := p_ponInfo } // End of template mw_body_json_fai_pon_info - + template (value) JsonBody m_body_json_fai_subscription_link_list( in template (value) FixedAccessInformationServiceAPI_TypesAndValues.SubscriptionLinkList p_subscriptionLinkList ) := { subscriptionLinkList_fai := p_subscriptionLinkList } // End of template m_body_json_fai_subscription_link_list - + template (present) JsonBody mw_body_json_fai_subscription_link_list( template (present) FixedAccessInformationServiceAPI_TypesAndValues.SubscriptionLinkList p_subscriptionLinkList := ? ) := { subscriptionLinkList_fai := p_subscriptionLinkList } // End of template mw_body_json_fai_subscription_link_list - + template (value) JsonBody m_body_json_fai_onu_alarm_subscription_link_list( in template (value) OnuAlarmSubscription p_onuAlarmSubscription ) := { onuAlarmSubscription := p_onuAlarmSubscription } // End of template m_body_json_fai_onu_alarm_subscription_link_list - + template (present) JsonBody mw_body_json_fai_onu_alarm_subscription_link_list( template (present) OnuAlarmSubscription p_onuAlarmSubscription := ? ) := { onuAlarmSubscription := p_onuAlarmSubscription } // End of template mw_body_json_fai_onu_alarm_subscription_link_list - + } // End of group fai } // End of module LibHttp_JsonTemplates -- GitLab From 16b1e93dae1d04e486e72a39bece238503c85c27 Mon Sep 17 00:00:00 2001 From: garciay Date: Mon, 17 Jul 2023 10:22:51 +0200 Subject: [PATCH 18/58] Rebuild AtsMec with new typing --- ttcn/AtsMec_Location/module.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/ttcn/AtsMec_Location/module.mk b/ttcn/AtsMec_Location/module.mk index f34f292..480db29 100644 --- a/ttcn/AtsMec_Location/module.mk +++ b/ttcn/AtsMec_Location/module.mk @@ -26,6 +26,7 @@ modules := ../LibCommon \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ ../../titan-test-system-framework/ccsrc/Helpers \ ../../ccsrc/Ports/LibHttp \ ../../ccsrc/EncDec/LibMec \ -- GitLab From d1a0274e7de05a3d2d0487bfb86c9c55439f8cfd Mon Sep 17 00:00:00 2001 From: garciay Date: Mon, 17 Jul 2023 10:41:03 +0200 Subject: [PATCH 19/58] Align virtualization/docker-dev/Dockerfile.stfubuntu with the other ETSI projects --- virtualization/docker-dev/Dockerfile | 57 ++++++------------- .../docker-dev/Dockerfile.stfubuntu | 2 +- virtualization/docker-dev/build.sh | 2 +- 3 files changed, 19 insertions(+), 42 deletions(-) diff --git a/virtualization/docker-dev/Dockerfile b/virtualization/docker-dev/Dockerfile index cae4b24..37c7b15 100644 --- a/virtualization/docker-dev/Dockerfile +++ b/virtualization/docker-dev/Dockerfile @@ -1,49 +1,26 @@ -FROM alpine:latest - -# Install dependencies -RUN apk update && \ - apk add --no-cache sudo make git g++ diffutils expect openssl-dev libxml2-dev libxml2-utils libxslt-dev libtool ncurses-dev jsoncpp-dev readline-dev flex bison perl libexecinfo-dev bash libedit libedit-dev lksctp-tools lksctp-tools-dev libpcap-dev - -# Create user and sudouser -RUN \ - addgroup -g 1000 etsi && \ - adduser -S -D -u 1000 -G etsi -h /home/etsi -s /bin/bash etsi && \ - echo "etsi:etsi" | chpasswd && \ - echo "etsi ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers || exit 1 -USER etsi +FROM stfubuntu:20.04 -# Setup Hosts file at the boot time -RUN \ - echo 'sudo sh -c "cp /etc/hosts /etc/append && (echo \"127.0.1.1 $HOSTNAME\"; cat /etc/append) > /etc/hosts"' >> /home/etsi/.bashrc \ - echo 'sh' >> /home/etsi/.bashrc || exit 1 +MAINTAINER ETSI TTF T027 -# Clone Titan -WORKDIR /home/etsi -RUN mkdir -p frameworks dev tmp && cd frameworks && git clone https://github.com/eclipse/titan.core.git || exit 1 -WORKDIR /home/etsi/frameworks/titan.core/ +LABEL description="TTF_T027_Mec Docker Image" -# Setup ENV variables -ENV TTCN3_DIR=/home/etsi/frameworks/titan.core/Install -ENV PATH=$TTCN3_DIR/bin:$PATH \ - LD_LIBRARY_PATH=$TTCN3_DIR/lib:$LD_LIBRARY_PATH +ENV TERM=linux \ + HOME=/home/etsi \ + HOSTNAME=docker-titan-TTF_T027 -# Set flags -RUN \ - echo "ALPINE_LINUX=yes" > Makefile.personal && \ - echo "TTCN3_DIR=$TTCN3_DIR" >> Makefile.personal && \ - echo "JNI=no" >> Makefile.personal && \ - echo "GUI=no" >> Makefile.personal && \ - echo "DEBUG=no" >> Makefile.personal || exit 1 +COPY home /home/etsi -# Build Titan -RUN \ - sed --in-place 's/LINUX_LIBS := -lxml2/LINUX_LIBS := -lxml2 -lpthread/g' ./core/Makefile && \ - make install && make clean || exit 1 +RUN cd /home/etsi \ + && chown -R etsi:etsi . \ + && ls ./etc/init.d/*.sh | while read S; do chmod 0750 "$S" || exit 1; done -WORKDIR /home/etsi/dev +USER etsi -ENV ATS=AtsCise +RUN cd ${HOME} \ + && export PATH=$HOME/bin:$PATH \ + && ls ${HOME}/etc/init.d/*.sh | while read S; do /bin/bash -c "$S" || exit 1; done \ + && rm -fr ${HOME}/etc -EXPOSE 30181/tcp +CMD ["/bin/bash"] -ENTRYPOINT /home/yann/dev/cise/virtualization/docker/docker-entrypoint.sh +# That's all Floks diff --git a/virtualization/docker-dev/Dockerfile.stfubuntu b/virtualization/docker-dev/Dockerfile.stfubuntu index 9fa6645..2805900 100644 --- a/virtualization/docker-dev/Dockerfile.stfubuntu +++ b/virtualization/docker-dev/Dockerfile.stfubuntu @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 LABEL ETSI CTI LABEL description="STF Docker Ubuntu image" diff --git a/virtualization/docker-dev/build.sh b/virtualization/docker-dev/build.sh index a7859fb..accf9e0 100755 --- a/virtualization/docker-dev/build.sh +++ b/virtualization/docker-dev/build.sh @@ -13,7 +13,7 @@ if [ "$1" == "--force-stfubuntu" ]; then fi # Check and build stfubuntu image if [ -z `docker images -q stfubuntu` ]; then - docker build --no-cache --tag stfubuntu:18.04 -f Dockerfile.stfubuntu --force-rm . || exit 1 + docker build --no-cache --tag stfubuntu:22.04 -f Dockerfile.stfubuntu --force-rm . || exit 1 fi docker build --no-cache --tag mec_devel --force-rm . || ( echo "Docker build failed: $?"; exit 1 ) -- GitLab From 1cfe472e33c471c3d5c61071708b146393ecd456 Mon Sep 17 00:00:00 2001 From: garciay Date: Mon, 17 Jul 2023 11:01:00 +0200 Subject: [PATCH 20/58] Align virtualization/docker-dev/Dockerfile.stfubuntu with the other ETSI projects --- virtualization/docker-dev/Dockerfile.stfubuntu | 2 +- virtualization/docker-dev/build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/virtualization/docker-dev/Dockerfile.stfubuntu b/virtualization/docker-dev/Dockerfile.stfubuntu index 2805900..9fa6645 100644 --- a/virtualization/docker-dev/Dockerfile.stfubuntu +++ b/virtualization/docker-dev/Dockerfile.stfubuntu @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:20.04 LABEL ETSI CTI LABEL description="STF Docker Ubuntu image" diff --git a/virtualization/docker-dev/build.sh b/virtualization/docker-dev/build.sh index accf9e0..2eb0390 100755 --- a/virtualization/docker-dev/build.sh +++ b/virtualization/docker-dev/build.sh @@ -13,7 +13,7 @@ if [ "$1" == "--force-stfubuntu" ]; then fi # Check and build stfubuntu image if [ -z `docker images -q stfubuntu` ]; then - docker build --no-cache --tag stfubuntu:22.04 -f Dockerfile.stfubuntu --force-rm . || exit 1 + docker build --no-cache --tag stfubuntu:20.04 -f Dockerfile.stfubuntu --force-rm . || exit 1 fi docker build --no-cache --tag mec_devel --force-rm . || ( echo "Docker build failed: $?"; exit 1 ) -- GitLab From 155178092835f779813a29c09457543b999d2385 Mon Sep 17 00:00:00 2001 From: garciay Date: Mon, 7 Aug 2023 14:51:43 +0200 Subject: [PATCH 21/58] Review typing for MEC 010-2 V3.1.1; Rebuild all test suites before starting reviewing and implementations --- ...ceApplicationInterfaceAPI_TestControl.ttcn | 104 - .../AtsMec_UEAppInterfaceAPI_TestCases.ttcn | 641 --- .../module.mk | 48 - ...leAndOperationGrantingAPI_TestControl.ttcn | 103 - ttcn/AtsMec/AtsMec_LcRRm/module.mk | 48 - ...ycleAndOperationGrantingAPI_TestCases.ttcn | 34 +- ...leAndOperationGrantingAPI_TestControl.ttcn | 18 + .../module.mk | 36 + ...viceApplicationInterfaceAPI_TestCases.ttcn | 0 ...ceApplicationInterfaceAPI_TestControl.ttcn | 30 + .../module.mk | 37 + .../module.mk | 2 + ttcn/AtsMec_FederationEnablement/module.mk | 3 +- ...AccessInformationServiceAPI_TestCases.ttcn | 2 +- .../module.mk | 3 +- ttcn/AtsMec_IoT/module.mk | 3 +- .../AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn | 7 +- ttcn/AtsMec_Rnis/module.mk | 3 +- ..._MultiAccessSteeringInfoAPI_TestCases.ttcn | 85 +- ...AtsMec_TrafficManagementAPI_TestCases.ttcn | 24 +- ttcn/AtsMec_TrafficManagement/module.mk | 5 +- ttcn/AtsMec_UEidentity/module.mk | 2 +- ttcn/AtsMec_V2XInformationService/module.mk | 2 + .../AtsMec_WlanInformationAPI_TestCases.ttcn | 35 +- ttcn/AtsMec_WlanInformation/module.mk | 3 +- ...ycleAndOperationGrantingAPI_Templates.ttcn | 38 +- ...ndOperationGrantingAPI_TypesAndValues.ttcn | 3654 +++++++++-------- ...pplicationInterfaceAPI_TypesAndValues.ttcn | 16 +- ...plicationEnablementAPI_TypesAndValues.ttcn | 62 +- 29 files changed, 2203 insertions(+), 2845 deletions(-) delete mode 100644 ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn delete mode 100644 ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_UEAppInterfaceAPI_TestCases.ttcn delete mode 100644 ttcn/AtsMec/AtsMec_DeviceApplicationInterface/module.mk delete mode 100644 ttcn/AtsMec/AtsMec_LcRRm/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn delete mode 100644 ttcn/AtsMec/AtsMec_LcRRm/module.mk rename ttcn/{AtsMec/AtsMec_LcRRm => AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting}/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn (98%) create mode 100644 ttcn/AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn create mode 100644 ttcn/AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting/module.mk rename ttcn/{AtsMec => }/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn (100%) create mode 100644 ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn create mode 100644 ttcn/AtsMec_DeviceApplicationInterface/module.mk diff --git a/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn b/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn deleted file mode 100644 index cb02a26..0000000 --- a/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn +++ /dev/null @@ -1,104 +0,0 @@ -module AtsMec_TestControl { - - // LibMec/LocationAPI - import from LocationAPI_Pics all; - // LibMec/UEidentityAPI - import from UEidentityAPI_Pics all; - // LibMec/RnisAPI - import from RnisAPI_Pics all; - // LibMec/TrafficManagementAPI - import from TrafficManagementAPI_Pics all; - // LibMec/AppEnablementAPI - import from EdgePlatformApplicationEnablementAPI_Pics all; - // LibMec/UEAppInterfaceAPI - import from UEAppInterfaceAPI_Pics all; - - // LibMec - import from LibMec_Pics all; - - // AtsMec - import from AtsMec_UEidentityAPI_TestCases all; -// import from AtsMec_RadioNodeLocationAPI_TestCases all; - import from AtsMec_RnisAPI_TestCases all; - import from AtsMec_TrafficManagementAPI_TestCases all; - import from AtsMec_EdgePlatformApplicationEnablementAPI_TestCases all; - import from AtsMec_UEAppInterfaceAPI_TestCases all; - - control { - - if (PICS_MEC_PLAT and PICS_SERVICES) { - if (PICS_UE_IDENTITY_API_SUPPORTED) { - execute(TC_MEC_MEC014_SRV_UETAG_001_OK()); - execute(TC_MEC_MEC014_SRV_UETAG_001_BR()); - execute(TC_MEC_MEC014_SRV_UETAG_001_NF()); - execute(TC_MEC_MEC014_SRV_UETAG_002_OK()); - execute(TC_MEC_MEC014_SRV_UETAG_002_BR()); - execute(TC_MEC_MEC014_SRV_UETAG_002_PF()); - } - if (PICS_LOCATION_API_SUPPORTED) { - - -// execute(TC_MEC_PLAT_RLOC_001_OK()); -// execute(TC_MEC_PLAT_RLOC_001_NF()); - } - - if (PICS_APP_ENABLEMENT_API_SUPPORTED) { - /*execute(TC_MEC_SRV_TRANS_001_OK()); - execute(TC_MEC_SRV_TRAF_001_OK()); - execute(TC_MEC_SRV_TRAF_002_OK()); - execute(TC_MEC_SRV_TRAF_003_OK()); - execute(TC_MEC_SRV_TRAF_001_NF());*/ - } - - if (PICS_ENABLE_UE_APP_CTX) { - execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_NF()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_NF()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_NF()); - } - } - - /*if (PICS_RNIS) { - if (PICS_RNIS_NOTIFICATIONS) { - execute(TC_MEC_MEC012_SRV_RNIS_001_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_002_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_003_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_004_OK()); - } - if (PICS_RNIS_ALL_SUBSCRIPTIONS) { - execute(TC_MEC_MEC012_SRV_RNIS_011_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_012_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_011_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_012_BR()); - } - if (PICS_RNIS_QUERY) { - execute(TC_MEC_MEC012_SRV_RNIS_016_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_016_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_016_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_017_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_017_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_017_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_018_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_018_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_018_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_019_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_019_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_019_NF()); - } - }*/ - - if (PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED) { - execute(TC_MEC_MEC015_SRV_TM_001_OK()); - execute(TC_MEC_MEC015_SRV_TM_002_OK()); - execute(TC_MEC_MEC015_SRV_TM_002_BR()); - execute(TC_MEC_MEC015_SRV_TM_002_NF()); - } - } // End of 'control' statement - -} // End of module AtsMec_TestControl diff --git a/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_UEAppInterfaceAPI_TestCases.ttcn b/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_UEAppInterfaceAPI_TestCases.ttcn deleted file mode 100644 index 7952f35..0000000 --- a/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_UEAppInterfaceAPI_TestCases.ttcn +++ /dev/null @@ -1,641 +0,0 @@ -/** - * @author ETSI / STF569 - * @version $URL:$ - * $ID:$ - * @desc This module provides the MEC test cases. - * @copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * @see ETSI GS MEC 003, Draft ETSI GS MEC 013 V2.0.3 (2018-10) - */ -module AtsMec_UEAppInterfaceAPI_TestCases { - - // Libcommon - import from LibCommon_Sync all; - - // LibHttp - import from LibHttp_TypesAndValues all; - import from LibHttp_Functions all; - import from LibHttp_Templates all; - import from LibHttp_JsonTemplates all; - import from LibHttp_TestSystem all; - - // LibMec/UEAppInterfaceAPI - import from UEAppInterfaceAPI_Templates all; - import from UEAppInterfaceAPI_Functions all; - import from UEAppInterfaceAPI_Pics all; - import from UEAppInterfaceAPI_Pixits all; - - // LibMec - import from LibMec_Functions all; - import from LibMec_Pics all; - import from LibMec_Pixits all; - - group ue_app_ctx { - - /** - * @desc Check that the IUT acknowledges the creation of the application context when requested by an UE Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPCTX_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_UE_APP_CTX_URI, - v_headers, - m_http_message_body_json( - m_body_json_app_context( - m_app_context( - PX_CONTEXT_ID, - PX_ASSOCIATE_UE_APP_ID, - m_required_app_info( - PX_APP_NAME, - PX_APP_PROVIDER, - PX_REFERENCE_URL - ))))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_app_context( - mw_app_context( - -, - -, - mw_required_app_info( - PX_APP_NAME - ))))))) -> value v_response { - tc_ac.stop; - - if (f_check_headers(v_response.response.header) == true) { - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppContext ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } else { - log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPCTX_001_OK - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPCTX_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_UE_APP_CTX_URI, - v_headers, - m_http_message_body_json( - m_body_json_app_context( - m_app_context( - PX_CONTEXT_ID, - PX_ASSOCIATE_UE_APP_ID, - m_required_app_info( - PX_APP_NAME, - PX_APP_PROVIDER, - PX_REFERENCE_URL - ))))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppTerminationNotificationSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPCTX_001_BR - - /** - * @desc Check that the IUT updates the application callback reference when commanded by an UE Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_ue_app_ctx(); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_UE_APP_CTX_URI & "/" & oct2char(unichar2oct(PX_CONTEXT_ID)), - v_headers, - m_http_message_body_json( - m_body_json_app_context( - m_app_context( - PX_CONTEXT_ID, - PX_ASSOCIATE_UE_APP_ID, - m_required_app_info( - PX_APP_NAME, - PX_APP_PROVIDER, - PX_REFERENCE_URL - ), - PX_CALLBACK_REF - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppContext ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_ue_app_ctx(); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_OK - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_UE_APP_CTX_URI & "/" & oct2char(unichar2oct(PX_CONTEXT_ID)), - v_headers, - m_http_message_body_json( - m_body_json_app_context( - m_app_context( - PX_CONTEXT_ID, - PX_ASSOCIATE_UE_APP_ID, - m_required_app_info( - PX_APP_NAME, - PX_APP_PROVIDER, - PX_REFERENCE_URL - ), - PX_CALLBACK_REF - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppContext ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_BR - - /** - * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_UE_APP_CTX_URI & "/" & oct2char(unichar2oct(PX_CONTEXT_ID)), - v_headers, - m_http_message_body_json( - m_body_json_app_context( - m_app_context( - PX_NON_EXISTENT_CONTEXT_ID, - PX_ASSOCIATE_UE_APP_ID, - m_required_app_info( - PX_APP_NAME, - PX_APP_PROVIDER, - PX_REFERENCE_URL - ), - PX_CALLBACK_REF - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppContext ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_NF - - /** - * @desc Check that the IUT deletes the application context when commanded by an UE Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPCTX_003_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_ue_app_ctx(); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - "/" & PICS_ROOT_API & PX_UE_APP_CTX_URI & "/" & oct2char(unichar2oct(PX_CONTEXT_ID)), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully delete AppContext ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPCTX_003_OK - - /** - * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPCTX_003_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_ue_app_ctx(); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - "/" & PICS_ROOT_API & PX_UE_APP_CTX_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_CONTEXT_ID)), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully delete AppContext ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPCTX_003_NF - - } // End of group ue_app_ctx - - group ue_apps { - - /** - * @desc Check that the IUT responds with the list of user applications available when requested by an UE Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPS/SysUeApplications.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPS_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_ue_app_ctx(); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_UE_APPS_URI & "&appName=" & oct2char(unichar2oct(PX_APP_NAME)), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_app_info( - { *, mw_appInfo_list(PX_APP_NAME), *} - ))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_create_ue_app_ctx(); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPS_001_OK - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPS/SysUeApplications.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPS_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_ue_app_ctx(); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_UE_APPS_URI & "&appName=" & oct2char(unichar2oct(PX_APP_NAME)) & "&serviceCont=unknown", // Wrong URI - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_create_ue_app_ctx(); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPS_001_BR - - /** - * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPS/SysUeApplications.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPS_001_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_UE_APPS_URI & "&appName=" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_NAME)), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPS_001_NF - - } // End of group ue_apps - -} // End of module AtsMec_UEAppInterfaceAPI_TestCases diff --git a/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/module.mk b/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/module.mk deleted file mode 100644 index 449db40..0000000 --- a/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/module.mk +++ /dev/null @@ -1,48 +0,0 @@ -suite := AtsMec - -sources := \ - AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn \ - AtsMec_TrafficManagementAPI_TestCases.ttcn \ - AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn \ - AtsMec_LocationAPI_TestCases.ttcn \ - AtsMec_RnisAPI_TestCases.ttcn \ - AtsMec_TestControl.ttcn \ - AtsMec_UEAppInterfaceAPI_TestCases.ttcn \ - AtsMec_UEidentityAPI_TestCases.ttcn \ - AtsMec_V2XInformationServiceAPI_TestCases.ttcn \ - AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn \ - AtsMec_WlanInformationAPI_TestCases.ttcn \ - AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn \ -# AtsMec_Ams_TestCases.ttcn \ -# AtsMec_FixedAccessInfoAPI_TestCases.ttcn \ -# AtsMec_RadioNodeLocationAPI_TestCases.ttcn \ - -modules := ../LibCommon \ - ../LibIts \ - ../LibIts/ttcn/Http \ - ../LibMec \ - ../LibMec/EdgePlatformApplicationEnablementAPI \ - ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ - ../LibMec/TrafficManagementAPI \ - ../LibMec/LocationAPI \ - ../LibMec/RnisAPI \ - ../LibMec/UEAppInterfaceAPI \ - ../LibMec/UEidentityAPI \ - ../LibMec/V2XInformationServiceAPI \ - ../LibMec/DeviceApplicationInterfaceAPI \ - ../LibMec/WlanInformationAPI \ - ../LibMec/ApplicationMobilityServiceAPI \ - ../LibMec/FixedAccessInformationAPI \ - ../../ccsrc/Ports/LibHttp \ - ../../ccsrc/EncDec/LibHttp \ - ../../ccsrc/EncDec/LibMec \ - ../../ccsrc/Framework \ - ../../ccsrc/externals \ - ../../ccsrc/loggers \ - ../../ccsrc/Protocols/ETH \ - ../../ccsrc/Protocols/Http \ - ../../ccsrc/Protocols/Json \ - ../../ccsrc/Protocols/Pcap \ - ../../ccsrc/Protocols/Tcp \ - ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ - diff --git a/ttcn/AtsMec/AtsMec_LcRRm/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn b/ttcn/AtsMec/AtsMec_LcRRm/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn deleted file mode 100644 index 9aace58..0000000 --- a/ttcn/AtsMec/AtsMec_LcRRm/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn +++ /dev/null @@ -1,103 +0,0 @@ -module AtsMec_TestControl { - - // LibMec/LocationAPI - import from LocationAPI_Pics all; - // LibMec/UEidentityAPI - import from UEidentityAPI_Pics all; - // LibMec/RnisAPI - import from RnisAPI_Pics all; - // LibMec/TrafficManagementAPI - import from TrafficManagementAPI_Pics all; - // LibMec/AppEnablementAPI - import from EdgePlatformApplicationEnablementAPI_Pics all; - // LibMec/UEAppInterfaceAPI - import from UEAppInterfaceAPI_Pics all; - - // LibMec - import from LibMec_Pics all; - - // AtsMec - import from AtsMec_UEidentityAPI_TestCases all; -// import from AtsMec_RadioNodeLocationAPI_TestCases all; - import from AtsMec_RnisAPI_TestCases all; - import from AtsMec_TrafficManagementAPI_TestCases all; - import from AtsMec_EdgePlatformApplicationEnablementAPI_TestCases all; - import from AtsMec_UEAppInterfaceAPI_TestCases all; - - control { - - if (PICS_MEC_PLAT and PICS_SERVICES) { - if (PICS_UE_IDENTITY_API_SUPPORTED) { - execute(TC_MEC_MEC014_SRV_UETAG_001_OK()); - execute(TC_MEC_MEC014_SRV_UETAG_001_BR()); - execute(TC_MEC_MEC014_SRV_UETAG_001_NF()); - execute(TC_MEC_MEC014_SRV_UETAG_002_OK()); - execute(TC_MEC_MEC014_SRV_UETAG_002_BR()); - execute(TC_MEC_MEC014_SRV_UETAG_002_PF()); - } - if (PICS_LOCATION_API_SUPPORTED) { - -// execute(TC_MEC_PLAT_RLOC_001_OK()); -// execute(TC_MEC_PLAT_RLOC_001_NF()); - } - - if (PICS_APP_ENABLEMENT_API_SUPPORTED) { - /*execute(TC_MEC_SRV_TRANS_001_OK()); - execute(TC_MEC_SRV_TRAF_001_OK()); - execute(TC_MEC_SRV_TRAF_002_OK()); - execute(TC_MEC_SRV_TRAF_003_OK()); - execute(TC_MEC_SRV_TRAF_001_NF());*/ - } - - if (PICS_ENABLE_UE_APP_CTX) { - execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_NF()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_NF()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_NF()); - } - } - - /*if (PICS_RNIS) { - if (PICS_RNIS_NOTIFICATIONS) { - execute(TC_MEC_MEC012_SRV_RNIS_001_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_002_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_003_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_004_OK()); - } - if (PICS_RNIS_ALL_SUBSCRIPTIONS) { - execute(TC_MEC_MEC012_SRV_RNIS_011_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_012_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_011_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_012_BR()); - } - if (PICS_RNIS_QUERY) { - execute(TC_MEC_MEC012_SRV_RNIS_016_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_016_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_016_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_017_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_017_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_017_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_018_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_018_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_018_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_019_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_019_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_019_NF()); - } - }*/ - - if (PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED) { - execute(TC_MEC_MEC015_SRV_TM_001_OK()); - execute(TC_MEC_MEC015_SRV_TM_002_OK()); - execute(TC_MEC_MEC015_SRV_TM_002_BR()); - execute(TC_MEC_MEC015_SRV_TM_002_NF()); - } - } // End of 'control' statement - -} // End of module AtsMec_TestControl diff --git a/ttcn/AtsMec/AtsMec_LcRRm/module.mk b/ttcn/AtsMec/AtsMec_LcRRm/module.mk deleted file mode 100644 index 449db40..0000000 --- a/ttcn/AtsMec/AtsMec_LcRRm/module.mk +++ /dev/null @@ -1,48 +0,0 @@ -suite := AtsMec - -sources := \ - AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn \ - AtsMec_TrafficManagementAPI_TestCases.ttcn \ - AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn \ - AtsMec_LocationAPI_TestCases.ttcn \ - AtsMec_RnisAPI_TestCases.ttcn \ - AtsMec_TestControl.ttcn \ - AtsMec_UEAppInterfaceAPI_TestCases.ttcn \ - AtsMec_UEidentityAPI_TestCases.ttcn \ - AtsMec_V2XInformationServiceAPI_TestCases.ttcn \ - AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn \ - AtsMec_WlanInformationAPI_TestCases.ttcn \ - AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn \ -# AtsMec_Ams_TestCases.ttcn \ -# AtsMec_FixedAccessInfoAPI_TestCases.ttcn \ -# AtsMec_RadioNodeLocationAPI_TestCases.ttcn \ - -modules := ../LibCommon \ - ../LibIts \ - ../LibIts/ttcn/Http \ - ../LibMec \ - ../LibMec/EdgePlatformApplicationEnablementAPI \ - ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ - ../LibMec/TrafficManagementAPI \ - ../LibMec/LocationAPI \ - ../LibMec/RnisAPI \ - ../LibMec/UEAppInterfaceAPI \ - ../LibMec/UEidentityAPI \ - ../LibMec/V2XInformationServiceAPI \ - ../LibMec/DeviceApplicationInterfaceAPI \ - ../LibMec/WlanInformationAPI \ - ../LibMec/ApplicationMobilityServiceAPI \ - ../LibMec/FixedAccessInformationAPI \ - ../../ccsrc/Ports/LibHttp \ - ../../ccsrc/EncDec/LibHttp \ - ../../ccsrc/EncDec/LibMec \ - ../../ccsrc/Framework \ - ../../ccsrc/externals \ - ../../ccsrc/loggers \ - ../../ccsrc/Protocols/ETH \ - ../../ccsrc/Protocols/Http \ - ../../ccsrc/Protocols/Json \ - ../../ccsrc/Protocols/Pcap \ - ../../ccsrc/Protocols/Tcp \ - ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ - diff --git a/ttcn/AtsMec/AtsMec_LcRRm/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn b/ttcn/AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn similarity index 98% rename from ttcn/AtsMec/AtsMec_LcRRm/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn rename to ttcn/AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn index 3e2235a..1f1e4af 100644 --- a/ttcn/AtsMec/AtsMec_LcRRm/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn +++ b/ttcn/AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn @@ -131,7 +131,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PX_APP_INSTANCE_ID, PX_APP_LCM_OP_OCC_ID, PX_APP_ID, - INVALID_OPERATE, + -, m_grant_request_link( m_link_type(""), // TODO m_link_type("") // TODO @@ -1136,7 +1136,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_http_message_body_json( m_body_json_app_pkg_info_modification( m_app_pkg_info_modification( - UNKNOWN + DISABLED )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2794,9 +2794,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_http_message_body_json( m_body_json_config_platform_for_app_request( m_config_platform_for_app_request( - m_service_dependency( - "", "" // TODO Add PIXITs - ))))))); + { + m_service_dependency( + "", + "" // TODO Add PIXITs + ) + } + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2847,9 +2851,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_http_message_body_json( m_body_json_config_platform_for_app_request( m_config_platform_for_app_request( - m_service_dependency( - "", "" // TODO Add PIXITs - ))))))); + { + m_service_dependency( + "", + "" // TODO Add PIXITs + ) + } + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2900,9 +2908,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_http_message_body_json( m_body_json_config_platform_for_app_request( m_config_platform_for_app_request( - m_service_dependency( - "", "" // TODO Add PIXITs - ))))))); + { + m_service_dependency( + "", + "" // TODO Add PIXITs + ) + } + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body diff --git a/ttcn/AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn b/ttcn/AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn new file mode 100644 index 0000000..bb58ede --- /dev/null +++ b/ttcn/AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn @@ -0,0 +1,18 @@ +module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl { + + // LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec + import from AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases all; + + control { + + if (PICS_MEC_PLAT and PICS_SERVICES) { + } + } // End of 'control' statement + +} // End of module AtsMec_TestControl diff --git a/ttcn/AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting/module.mk b/ttcn/AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting/module.mk new file mode 100644 index 0000000..a11413d --- /dev/null +++ b/ttcn/AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting/module.mk @@ -0,0 +1,36 @@ +suite := AtsMec_ApplicationPackageLifecycleAndOperationGranting + +sources := \ + AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn \ + AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/LocationAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ diff --git a/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn b/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn similarity index 100% rename from ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn rename to ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn diff --git a/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn b/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn new file mode 100644 index 0000000..0a20c8d --- /dev/null +++ b/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn @@ -0,0 +1,30 @@ +module AtsMec_DeviceApplicationInterfaceAPI_TestControl { + + // LibMec/DeviceApplicationInterfaceAPI + import from DeviceApplicationInterfaceAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec + import from AtsMec_DeviceApplicationInterfaceAPI_TestCases all; + + control { + + if (PICS_MEC_PLAT and PICS_SERVICES) { + // if (PICS_ENABLE_UE_APP_CTX) { + // execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_OK()); + // execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_BR()); + // execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_OK()); + // execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_BR()); + // execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_NF()); + // execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_OK()); + // execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_NF()); + // execute(TC_MEC_MEC016_MEO_UEAPPS_001_OK()); + // execute(TC_MEC_MEC016_MEO_UEAPPS_001_BR()); + // execute(TC_MEC_MEC016_MEO_UEAPPS_001_NF()); + // } + } + } // End of 'control' statement + +} // End of module AtsMec_TestControl diff --git a/ttcn/AtsMec_DeviceApplicationInterface/module.mk b/ttcn/AtsMec_DeviceApplicationInterface/module.mk new file mode 100644 index 0000000..d6154fd --- /dev/null +++ b/ttcn/AtsMec_DeviceApplicationInterface/module.mk @@ -0,0 +1,37 @@ +suite := AtsMec_DeviceApplicationInterface + +sources := \ + AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn \ + AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/LocationAPI \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ + diff --git a/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk b/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk index a9e6d00..e5209bf 100644 --- a/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk +++ b/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk @@ -7,6 +7,7 @@ sources := \ modules := ../LibCommon \ ../../titan-test-system-framework/ttcn/LibHelpers \ ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ ../../titan-test-system-framework/ttcn/LibJson \ ../patch_lib_http \ ../LibMec \ @@ -26,6 +27,7 @@ modules := ../LibCommon \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ ../../titan-test-system-framework/ccsrc/Helpers \ ../../ccsrc/Ports/LibHttp \ ../../ccsrc/EncDec/LibMec \ diff --git a/ttcn/AtsMec_FederationEnablement/module.mk b/ttcn/AtsMec_FederationEnablement/module.mk index dc03f6d..2310374 100644 --- a/ttcn/AtsMec_FederationEnablement/module.mk +++ b/ttcn/AtsMec_FederationEnablement/module.mk @@ -7,6 +7,7 @@ sources := \ modules := ../LibCommon \ ../../titan-test-system-framework/ttcn/LibHelpers \ ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ ../../titan-test-system-framework/ttcn/LibJson \ ../patch_lib_http \ ../LibMec \ @@ -14,7 +15,6 @@ modules := ../LibCommon \ ../LibMec/EdgePlatformApplicationEnablementAPI \ ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ ../LibMec/TrafficManagementAPI \ - ../LibMec/RnisAPI \ ../LibMec/UEAppInterfaceAPI \ ../LibMec/UEidentityAPI \ ../LibMec/V2XInformationServiceAPI \ @@ -28,6 +28,7 @@ modules := ../LibCommon \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ ../../titan-test-system-framework/ccsrc/Helpers \ ../../ccsrc/Ports/LibHttp \ ../../ccsrc/EncDec/LibMec \ diff --git a/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestCases.ttcn b/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestCases.ttcn index 8655817..1d9036f 100644 --- a/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestCases.ttcn +++ b/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestCases.ttcn @@ -1527,7 +1527,7 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { m_onu_alarm_subscription( PX_ONU_ALARM_SUB_CALLBACK_URI, m_filter_criteria_onu_alarm, - -, + -, -, -, m_time_stamp(1577836800) ) ) diff --git a/ttcn/AtsMec_FixedAccessInformationService/module.mk b/ttcn/AtsMec_FixedAccessInformationService/module.mk index 0d841e4..0c3a7e2 100644 --- a/ttcn/AtsMec_FixedAccessInformationService/module.mk +++ b/ttcn/AtsMec_FixedAccessInformationService/module.mk @@ -7,6 +7,7 @@ sources := \ modules := ../LibCommon \ ../../titan-test-system-framework/ttcn/LibHelpers \ ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ ../../titan-test-system-framework/ttcn/LibJson \ ../patch_lib_http \ ../LibMec \ @@ -14,7 +15,6 @@ modules := ../LibCommon \ ../LibMec/EdgePlatformApplicationEnablementAPI \ ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ ../LibMec/TrafficManagementAPI \ - ../LibMec/RnisAPI \ ../LibMec/UEAppInterfaceAPI \ ../LibMec/UEidentityAPI \ ../LibMec/V2XInformationServiceAPI \ @@ -26,6 +26,7 @@ modules := ../LibCommon \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ ../../titan-test-system-framework/ccsrc/Helpers \ ../../ccsrc/Ports/LibHttp \ ../../ccsrc/EncDec/LibMec \ diff --git a/ttcn/AtsMec_IoT/module.mk b/ttcn/AtsMec_IoT/module.mk index e7966c8..36152a9 100644 --- a/ttcn/AtsMec_IoT/module.mk +++ b/ttcn/AtsMec_IoT/module.mk @@ -7,6 +7,7 @@ sources := \ modules := ../LibCommon \ ../../titan-test-system-framework/ttcn/LibHelpers \ ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ ../../titan-test-system-framework/ttcn/LibJson \ ../patch_lib_http \ ../LibMec \ @@ -14,7 +15,6 @@ modules := ../LibCommon \ ../LibMec/EdgePlatformApplicationEnablementAPI \ ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ ../LibMec/TrafficManagementAPI \ - ../LibMec/RnisAPI \ ../LibMec/UEAppInterfaceAPI \ ../LibMec/UEidentityAPI \ ../LibMec/V2XInformationServiceAPI \ @@ -28,6 +28,7 @@ modules := ../LibCommon \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ ../../titan-test-system-framework/ccsrc/Helpers \ ../../ccsrc/Ports/LibHttp \ ../../ccsrc/EncDec/LibMec \ diff --git a/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn b/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn index 15150a3..9dc2638 100644 --- a/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn +++ b/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn @@ -447,9 +447,9 @@ module AtsMec_RnisAPI_TestCases { mw_meas_ta_subscription( PX_CALLBACK_REFERENCE, PX_LINKS_SELF, - mw_filter_criteria_ho( - PX_APP_INS_ID, - -//TODO PX_E_RAB_ID + mw_filter_criteria( + PX_APP_INS_ID, + -//TODO PX_E_RAB_ID ))))))) { tc_wait.stop; @@ -1157,6 +1157,7 @@ module AtsMec_RnisAPI_TestCases { ) } ), + -, -, v_json_body.cellChangeSubscription.links ) ) diff --git a/ttcn/AtsMec_Rnis/module.mk b/ttcn/AtsMec_Rnis/module.mk index 015a416..361f51f 100644 --- a/ttcn/AtsMec_Rnis/module.mk +++ b/ttcn/AtsMec_Rnis/module.mk @@ -4,10 +4,10 @@ sources := \ AtsMec_RnisAPI_TestCases.ttcn \ AtsMec_RnisAPI_TestControl.ttcn - modules := ../LibCommon \ ../../titan-test-system-framework/ttcn/LibHelpers \ ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ ../../titan-test-system-framework/ttcn/LibJson \ ../patch_lib_http \ ../LibMec \ @@ -26,6 +26,7 @@ modules := ../LibCommon \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ ../../titan-test-system-framework/ccsrc/Helpers \ ../../ccsrc/Ports/LibHttp \ ../../ccsrc/EncDec/LibMec \ diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn index 03ec397..96b574c 100644 --- a/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn @@ -312,20 +312,8 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type m_qosd, // QoS LowCost, // MtsMode - Downlink, // TrafficDirection - { - m_session_filter( - "10.10.10.10", - {"1010"} - ) - } // FlowFilter - - ) - ) - ) - ) - ) - ); + Downlink // TrafficDirection + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -396,20 +384,8 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type m_qosd, // QoS LowCost, // MtsMode - Downlink, // TrafficDirection - { - m_session_filter( - "10.10.10.10", - {"10.10"} // Invalid port number - ) - } // FlowFilter - - ) - ) - ) - ) - ) - ); + Downlink // TrafficDirection + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -616,19 +592,8 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type m_qosd_1, // QoS LowCost, // MtsMode - Downlink, // TrafficDirection - { - m_session_filter( - "10.10.10.10", - {"1010"} - ) - } // FlowFilter - ) - ) - ) - ) - ) - ); + Downlink // TrafficDirection + )))))); tc_ac.start; alt { [] httpPort.receive( @@ -641,13 +606,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type mw_qosd_1, // QoS LowCost, // MtsMode - Downlink, // TrafficDirection - { - m_session_filter( - "10.10.10.10", - {"1010"} - ) - } // FlowFilter + Downlink // TrafficDirection )))))) -> value v_response { tc_ac.stop; @@ -711,19 +670,8 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type m_qosd_1, // QoS LowCost, // MtsMode - Downlink, // TrafficDirection - { - m_session_filter( - "10.10.10.10", - {"10.10"} // Invalid port - ) - } // FlowFilter - ) - ) - ) - ) - ) - ); + Downlink // TrafficDirection + )))))); tc_ac.start; alt { [] httpPort.receive( @@ -789,19 +737,8 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type m_qosd_1, // QoS LowCost, // MtsMode - Downlink, // TrafficDirection - { - m_session_filter( - "10.10.10.10", - {"1010"} - ) - } // FlowFilter - ) - ) - ) - ) - ) - ); + Downlink // TrafficDirection + )))))); tc_ac.start; alt { [] httpPort.receive( diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn index cf5a3c5..9a4a577 100644 --- a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn @@ -391,8 +391,8 @@ module AtsMec_TrafficManagementAPI_TestCases { v_app_instance_id, SESSION_SPECIFIC_BW_ALLOCATION, // Request type "1024", // FixedAllocation - Downlink, // AllocationDirection - { m_session_filter("10.10.10.10", 1010) } + Downlink // AllocationDirection + //{ m_session_filter("10.10.10.10", 1010) } ) ) ) @@ -413,8 +413,8 @@ module AtsMec_TrafficManagementAPI_TestCases { v_app_instance_id, SESSION_SPECIFIC_BW_ALLOCATION, // Request type "1024", // FixedAllocation - Downlink, // AllocationDirection - { mw_session_filter } + Downlink // AllocationDirection + //{ mw_session_filter } )))))) -> value v_response { tc_ac.stop; @@ -542,8 +542,8 @@ module AtsMec_TrafficManagementAPI_TestCases { PX_APP_INSTANCE_ID, APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type "1024", // FixedAllocation - Downlink, // AllocationDirection - { m_session_filter("10.10.10.10", 1010) } // MEC015 Clause 7.2.2 Type: BwInfo Table 7.2.2-1: Elements of BwInfo, sessionFilter shall be omit + Downlink // AllocationDirection + //{ m_session_filter("10.10.10.10", 1010) } // MEC015 Clause 7.2.2 Type: BwInfo Table 7.2.2-1: Elements of BwInfo, sessionFilter shall be omit ) ) ) @@ -1053,9 +1053,7 @@ module AtsMec_TrafficManagementAPI_TestCases { m_body_json_bw_info_deltas( m_bw_info_deltas( v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - -, - "5096" + APPLICATION_SPECIFIC_BW_ALLOCATION // Request type ) ) ) @@ -1134,9 +1132,7 @@ module AtsMec_TrafficManagementAPI_TestCases { m_body_json_bw_info_deltas( m_bw_info_deltas( v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - -, - "Invalid" + APPLICATION_SPECIFIC_BW_ALLOCATION // Request type ) ) ) @@ -1207,9 +1203,7 @@ module AtsMec_TrafficManagementAPI_TestCases { m_body_json_bw_info_deltas( m_bw_info_deltas( v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - -, - "5096" + APPLICATION_SPECIFIC_BW_ALLOCATION // Request type ) ) ) diff --git a/ttcn/AtsMec_TrafficManagement/module.mk b/ttcn/AtsMec_TrafficManagement/module.mk index 514accb..6c17382 100644 --- a/ttcn/AtsMec_TrafficManagement/module.mk +++ b/ttcn/AtsMec_TrafficManagement/module.mk @@ -2,12 +2,13 @@ suite := AtsMec_TrafficManagement sources := \ AtsMec_TrafficManagementAPI_TestCases.ttcn \ - AtsMec_TrafficManagementAPI_TestCases.ttcn \ + AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn \ AtsMec_TrafficManagementAPI_TestControl modules := ../LibCommon \ ../../titan-test-system-framework/ttcn/LibHelpers \ ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ ../../titan-test-system-framework/ttcn/LibJson \ ../patch_lib_http \ ../LibMec \ @@ -15,7 +16,6 @@ modules := ../LibCommon \ ../LibMec/EdgePlatformApplicationEnablementAPI \ ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ ../LibMec/TrafficManagementAPI \ - ../LibMec/RnisAPI \ ../LibMec/UEAppInterfaceAPI \ ../LibMec/UEidentityAPI \ ../LibMec/V2XInformationServiceAPI \ @@ -27,6 +27,7 @@ modules := ../LibCommon \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ ../../titan-test-system-framework/ccsrc/Helpers \ ../../ccsrc/Ports/LibHttp \ ../../ccsrc/EncDec/LibMec \ diff --git a/ttcn/AtsMec_UEidentity/module.mk b/ttcn/AtsMec_UEidentity/module.mk index ce0a0ee..907dd93 100644 --- a/ttcn/AtsMec_UEidentity/module.mk +++ b/ttcn/AtsMec_UEidentity/module.mk @@ -7,6 +7,7 @@ sources := \ modules := ../LibCommon \ ../../titan-test-system-framework/ttcn/LibHelpers \ ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ ../../titan-test-system-framework/ttcn/LibJson \ ../patch_lib_http \ ../LibMec \ @@ -14,7 +15,6 @@ modules := ../LibCommon \ ../LibMec/EdgePlatformApplicationEnablementAPI \ ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ ../LibMec/TrafficManagementAPI \ - ../LibMec/RnisAPI \ ../LibMec/UEAppInterfaceAPI \ ../LibMec/UEidentityAPI \ ../LibMec/V2XInformationServiceAPI \ diff --git a/ttcn/AtsMec_V2XInformationService/module.mk b/ttcn/AtsMec_V2XInformationService/module.mk index 311a0b3..366db2c 100644 --- a/ttcn/AtsMec_V2XInformationService/module.mk +++ b/ttcn/AtsMec_V2XInformationService/module.mk @@ -7,6 +7,7 @@ sources := \ modules := ../LibCommon \ ../../titan-test-system-framework/ttcn/LibHelpers \ ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ ../../titan-test-system-framework/ttcn/LibJson \ ../patch_lib_http \ ../LibMec \ @@ -25,6 +26,7 @@ modules := ../LibCommon \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ ../../titan-test-system-framework/ccsrc/Helpers \ ../../ccsrc/Ports/LibHttp \ ../../ccsrc/EncDec/LibMec \ diff --git a/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn b/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn index 9ecbc2b..892b5d0 100644 --- a/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn +++ b/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn @@ -1502,9 +1502,9 @@ module AtsMec_WlanInformationAPI_TestCases { { m_sta_identity( PX_MAC_ID, - PX_SSID, + {PX_SSID}, -, - PX_IP_ADDRESS + {PX_IP_ADDRESS} ) }, PX_MEASUREMENT_ID, @@ -1523,9 +1523,9 @@ module AtsMec_WlanInformationAPI_TestCases { mw_measurement_config( ?, {mw_sta_identity(PX_MAC_ID, - PX_SSID, - -, - PX_IP_ADDRESS + {PX_SSID}, + -, + {PX_IP_ADDRESS} )}, PX_MEASUREMENT_ID, mw_measurement_info @@ -1581,9 +1581,9 @@ module AtsMec_WlanInformationAPI_TestCases { { m_sta_identity( PX_MAC_ID & ":00", // Invalid MAC address - PX_SSID, + {PX_SSID}, -, - PX_IP_ADDRESS + {PX_IP_ADDRESS} ) }, PX_MEASUREMENT_ID, @@ -1729,9 +1729,9 @@ module AtsMec_WlanInformationAPI_TestCases { { mw_sta_identity( PX_MAC_ID, - PX_SSID, + {PX_SSID}, -, - PX_IP_ADDRESS + {PX_IP_ADDRESS} ) }, PX_MEASUREMENT_ID, @@ -1849,9 +1849,9 @@ module AtsMec_WlanInformationAPI_TestCases { { m_sta_identity( PX_MAC_ID, - PX_SSID, + {PX_SSID}, -, - PX_IP_ADDRESS + {PX_IP_ADDRESS} ) }, PX_MEASUREMENT_ID, @@ -1869,10 +1869,11 @@ module AtsMec_WlanInformationAPI_TestCases { mw_body_json_wlan_measurement_config( mw_measurement_config( ?, - {mw_sta_identity(PX_MAC_ID, - PX_SSID, - -, - PX_IP_ADDRESS + {mw_sta_identity( + PX_MAC_ID, + {PX_SSID}, + -, + {PX_IP_ADDRESS} )}, PX_MEASUREMENT_ID, mw_measurement_info(2000, 20) @@ -1930,9 +1931,9 @@ module AtsMec_WlanInformationAPI_TestCases { { m_sta_identity( PX_MAC_ID, - PX_SSID, + {PX_SSID}, -, - PX_IP_ADDRESS + {PX_IP_ADDRESS} ) }, PX_MEASUREMENT_ID, diff --git a/ttcn/AtsMec_WlanInformation/module.mk b/ttcn/AtsMec_WlanInformation/module.mk index 390fd0d..221a3d4 100644 --- a/ttcn/AtsMec_WlanInformation/module.mk +++ b/ttcn/AtsMec_WlanInformation/module.mk @@ -7,6 +7,7 @@ sources := \ modules := ../LibCommon \ ../../titan-test-system-framework/ttcn/LibHelpers \ ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ ../../titan-test-system-framework/ttcn/LibJson \ ../patch_lib_http \ ../LibMec \ @@ -14,7 +15,6 @@ modules := ../LibCommon \ ../LibMec/EdgePlatformApplicationEnablementAPI \ ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ ../LibMec/TrafficManagementAPI \ - ../LibMec/RnisAPI \ ../LibMec/UEAppInterfaceAPI \ ../LibMec/UEidentityAPI \ ../LibMec/V2XInformationServiceAPI \ @@ -26,6 +26,7 @@ modules := ../LibCommon \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ ../../titan-test-system-framework/ccsrc/Helpers \ ../../ccsrc/Ports/LibHttp \ ../../ccsrc/EncDec/LibMec \ diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn index 4e19cc4..fe37d7a 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn @@ -4,7 +4,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { import from Json all; // LibMec_EdgePlatformApplicationEnablementAPI - import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; + //import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; /* TITAN WORK-AROUND for build issue (class forward declaration) */ // LibMec_ApplicationMobilityServiceAPI import from ApplicationMobilityServiceAPI_TypesAndValues all; @@ -265,14 +265,14 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { group mepm_lifcyclemgt { template (omit) ConfigPlatformForAppRequest m_config_platform_for_app_request( - in template (value) ServiceDependency p_appServiceRequired, - in template (omit) ServiceDependency p_appServiceOptional := omit, - in template (omit) ServiceDependency p_appServiceProduced := omit, - in template (omit) FeatureDependency p_appFeatureRequired := omit, - in template (omit) FeatureDependency p_appFeatureOptional := omit, - in template (omit) TransportDependency p_transportDependencies := omit, - in template (omit) TrafficRuleDescriptor p_appTrafficRule := omit, - in template (omit) DNSRuleDescriptor p_appDNSRule := omit, + in template (value) ServiceDependencies p_appServiceRequired, + in template (omit) ServiceDependencies p_appServiceOptional := omit, + in template (omit) ServiceDependencies p_appServiceProduced := omit, + in template (omit) FeatureDependencies p_appFeatureRequired := omit, + in template (omit) FeatureDependencies p_appFeatureOptional := omit, + in template (omit) TransportDependencies p_transportDependencies := omit, + in template (omit) TrafficRuleDescriptors p_appTrafficRule := omit, + in template (omit) DNSRuleDescriptors p_appDNSRule := omit, in template (omit) LatencyDescriptor p_appLatency := omit, in template (omit) UserContextTransferCapability p_userContextTransferCapability := omit, in template (omit) AppNetworkPolicy p_appNetworkPolicy := omit @@ -291,14 +291,14 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { } // End of template m_config_platform_for_app_request template (present) ConfigPlatformForAppRequest mw_config_platform_for_app_request( - template (present) ServiceDependency p_appServiceRequired := ?, - template ServiceDependency p_appServiceOptional := *, - template ServiceDependency p_appServiceProduced := *, - template FeatureDependency p_appFeatureRequired := *, - template FeatureDependency p_appFeatureOptional := *, - template TransportDependency p_transportDependencies := *, - template TrafficRuleDescriptor p_appTrafficRule := *, - template DNSRuleDescriptor p_appDNSRule := *, + template (present) ServiceDependencies p_appServiceRequired := ?, + template ServiceDependencies p_appServiceOptional := *, + template ServiceDependencies p_appServiceProduced := *, + template FeatureDependencies p_appFeatureRequired := *, + template FeatureDependencies p_appFeatureOptional := *, + template TransportDependencies p_transportDependencies := *, + template TrafficRuleDescriptors p_appTrafficRule := *, + template DNSRuleDescriptors p_appDNSRule := *, template LatencyDescriptor p_appLatency := *, template UserContextTransferCapability p_userContextTransferCapability := *, template AppNetworkPolicy p_appNetworkPolicy := * @@ -319,7 +319,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { template (omit) ServiceDependency m_service_dependency( in Json.String p_serName, in Json.String p_version, - in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.CategoryRef p_serCategory := omit, + in template (omit) CategoryRef p_serCategory := omit, in template (omit) TransportDependency p_serTransportDependencies := omit, in template (omit) Json.String p_requestedPermissions := omit ) := { @@ -333,7 +333,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { template (present) ServiceDependency mw_service_dependency( template (present) Json.String p_serName := ?, template (present) Json.String p_version := ?, - template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.CategoryRef p_serCategory := *, + template CategoryRef p_serCategory := *, template TransportDependency p_serTransportDependencies := *, template Json.String p_requestedPermissions := * ) := { diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn index ff58f9a..d89f785 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn @@ -1,3 +1,13 @@ +/** + * @author ETSI / TTF T012 / TTF T027 + * @version $Url$ + * $Id$ + * @desc Types ANd Values for ETSI GS MEC 010-2 V3.2.1 (2023-06) + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + */ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { // JSON @@ -9,11 +19,1925 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { // LibMec_ApplicationMobilityServiceAPI import from ApplicationMobilityServiceAPI_TypesAndValues all; - group edge_platform_application_enablement { + // LibMec_EdgePlatformApplicationEnablementAPI + //import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; /* TITAN WORK-AROUND for build issue (class forward declaration) */ + + /** + * @desc An application Descriptor (AppD) is a part of application package, and describes application requirements and rules required by application provider + * @member appDid Identifier of this MEC application descriptor. This attribute shall be globally unique + * @member appName Name to identify the MEC application + * @member appProvider Provider of the application and of the AppD + * @member appSoftVersion Identifies the version of software of the MEC application + * @member appDVersion Identifies the version of the application descriptor + * @member mecVersion Identifies version(s) of MEC system compatible with the MEC application described in this version of the AppD + * @member appInfoName Human readable name for the MEC application + * @member appDescription Human readable description of the MEC application + * @member virtualComputeDescriptor Describes CPU and memory requirements, as well as optional additional requirements, such as disk and acceleration related capabilities, of the virtualisation container used to realize this MEC application + * @member osContainerDescriptor Describes CPU, memory requirements and limits, and software images of the OS Containers realizing this MEC application corresponding to OS Containers sharing the same host and same network namespace + * @member swImageDescriptor Describes the descriptors of the software image to be used by the virtualisation container used to realize this MEC application + * @member virtualStorageDescriptor Defines descriptors of virtual storage resources to be used by the MEC application + * @member appExtCpd Describes external interface(s) exposed by this MEC application + * @member appServiceRequired Describes services a MEC application requires to run + * @member appServiceOptional Describes services a MEC application may use if available + * @member appServiceProduced Describes services a MEC application is able to produce to the platform or other MEC applications + * @member appFeatureRequired Describes features a MEC application requires to run + * @member appFeatureOptional Describes features a MEC application may use if available + * @member transportDependencies Transports, if any, that this application requires to be provided by the platform + * @member appTrafficRule Describes traffic rules the MEC application requires + * @member appDNSRule Describes DNS rules the MEC application requires + * @member appLatency Describes the maximum latency tolerated by the MEC application + * @member terminateAppInstanceOpConfig Configuration parameters for the Terminate application instance operation + * @member changeAppInstanceStateOpConfig Configuration parameters for the change application instance state operation + * @member userContextTransferCapability If the application supports the user context transfer capability + * @member appNetworkPolicy It represents the application network policy of carrying the application traffic + * @member mciopId Identifies the MCIOP in the application package, used in containerized workload management, when the application is realized by a set of OS containers + * @member mcioIdentificationData Name and type of the Managed Container Infrastructure Object (MCIO) that realizes this application. It allows the VNFM to identify the MCIO e.g. when querying the Container Infrastructure Service Management (CISM). + * @member logicalNode The logical node requirements + * @member requestAdditionalCapabilities Specifies requirements for additional capabilities. These can be for a range of purposes + * @member mcioConstraintParams The parameter names for constraints expected to be assigned to MCIOs realizing this application + * @see ETSI GS MEC 010-2 Clause 6.2.1.2.2 + */ + type record AppD { + Json.String appDId, + Json.String appName, + Json.String appProvider, + Json.String appSoftVersion, + Json.String appDVersion, + Json.String mecVersion, + Json.String appInfoName optional, + Json.String appDescription, + VirtualComputeDescriptor virtualComputeDescriptor optional, + OsContainerDescriptors osContainerDescriptor optional, + SwImageDescriptors swImageDescriptor, + VirtualStorageDescriptors virtualStorageDescriptor optional, + AppExternalCpds appExtCpd optional, + ServiceDependencies appServiceRequired optional, + ServiceDependencies appServiceOptional optional, + ServiceDescriptors appServiceProduced optional, + FeatureDependencies appFeatureRequired optional, + FeatureDependencies appFeatureOptional optional, + TransportDependencies transportDependencies optional, + TrafficRuleDescriptors appTrafficRule optional, + DNSRuleDescriptors appDNSRule optional, + LatencyDescriptor appLatency optional, + TerminateAppInstanceOpConfig terminateAppInstanceOpConfig optional, + ChangeAppInstanceStateOpConfig changeAppInstanceStateOpConfig optional, + UserContextTransferCapability userContextTransferCapability optional, + AppNetworkPolicy appNetworkPolicy optional, + Json.String mciopId optional, + McioIdentificationData mcioIdentificationData optional, + LogicalNodeRequirements logicalNode optional, + RequestedAdditionalCapabilityData requestAdditionalCapabilities optional, + McioConstraintParams mcioConstraintParams optional + } // End of type AppD + + /** + * @desc Parameter names for constraints expected to be assigned to MCIOs realizing this application + * @see ETSI GS MEC 010-2 Clause 6.2.1.2.2 + */ + type enumerated McioConstraintParams { + localAffinityCisNode (0), + nodeAdditionalCapabilitySsd (1), + nodeAdditionalCapabilityDpdk (2), + nodeAdditionalCapabilitySriov (3), + nodeAdditionalCapabilityGpu (4), + nodeAdditionalCapabilityFpga (5), + nodeAdditionalCapabilityCpuPin (6), + nodeCapabilityLogicalNuma (7), + nodePool + } with { + variant "JSON: as number" + } + + /** + * @desc The VirtualComputeDescriptor data type supports the specification of requirements related to virtual compute resources + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.3 Type: VirtualComputeDescriptor + */ + type record VirtualComputeDescriptor { + // FIXME shall follow the definition in clause 7.1.9.2.2 of ETSI GS NFV‑IFA 011 [0], with the following consideration: + } + + /** + * @desc The SwImageDescriptor data type describes the software image of a MEC application + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.4 Type: SwImageDescriptor + */ + type record SwImageDescriptor { + // FIXME shall follow the definition in clause 7.1.6.5 of ETSI GS NFV‑IFA 001 [1], with the following consideration: + } + type record of SwImageDescriptor SwImageDescriptors; + + /** + * @desc The VirtualStorageDescriptor data type describes the virtual storage required by a MEC application + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.5 Type: VirtualStorageDescriptor + */ + type record VirtualStorageDescriptor { + // FIXME shall follow the definition in clause 7.1.9.4 of ETSI GS NFV‑IFA 011 [0], with the following consideration: + } + type record of VirtualStorageDescriptor VirtualStorageDescriptors; + + /** + * @desc The AppExternalCpd data type supports the specification of MEC application requirements related to external connection point + * @member virtualNetworkInterfaceRequirements Specifies requirements on a virtual network interface realizing the CPs instantiated from this CPD + * member additionalServiceData Additional service identification data of the external CP + * @see ETSI GS MEC 010-2 Clause 6.2.1.6 Type: AppExternalCpd + */ + type record AppExternalCpd { + VirtualNetworkInterfaceRequirements virtualNetworkInterfaceRequirements optional, + AdditionalServiceData additionalServiceData optional + // FIXME inherited attributes + } + type record of AppExternalCpd AppExternalCpds; + + type record VirtualNetworkInterfaceRequirement { + // FIXME For the definition of the VirtualNetworkInterfaceRequirements, please refer to clause 7.1.6.6 of ETSI GS NFV-IFA 001 [1]. For the definition of Cpd, please refer to clause 7.1.6.3 of ETSI GS NFV-IFA 001 [1] + } + + type record AdditionalServiceData { + // FIXME For the definition of the VirtualNetworkInterfaceRequirements, please refer to clause 7.1.18.3 of ETSI GS NFV IFA 011 [1]. + } + + type record length(1..infinity) of VirtualNetworkInterfaceRequirement VirtualNetworkInterfaceRequirements; + + /** + * @desc The ServiceDescriptor data type describes a MEC service produced by a service-providing MEC applicationt + * @member serName The name of the service, for example, RNIS, LocationService, etc + * @member serCategory A Category reference of the service, defined in ETSI GS MEC 011 [17]i.0 + * @member version The version of the service + * @member transportsSupported Indicates transports and serialization formats supported made available to the service-consuming application + * @see ETSI GS MEC 010-2 Clause 6.2.1.7 Type: ServiceDescriptor + */ + type record ServiceDescriptor { + Json.String serName, + CategoryRef serCategory optional, + Json.String version, + TransportsSupported transportsSupported optional + } + type record of ServiceDescriptor ServiceDescriptors; + + /** + * @desc Indicates transports and serialization formats supported made available to the service-consuming application + * @member transport Information about the transport in this binding + * @member serializers Information about the serializers in this binding, as defined in the SerializerType type in ETSI GS MEC 011 [17]i.0 + * @see ETSI GS MEC 010-2 Clause 6.2.1.7 Type: ServiceDescriptor + */ + type record TransportsSupported { + TransportDescriptor transport, + SerializerType serializers + } + + /** + * @desc The FeatureDependency data type supports the specification of requirements of a MEC application related to a feature of MEC platform + * @member featureName The name of the feature, for example, UserApps, UEIdentity, etc + * @member version The version of the feature + * @see ETSI GS MEC 010-2 Clause 6.2.1.8 Type: FeatureDependency + */ + type record FeatureDependency { + Json.String featureName, + Json.String version + } + type record of FeatureDependency FeatureDependencies; + + /** + * @desc The TrafficRuleDescriptor data type describes traffic rules related to a MEC application + * @member trafficRuleId Identifies the traffic rule + * @member filterType Definition of filter type: per FLOW or PACKET + * @member priority Priority of this traffic rule within the range 0 to 255. If traffic rule conflicts, the one with higher priority take precedence + * @member trafficFilter The filter used to identify specific flow/packets that need to be handled by the MEC host + * @member action_ Identifies the action of the MEC host data plane, when a packet matches the trafficFilter + * @member dstInterface Describes the destination interface information + * @see ETSI GS MEC 010-2 Clause 6.2.1.9 Type: TrafficRuleDescriptor + */ + type record TrafficRuleDescriptor { + Json.String trafficRuleId, + FilterType filterType, + Json.Integer priority, + TrafficFilter trafficFilter, + Action action_, + InterfaceDescriptor dstInterface optional + } with { + variant (action_) "name as 'action'"; + } + type record of TrafficRuleDescriptor TrafficRuleDescriptors; + + /** + * @desc Definition of filter type: per FLOW or PACKET + */ + type enumerated FilterType { + FLOW, + PACKET + } with { + variant "JSON: as number" + } + + /** + * @desc Identifies the action of the MEC host data plane, when a packet matches the trafficFilter + */ + type enumerated Action { + DROP (0), + FORWARD_DECAPSULATED (1), + FORWARD_ENCAPSULATED (2), + PASSTHROUGH (3), + DUPLICATED_DECAPSULATED (4), + DUPLICATE_ENCAPSULATED (5) + } with { + variant "JSON: as number" + } + + /** + * @desc The TrafficFilter data type supports the specification of MEC application requirements related to traffic rules + * @member srcAddress An IP address or a range of IP addresses + * @member dstAddress A IP address or a range of IP addresses + * @member srcPort A port or a range of ports + * @member dstPort A port or a range of ports + * @member protocol Specify the protocol of the traffic filter + * @member tag Used for tag based traffic rule + * @member uri An URI label, in application layer + * @member packetLabel A customized packet label in network layer, as defined by the owner of the MEC platform, is used to filter the traffic + * @member srcTunnelAddressUsed for GTP tunnel based traffic rule + * @member tgtTunnelAddress Used for GTP tunnel based traffic rule + * @member srcTunnelPort Used for GTP tunnel based traffic rule + * @member qCI Used to match all packets that have the same QCI + * @member dSCP Used to match all IPv4 packets that have the same DSCP + * @member tC Used to match all IPv6 packets that have the same TC + * @see ETSI GS MEC 010-2 Clause 6.2.1.10 Type: TrafficFilter + */ + type record TrafficFilter { + Json.String srcAddress optional, + Json.String dstAddress optional, + Json.String srcPort optional, + Json.String dstPort optional, + Json.String protocol optional, + Json.String tag optional, + Json.String uri optional, + Json.String packetLabel optional, + Json.String srcTunnelAddress optional, + Json.String tgtTunnelAddress optional, + Json.String srcTunnelPort optional, + Json.String dstTunnelPort optional, + Json.Integer qCI optional, + Json.Integer dSCP optional, + Json.Integer tC optional + } + + /** + * @desc The InterfaceDescriptor data type describes an interface of a MEC application + * @member interfaceType Type of interface + * @member tunnelInfo Included only if the destination address type is tunnel + * @member srcMACAddress The source address identifies the MAC address of the interface + * @member dstMACAddress The destination address identifies the MAC address of the destination + * @member dstIPAddressIf the interface type is IP, the destination address identifies the IP address of the destination + * @see ETSI GS MEC 010-2 Clause 6.2.1.11 Type: InterfaceDescriptor + */ + type record InterfaceDescriptor { + InterfaceType interfaceType, + TunnelInfo tunnelInfo optional, + Json.String srcMACAddress optional, + Json.String dstMACAddress optional, + Json.String dstIPAddress optional + } + + type enumerated InterfaceType { + TUNNEL (0), + MAC (1), + IP (2) + } with { + variant "JSON: as number" + } + + /** + * @desc The TunnelInfo data type supports the specification of MEC application requirements related to traffic rules + * @member tunnelType Type of tunnel + * @member tunnelDstAddress Destination address of the tunnel + * @member tunnelSrcAddress Source address of the tunnel + * @member tunnelSpecificData Parameters specific to the tunnel + * @see ETSI GS MEC 010-2 Clause 6.2.1.12 Type: TunnelInfo + */ + type record TunnelInfo { + TunnelType tunnelType, + Json.String tunnelDstAddress, + Json.String tunnelSrcAddress, + Json.String tunnelSpecificData optional + } + + type enumerated TunnelType { + GTP_U (0), + GRE (1) + } with { + variant "JSON: as number" + } + + /** + * @desc The DNSRuleDescriptor data type describes DNS rules associated with a MEC application + * @member dnsRuleId Identifies the DNS Rule + * @member domainName FQDN of the DNS rule + * @member ipAddressType Specifies the IP address type + * @member ttl Time-to-live value + * @see ETSI GS MEC 010-2 Clause 6.2.1.13 Type: DNSRuleDescriptor + */ + type record DNSRuleDescriptor { + Json.String dnsRuleId, + Json.String domainName, + Json.String ipAddressType, + IpAddress ipAddress, + Json.Integer ttl optional + } + type record of DNSRuleDescriptor DNSRuleDescriptors; + + /** + * @desc The LatencyDescriptor data type describes latency requirements for a MEC application + * @member maxLatency The value of the maximum latency in nano seconds tolerated by the MEC application + * @see ETSI GS MEC 010-2 Clause 6.2.1.14 Type: LatencyDescriptor + */ + type record LatencyDescriptor { + Json.UInteger maxLatency + } + + /** + * @desc The TerminateAppInstanceOpConfig data type supports the specification of MEC application requirements related to terminate application instance operation configuration + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.15 Type: TerminateAppInstanceOpConfig + */ + type record TerminateAppInstanceOpConfig { + // FIXME shall follow the definition in clause 7.1.5.7 of ETSI GS NFV‑IFA 001 [1]. + } + + /** + * @desc The ChangeAppInstanceStateOpConfig data type supports the specification of MEC application requirements related to change application instance state operation configuration + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.16 Type: ChangeAppInstanceStateOpConfig + */ + type record ChangeAppInstanceStateOpConfig { + // FIXME shall follow the definition in clause 7.1.5.8 of ETSI GS NFV‑IFA 001 [1]. + } + + /** + * @desc The ServiceDependency data type supports the specification of requirements of a service-consuming MEC application related to a MEC service + * @member serName The name of the service + * @member serCategory A Category reference of the service + * @member version The version of the service + * @member serTransportDependencies Indicates transport and serialization format dependencies of consuming the service + * @member requestedPermissions + * @see ETSI GS MEC 010-2 Clause 6.2.1.17 Type: ServiceDependency + */ + type record ServiceDependency { + Json.String serName, + CategoryRef serCategory optional, + Json.String version, + TransportDependency serTransportDependencies optional, + Json.String requestedPermissions optional + } + type record of ServiceDependency ServiceDependencies; + + /** + * @desc The TransportDependency data type supports the specification of requirements of a MEC application related to supported transport bindings (each being a combination of a transport with one or more serializers) + * @member transport Information about the transport in this transport binding + * @member serializers Information about the serializers in this transport binding, as defined in the SerializerType type in ETSI GS MEC 011 [17]i.0 + * @member labels Set of labels that allow to define groups of transport bindings + * @see ETSI GS MEC 010-2 Clause 6.2.1.18 Type: TransportDependency + */ + type record TransportDependency { + TransportDescriptor transport, + SerializerType serializers, + Labels labels + } + type record of TransportDependency TransportDependencies; + + type record length(1..infinity) of Json.String Labels; + + /** + * @desc The TransportDescriptor data type describes a transport + * @member name The name of this transport + * @member description Human-readable description of this transport + * @member type_ Type of the transport, as defined in the TransportType type in ETSI GS MEC 011 [17]i.0 + * @member protocol The name of the protocol used. Shall be set to "HTTP" for a REST API + * @member version The version of the protocol used + * @member security Information about the security used by the transport in ETSI GS MEC 011 [17]i.0 + * @member implSpecificInfo Additional implementation specific details of the transport + * @see ETSI GS MEC 010-2 Clause 6.2.1.19 Type: TransportDescriptor + */ + type record TransportDescriptor { + Json.String name, + Json.String description optional, + TransportType type_, + Json.String protocol, + Json.String version, + SecurityInfo security, + Json.String implSpecificInfo optional + } with { + variant (type_) "name as 'type'"; + } + + /** + * @desc This data type represents the information of user context transfer capability of application + * @member statefulApplication If the application is stateful, this attribute shall be set to true + * @member userContextTransferSupport This attribute shall be present if the application is stateful and shall be absent otherwise + * @see ETSI GS MEC 010-2 Clause 6.2.1.20 Type: UserContextTransferCapability + */ + type record UserContextTransferCapability { + Json.Bool statefulApplication, + Json.Bool userContextTransferSupport optional + } + + /** + * @desc This data type represents the network policy in the application instantiation and operation + * @member steeredNetwork This attribute provides an option for the application to specify a type of network to carry the application traffic + * @member steeredNetwork Provides an option for the application to specify a type of network to carry the application traffic + * @see ETSI GS MEC 010-2 Clause 6.2.1.21 Type: AppNetworkPolicy + */ + type record AppNetworkPolicy { + SteeredNetwork steeredNetwork + } + + /** + * @desc Provides an option for the application to specify a type of network to carry the application traffic + * @member cellularNetwork The application prefers to a cellular network to carry its traffic + * @member wi_fiNetwork The application prefers to a Wi-Fi network to carry its traffic + * @member fixedAccessNetwork The application prefers to a fixed access network to carry its traffic + * @see ETSI GS MEC 010-2 Clause 6.2.1.21 Type: AppNetworkPolicy + */ + type record SteeredNetwork { + Json.Bool cellularNetwork optional, + Json.Bool wi_fiNetwork optional, + Json.Bool fixedAccessNetwork optional + } with { + variant (wi_fiNetwork) "name as 'wi-fiNetwork'"; + } + + /** + * @desc The OsContainerDescriptor data type supports the specification of requirements of container compute resources when a MEC application is intended to be realized by one or a set of OS Containers sharing the same host and same networking namespace + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.22 Type: OsContainerDescriptor + */ + type record OsContainerDescriptor { + // FIXME shall follow the definition in clause 7.1.6.2 of ETSI GS NFV‑IFA 001 [1]. + } + type record of OsContainerDescriptor OsContainerDescriptors; + + /** + * @desc The McioIdentificationData data type contains data needed to identify an MCIO when interworking with the CISM + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.23 Type: McioIdentificationData + */ + type record McioIdentificationData { + // FIXME shall follow the definition in clause 6.2.75.2 of ETSI GS NFV-SOL 001 [19]. + } + + /** + * @desc The LogicalNodeRequirements data type describes compute, memory and I/O requirements that are to be associated with the logical node of infrastructure + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.24 Type: LogicalNodeRequirements + */ + type record LogicalNodeRequirements { + // FIXME shall follow the definition in clause 7.1.9.6.2 of ETSI GS NFV-IFA 011 [1]. + } + + /** + * @desc The RequestedAdditionalCapabilityData data type supports the specification of requested additional capability for a particular application. Such a capability may be for acceleration or specific tasks + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.25 Type: RequestedAdditionalCapabilityData + */ + type record RequestedAdditionalCapabilityData { + // FIXME shall follow the definition in clause 7.1.9.5.2 of ETSI GS NFV-IFA 011 [1]. + } + + /** + * @desc The LocationConstraints data type supports the specification of MEC application requirements related to MEC application deployment location constraints + * @member countryCode The two-letter ISO 3166 [0] country code in capital letters + * @member civicAddressElement Zero or more elements comprising the civic address + * @member area Geographic area + * @see ETSI GS MEC 010-2 Clause 6.2.2.2 Type: LocationConstraints + */ + type record LocationConstraints { + Json.String countryCode optional, + CivicAddressElement civicAddressElement optional, + Polygon area optional + } + + type record CivicAddressElement_ { + Json.Integer caType, + Json.String caValue + } + type record of CivicAddressElement_ CivicAddressElement; + + type record Geometry { + Json.String type_, + Coordinates coordinates + } with { + variant (type_) "name as 'type'"; + } + type record of Json.Number Coordinate; + type record of Coordinate Coordinates; + type record Property { + Json.String key, + Json.String value_ + } with { + variant (value_) "name as 'value'"; + } + type record of Property Properties; + type record Polygon { + Json.String type_, + Geometry geometry, + Properties properties, + Json.String this_ + } with { + variant (type_) "name as 'type'"; + variant (this_) "name as 'this'"; + } + + /** + * @desc The data type of CreateAppInstanceRequest represents the parameters for creating a new application instance resource + * @member appDId The application descriptor identifier + * @member appInstanceName Human-readable name of the application instance to be created + * @member appInstanceDescription Human-readable description of the application instance to be created + * @member appPlacementInfo Describes the information of selected MEC platform for the application instance to associate + * @see ETSI GS MEC 010-2 Clause 6.2.2.3 Type: CreateAppInstanceRequest + */ + type record CreateAppInstanceRequest { + Json.String appDId, + Json.String appInstanceName optional, + Json.String appInstanceDescription optional, + MepInformation appPlacementInfo optional + } + + /** + * @desc The data type of AppInstanceInfo represents the parameters of instantiated application instance resources + * @member id Identifier of the application instance represented by this data type + * @member appInstanceName Name of the application instance + * @member appInstanceDescription Human-readable description of the application instance to be created + * @member appDId The application descriptor identifier is managed by the application provider to identify the application descriptor in a globally unique way + * @member appProvider The onboarded application package provider name + * @member appName The onboarded application name + * @member appSoftVersion The application software version + * @member appDVersion Version of the application descriptor + * @member appPkgId Identifier of the onboarded application package + * @member vimConnectionInfo Information about VIM connections to be used for managing the resources for the application instance + * @member nsInstanceId Identifier of the NS instance created by NFVO in which the MEC application has been instantiated as a VNF instance + * @member vnfInstanceId Identifier of the VNF instance created by VNFM that the MEC application has been instantiated as + * @member instantiationState Instantiation state of the application instance + * @member instantiatedAppState Information specific to an instantiated application. This attribute shall be present if the instantiationState attribute value is INSTANTIATED + * @member communicationInterface Interface for communication with other application instances + * @member _links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.4 Type: AppInstanceInfo + */ + type record AppInstanceInfo { + Json.String id, + Json.String appInstanceName optional, + Json.String appInstanceDescription optional, + Json.String appDId, + Json.String appProvider, + Json.String appName, + Json.String appSoftVersion, + Json.String appDVersion, + Json.String appPkgId, + VimConnectionInfo vimConnectionInfo optional, + Json.String nsInstanceId optional, + Json.String vnfInstanceId optional, + InstantiationState instantiationState, + InstantiatedAppState instantiatedAppState optional, + CommunicationInterface communicationInterface optional, + Link links + } with { + variant (links) "name as '_links'"; + } + type record of AppInstanceInfo AppInstanceInfoList; + + type enumerated InstantiationState { + INSTANTIATED (0), + NOT_INSTANTIATED (1) + } + + type record InstantiatedAppState { + OperationalState operationalState optional, + LocationInformation appInstLocation optional, + McioInfo mcioInfo optional + } + + type enumerated OperationalState { + STARTED (0), + STOPPED (1) + } + + /** + * @desc Links to resources related to this resource + * @member self_ Self referring URI + * @member instantiate Link to the "instantiate" task resource, if the related operation is possible based on the current status of this application instance resource + * @member terminate Link to the "terminate" task resource, if the related operation is possible based on the current status of this application instance resource + * @member operate Link to the "operate" task resource, if the related operation is supported for this application instance, and is possible based on the current status of this application instance resource + * @member appPrconfigure_platform_for_appovider Link to the "configure_platform_for_app" task resource, if the related operation is supported for this application instance, and is possible based on the current status of this application instance resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.4 Type: AppInstanceInfo + */ + type record Link { + LinkType self_, + LinkType instantiate optional, + LinkType terminate optional, + LinkType operate optional, + LinkType configure_platform_for_app optional + } with { + variant (self_) "name as 'self'"; + } + /** + * @desc The data type of AppInstanceInfo represents the parameters of instantiated application instance resources + * @member appInstSelectorType + * @member appInstances + * @member appsFromProviders Match existing application instances, or those created in the future whilst the subscription is active, that belong to applications from certain providers + * @see ETSI GS MEC 010-2 Clause 6.2.2.5 Type: AppInstanceSubscriptionFilter + */ + type record AppInstanceSubscriptionFilter { + AppInstSelectorType appInstSelectorType, + AppInstances appInstances optional, + appsFromProviders appsFromProviders optional + } + + type enumerated AppInstSelectorType { + VOID (0), + APP_IDENTITY (1), + APP_NAME (2), + APP_D_ID (3), + APP_FROM_PROVIDER (4) + } with { + variant "JSON: as number" + } + + type record length(1..infinity) of Json.String AppInstances; + + /** + * @desc Match existing application instances, or those created in the future whilst the subscription is active, that belong to applications from certain providers + * @member appProvider Name of the application provider to match + * @member appProducts Match application instances that belong to application products with certain product names, from one particular provider + * @see ETSI GS MEC 010-2 Clause 6.2.2.5 Type: AppInstanceSubscriptionFilter + */ + type record AppsFromProvider { + Json.String appProvider, + AppProducts appProducts optional + } + + type record length(1..infinity) of AppsFromProvider appsFromProviders; + + type record AppProduct { + Json.String appName, + Versions versions optional + } + + type record length(1..infinity) of AppProduct AppProducts; + + type record Version { + Json.String appSoftVersion, + AppDVersion appDVersion optional + } + type record of Json.String AppDVersion; + + type record length(1..infinity) of Version Versions; + + /** + * @desc This data type represents a subscription filter criteria to match an application LCM operation occurrence + * @member appInstanceSubscriptionFilter this attribute contains filter criteria that selects one or more application instances on which to receive "LCM operation occurrence" notifications + * @member notificationTypes Match particular notification types + * @member operationTypes Type of the LCM operation represented by this application instance LCM operation occurrence + * @member operationStates Type of the LCM operation state represented by this application instance LCM operation occurrence + * @see ETSI GS MEC 010-2 Clause 6.2.2.6 Type: AppLcmOpOccSubscriptionFilter + */ + type record AppLcmOpOccSubscriptionFilter { + AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, + Json.String notificationTypes optional, + OperationTypes operationTypes optional, + OperationStates operationStates optional + } + + type enumerated OperationType { + INSTANTIATE (0), + OPERATE (1), + TERMINATE (2) + } + + type record length(1..infinity) of OperationType OperationTypes; + + type enumerated OperationState { + STARTING (0), + PROCESSING (1), + COMPLETED (2), + FAILED (3), + FAILED_TEMP (4) + } + + type record length(1..infinity) of OperationState OperationStates; + + /** + * @desc This data type represents request parameters of the "Instantiate Application" operation + * @member virtualComputeDescriptor Describes CPU and memory requirements, as well as optional additional requirements, such as disk and acceleration related capabilities, of the virtualisatio n container used to realize the application instance to be created + * @member virtualStorageDescriptor Defines descriptors of virtual storage resources to be used by the application instance to be created + * @member osContainerDescriptor Describes CPU, memory requirements and limits, and software images of the OS Containers realizing this MEC application corresponding to OS Containers sharing the same host and same network namespace + * @member selectedMECHostInfo Describes the information of selected host for the application instance + * @member locationConstraints Defines the location constraints for the application instance to be created + * @member vimConnectionInfo Information about VIM connections to be used for managing the resources for the application instance, or refer to external/externally-managed virtual links + * @member appTermCandsForCoord Provides sets of applications as termination candidate alternatives that the MEO/MEAO shall select from when utilizing the coordinate LCM operation exchange + * @see ETSI GS MEC 010-2 Clause 6.2.2.7 Type: InstantiateAppRequest + */ + type record InstantiateAppRequest { + VirtualComputeDescriptor virtualComputeDescriptor optional, + OsContainerDescriptors osContainerDescriptor optional, + VirtualStorageDescriptor virtualStorageDescriptor optional, + MECHostInformation selectedMECHostInfo, + LocationConstraints locationConstraints optional, + VimConnectionInfos vimConnectionInfo optional, + AppTermCandsForCoord appTermCandsForCoord optional + } + + /** + * @desc This data type represents request parameters of the "Operate Application" operation + * @member changeStateTo The desired operational state + * @member stopType The stop type + * @member gracefulStopTimeout The time interval (in seconds) to wait for the application instance to be taken out of service during graceful stop, before stopping the application + * @see ETSI GS MEC 010-2 Clause 6.2.2.8 Type: OperateAppRequest + */ + type record OperateAppRequest { + OperationalState changeStateTo, + StopType stopType optional, + Json.UInteger gracefulStopTimeout optional + } + + type enumerated StopType { + FORCEFUL (0), + GRACEFUL (1) + } + + /** + * @desc This data type represents request parameters of the "Terminate Application Request" operation + * @member terminationType Indicates whether forceful or graceful termination is requested + * @member gracefulTerminationTimeout This attribute is only applicable in case of graceful termination + * @see ETSI GS MEC 010-2 Clause 6.2.2.9 Type: TerminateAppRequest + */ + type record TerminateAppRequest { + TerminationType terminationType, + Json.UInteger gracefulTerminationTimeout optional + } + + type StopType TerminationType; + + /** + * @desc The data type represents a subscription to notification of application instance operational state change + * @member id Identifier of the subscription to application instance operational state change notification + * @member subscriptionType Shall be set to "AppInstanceStateChangeSubscription" + * @member appInstanceState Application instance state subscribed to + * @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.10 Type: AppInstSubscriptionInfo + */ + type record AppInstSubscriptionInfo { + Json.String id, + Json.String subscriptionType, + AppInstanceState appInstanceState optional, + AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, + Json.AnyURI callbackUri, + AppInstSubscriptionInfo_Link links + } with { + variant (links) "name as '_links'"; + } + + type enumerated AppInstanceState { + NOT_INSTANTIATED (0), + STARTED (1), + STOPPED (2) + } + + /** + * @desc Links to resources related to this resource + * @member self_ URI of this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.10 Type: AppInstSubscriptionInfo + */ + type record AppInstSubscriptionInfo_Link { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc This data type represents an application instance notification for informing the subscribers about operational state of application instance resources + * @member id Identifier of this notification + * @member notificationType Discriminator for the different notification types + * @member appInstanceState Application instance state + * @member subscriptionId Identifier of the subscription related to this notification + * @member timeStamp Date and time of the notification generation + * @member appInstanceId Identifier of application instance + * @member appPkgId Identifier of the onboarded application package + * @member appDId The application descriptor identifier identifies the application package and the application descriptor in a globally unique way + * @member appInstLocation Location of the MEC application instance + * @member links Links to resources related to this notification + * @see ETSI GS MEC 010-2 Clause 6.2.2.11 Type: AppInstNotification + */ + type record AppInstNotification { + Json.String id, + NotificationType notificationType, + AppInstanceState appInstanceState optional, + Json.String subscriptionId, + TimeStamp timeStamp, + Json.String appInstanceId, + Json.String appPkgId, + Json.String appDId, + LocationInformation appInstLocation optional, + AppInstNotification_Links links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this notification + * @member subscription A link to the related subscription + * @see ETSI GS MEC 010-2 Clause 6.2.2.11 Type: AppInstNotification + */ + type record AppInstNotification_Links { + LinkType subscription + } + + /** + * @desc The data type represents the input parameters of "subscription operation" to notification of application lifecycle management for the operational state change of application instance + * @member subscriptionType Shall be set to "AppInstanceStateChangeSubscription" + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member appInstanceState Only send notifications for application instances that are in one of the states listed in this attribute + * @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription + * @see ETSI GS MEC 010-2 Clause 6.2.2.12 Type: AppInstSubscriptionRequest + */ + type record AppInstSubscriptionRequest { + Json.String subscriptionType, + Json.AnyURI callbackUri, + AppInstanceState appInstanceState optional, + AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional + } + + /** + * @desc This data type represents an application lifecycle management operation occurrence + * @member id Identifier of the subscription to application LCM operation occurrence notification + * @member operationState Operation state + * @member stateEnteredTime Date and time when the current state was entered + * @member startTime Date and time of the start of the operation + * @member lcmOperationType of the actual LCM operation represented by this application instance LCM operation occurrence + * @member operationParams Input parameters of the LCM operation + * @member isCancelPending If the application LCM operation occurrence operationState is in "PROCESSING" state and the operation is being cancelled, this attribute shall be set to true + * @member cancelMode The mode of an cancellation + * @member links Link to the application instance that the operation applies to + * @see ETSI GS MEC 010-2 Clause 6.2.2.13 Type: AppLcmOpOcc + */ + type record AppLcmOpOcc { + Json.String id, + OperationState operationState, + TimeStamp stateEnteredTime, + TimeStamp startTime, + OperationType lcmOperation, + OperationParams operationParams optional, + Json.Bool isCancelPending optional, + CancelMode cancelMode optional, + AppLcmOpOcc_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Input parameters of the LCM operation + * @see ETSI GS MEC 010-2 Clause 6.2.2.13 Type: AppLcmOpOcc + */ + type union OperationParams { + InstantiateAppRequest instantiateAppRequest, + OperateAppRequest operateAppRequest, + TerminateAppRequest terminateAppRequest + } + + /** + * @desc Link to the application instance that the operation applies to + * @member self_ URI of this resource + * @member appInstance Link to the application instance that the operation applies to + * @see ETSI GS MEC 010-2 Clause 6.2.2.13 Type: AppLcmOpOcc + */ + type record AppLcmOpOcc_Link { + LinkType self_, + LinkType appInstance + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc This data type represents a subscription request to notification of application life cycle management operation occurrence + * @member subscriptionType Shall be set to "AppLcmOpOccStateChangeSubscription" + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member appLcmOpOccSubscriptionFilter Subscription filter criteria to match specific application LCM operation occurrences + * @see ETSI GS MEC 010-2 Clause 6.2.2.14 Type: AppLcmOpOccSubscriptionRequest + */ + type record AppLcmOpOccSubscriptionRequest { + Json.String subscriptionType, + Json.AnyURI callbackUri, + AppLcmOpOccSubscriptionFilter appLcmOpOccSubscriptionFilter optional + } + + /** + * @desc This data type represents a subscription to notifications of application life cycle management operation occurrence + * @member id Identifier of this subscription resource + * @member subscriptionType Shall be set to "AppLcmOpOccStateChangeSubscription" + * @member appLcmOpOccSubscriptionFilter Criteria used to select application LCM operation occurrences on which to send notifications related to this subscription + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.15 Type: AppLcmOpOccSubscriptionInfo + */ + type record AppLcmOpOccSubscriptionInfo { + Json.String id, + Json.String subscriptionType, + Json.AnyURI callbackUri, + AppLcmOpOccSubscriptionFilter appLcmOpOccSubscriptionFilter optional, + AppLcmOpOccSubscriptionInfo_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this resource + * @member self_ URI of this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.15 Type: AppLcmOpOccSubscriptionInfo + */ + type record AppLcmOpOccSubscriptionInfo_Link { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc This data type represents a notification related to state changes of an application LCM operation occurrence which informs the subscribers + * @member id Identifier of this notification + * @member notificationType Discriminator for the different notification types + * @member operationType Discriminator for the different notification types + * @member operationState Operation state + * @member subscriptionId Identifier of the subscription to this notification + * @member timeStamp Date and time of the notification generation + * @member appLcmOpOccId Identifier of application lifecycle management operation occurrence + * @member appInstanceId Identifier of application instance + * @member links Links to resources related to this notification + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.16 Type: AppLcmOpOccNotification + */ + type record AppLcmOpOccNotification { + Json.String id, + NotificationType notificationType, + OperationType operationType, + OperationState operationState, + Json.String subscriptionId, + TimeStamp timeStamp, + Json.String appLcmOpOccId, + Json.String appInstanceId, + AppLcmOpOccNotification_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this resource + * @member appInstance Link to the resource representing the application instance to which the notified change applies + * @member subscription Link to the related subscription + * @member appLcmOpOcc Link to the application lifecycle management operation occurrence that this notification is related to + * @see ETSI GS MEC 010-2 Clause 6.2.2.16 Type: AppLcmOpOccNotification + */ + type record AppLcmOpOccNotification_Link { + LinkType appInstance, + LinkType subscription, + LinkType appLcmOpOcc + } + + /** + * @desc The data type represents the parameters of MEC host information + * @member hostName Human-readable name of MEC host + * @member hostId KeyValuePairs + * @see ETSI GS MEC 010-2 Clause 6.2.2.17 Type: MECHostInformation + */ + type record MECHostInformation { + Json.String hostName optional, + KeyValuePairs hostId + } + + /** + * @desc The VimConnectionInfo data type specifies the connection information of VIM for managing the resources of the application instance + * @member id The identifier of the VIM Connection + * @member vimId The identifier of the VIM instance + * @member vimType Discriminator for the different types of the VIM information + * @member interfaceInfo Information about the interface or interfaces to the VIM, if applicable, such as the URI of an interface endpoint to communicate with the VIM + * @member accessInfo Authentication credentials for accessing the VIM, and other access-related information such as tenants or infrastructure resource groups + * @member extra VIM type specific additional information + * @see ETSI GS MEC 010-2 Clause 6.2.2.18 Type: VimConnectionInfo + */ + type record VimConnectionInfo { + Json.String id, + Json.String vimId optional, + Json.String vimType, + KeyValuePairs interfaceInfo optional, + KeyValuePairs accessInfo optional, + KeyValuePairs extra optional + } + + type record of VimConnectionInfo VimConnectionInfos; + + /** + * @desc The data type represents a subscription link list of notification on application lifecycle management + * @member links List of hyperlinks related to the resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.19 Type: AppInstanceSubscriptionLinkList + */ + type record SubscriptionLinkList { + SubscriptionLinkList_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc List of hyperlinks related to the resource + * @member self_ URI of this resource + * @member subscriptions A link list to the subscriptions + * @see ETSI GS MEC 010-2 Clause 6.2.2.19 Type: AppInstanceSubscriptionLinkList + */ + type record SubscriptionLinkList_Link { + LinkType self_, + SubscriptionLinkList_Link_Subscriptions subscriptions optional + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc A link list to the subscriptions + * @member href The URI referring to the subscription + * @member subscriptionType Type of the subscription + * @see ETSI GS MEC 010-2 Clause 6.2.2.19 Type: AppInstanceSubscriptionLinkList + */ + type record SubscriptionLinkList_Link_Subscription { + Json.AnyURI href, + AppInstanceSubscriptionType subscriptionType + } + + type record length(1..infinity) of SubscriptionLinkList_Link_Subscription SubscriptionLinkList_Link_Subscriptions; + + /** + * @desc String representing the type of a subscription + * @see ETSI GS MEC 010-2 Clause 6.2.2.20.2 Simple data types + */ + type Json.String AppInstanceSubscriptionType; + + /** + * @desc This data type represents the parameters for configuring the MEP to run an application instance + * @member appServiceRequired Describes services a MEC application requires to run + * @member appServiceOptional Describes services a MEC application may use if available + * @member appServiceProduced Describes services a MEC application is able to produce to the platform or other MEC applications + * @member appFeatureRequired Describes features a MEC application requires to run + * @member transportDependencies Transports, if any, that this application requires to be provided by the platform + * @member appTrafficRule Describes traffic rules the MEC application requires + * @member appDNSRule Describes DNS rules the MEC application requires + * @member appLatency Describes the maximum latency tolerated by the MEC application + * @member userContextTransferCapability If the application supports the user context transfer capability, this attribute shall be included + * @member appNetworkPolicy If present, it represents the application network policy of carrying the application traffic + * @see ETSI GS MEC 010-2 Clause 6.2.2.21 Type: ConfigPlatformForAppRequest + */ + type record ConfigPlatformForAppRequest { + ServiceDependencies appServiceRequired optional, + ServiceDependencies appServiceOptional optional, + ServiceDependencies appServiceProduced optional, + FeatureDependencies appFeatureRequired optional, + FeatureDependencies appFeatureOptional optional, + TransportDependencies transportDependencies optional, + TrafficRuleDescriptors appTrafficRule optional, + DNSRuleDescriptors appDNSRule optional, + LatencyDescriptor appLatency optional, + UserContextTransferCapability userContextTransferCapability optional, + AppNetworkPolicy appNetworkPolicy optional + } + + /** + * @desc The data type represents the parameters of MEC platform information + * @member mepName Human-readable name of MEC platform + * @member mepId Deployment-specific identifier of MEC platform + * @see ETSI GS MEC 010-2 Clause 6.2.2.22 Type: MepInformation + */ + type record MepInformation { + Json.String mepName optional, + Json.String mepId optional + } + + /** + * @desc The AppTermCandsForCoord data type represents the parameters to provide candidates of applications to terminate in pre-emption situations for LCM coordination exchanges + * @member terminationOptions Sets of application options for the MEO/MEAO to select from as candidates for termination + * @see ETSI GS MEC 010-2 Clause 6.2.2.23 Type: AppTermCandsForCoord + */ + type record AppTermCandsForCoord { + TerminationOptions terminationOptions + } + + /** + * @desc Sets of application options for the MEO/MEAO to select from as candidates for termination + * @member appInstIdTerminationCands List of application instance identifiers, constituting a candidate set for termination + * @see ETSI GS MEC 010-2 Clause 6.2.2.23 Type: AppTermCandsForCoord + */ + type record TerminationOption { + AppInstIdTerminationCands appInstIdTerminationCands + } + + type record length(1..infinity) of Json.String AppInstIdTerminationCands; + + type record length(1..infinity) of TerminationOption TerminationOptions; + + /** + * @desc The data type represents the input parameters of "subscription operation" to notification of application instance identifier creation + * @member subscriptionType Shall be set to "AppIdentifierCreationSubscription" + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription + * @see ETSI GS MEC 010-2 Clause 6.2.2.25 Type: AppInstIdCreationSubscriptionRequest + */ + type record AppInstIdCreationSubscriptionRequest { + Json.String subscriptionType, + Json.AnyURI callbackUri, + AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional + } + + /** + * @desc The data type represents a subscription to notification of application instance identifier creation + * @member id Identifier of the subscription to application instance operational state change notification + * @member subscriptionType Shall be set to "AppIdentifierCreationSubscription" + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.26 Type: AppInstIdCreationSubscriptionInfo + */ + type record AppInstIdCreationSubscriptionInfo { + Json.String id, + Json.String subscriptionType, + Json.AnyURI callbackUri, + AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, + AppInstIdCreationSubscriptionInfo_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this resource + * @member self_ URI of this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.26 Type: AppInstIdCreationSubscriptionInfo + */ + type record AppInstIdCreationSubscriptionInfo_Link { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc This data type represents a notification for informing the subscribers about the creation of a new "individual application instance" resource and the associated application instance identifier + * @member id Identifier of this notification + * @member notificationType Discriminator for the different notification types + * @member subscriptionId Identifier of the subscription related to this notification + * @member timeStamp Date and time of the notification generation + * @member appInstanceId The created application instance Identifier + * @member links Links to resources related to this notification + * @see ETSI GS MEC 010-2 Clause 6.2.2.27 Type: AppInstanceIdentifierCreationNotification + */ + type record AppInstanceIdentifierCreationNotification { + Json.String id, + NotificationType notificationType, + TimeStamp timeStamp, + Json.String appInstanceId, + AppInstanceIdentifierCreationNotification_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this notification + * @member subscription A link to the related subscription + * @member appInstance Link to the resource representing the created application instance + * @see ETSI GS MEC 010-2 Clause 6.2.2.27 Type: AppInstanceIdentifierCreationNotification + */ + type record AppInstanceIdentifierCreationNotification_Link { + LinkType subscription, + LinkType appInstance + } + + /** + * @desc The data type represents the input parameters of "subscription operation" to notification of application instance identifier deletion + * @member subscriptionType Shall be set to "AppIdentifierDeletionSubscription" + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription + * @see ETSI GS MEC 010-2 Clause 6.2.2.28 Type: AppInstIdDeletionSubscriptionRequest + */ + type record AppInstIdDeletionSubscriptionRequest { + Json.String subscriptionType, + Json.AnyURI callbackUri, + AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional + } + + /** + * @desc The data type represents a subscription to notification of application instance identifier deletion + * @member id Identifier of the subscription to application instance operational state change notification + * @member subscriptionType Shall be set to "AppIdentifierDeletionSubscription" + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.29 Type: AppInstIdDeletionSubscriptionInfo + */ + type record AppInstIdDeletionSubscriptionInfo { + Json.String id, + Json.String subscriptionType, + Json.AnyURI callbackUri, + AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, + AppInstIdDeletionSubscriptionInfo_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this resource + * @member self_ URI of this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.29 Type: AppInstIdDeletionSubscriptionInfo + */ + type record AppInstIdDeletionSubscriptionInfo_Link { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc This data type represents a notification for informing the subscribers about the deletion of an "individual application instance" resource and the associated application instance identifier + * @member id Identifier of this notification + * @member notificationType Discriminator for the different notification types + * @member subscriptionId Identifier of the subscription related to this notification + * @member timeStamp Date and time of the notification generation + * @member appInstanceId The deleted application instance Identifier + * @member links Links to resources related to this notification + * @see ETSI GS MEC 010-2 Clause 6.2.2.30 Type: AppInstanceIdentifierDeletionNotification + */ + type record AppInstanceIdentifierDeletionNotification { + Json.String id, + NotificationType notificationType, + Json.String subscriptionId, + TimeStamp timeStamp, + Json.String appInstanceId, + AppInstIdDeletionSubscriptionRequest links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc The LocationInformation data type represents the location information of the site hosting the MEC application instance + * @member countryCode The two-letter ISO 3166 [3] country code in capital letters where an instance is deployed + * @member civicAddress Provides the civic address of the site hosting the MEC application instance + * @member Geographical position (i.e. latitude and longitude) where an instance is deployed + * @see ETSI GS MEC 010-2 Clause 6.2.2.31 Type: LocationInformation + */ + type record LocationInformation { + Json.String countryCode, + CivicAddressElement civicAddress optional, + Json.String geographicalPosition optional + } + + /** + * @desc This data type represents the valid modes of cancelling an application LCM operation + * @see ETSI GS MEC 010-2 Clause 6.2.2.32 Type: CancelMode + */ + type StopType CancelMode; - /** - * @desc The enumeration TransportType represents types of transports. - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.4-1: Enumeration TransportType + /** + * @desc This data type represents the information about an MCIO representing the application instance realized by one or a set of OS containers + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.2.31 Type: LocationInformation + */ + type record McioInfo { + // FIXME McioInfo shall follow the definition in clause 8.3.3.33.2 of ETSI GS NFV-IFA 013 [15]. + } + + + /** + * @desc The data type CreateAppPkg represents the parameters for creating a new application package resource + * @member appPkgName Name of the application package to be onboarded + * @member appPkgVersion Version of the application package to be onboarded + * @member appProvider The provider's name of the application package to be onboarded + * @member checksum Checksum of the onboarded application package + * @member userDefinedData User defined data for the application package + * @member appPkgPath Address information of the application package + * @see ETSI GS MEC 010-2 Clause 6.2.3.2 Type: CreateAppPkg + */ + type record CreateAppPkg { + Json.String appPkgName, + Json.String appPkgVersion, + Json.String appProvider optional, + Checksum checksum, + KeyValuePairs userDefinedData optional, + Json.AnyURI appPkgPath + } + + /** + * @desc The data type AppPkgInfo represents the parameters for an application package resource + * @member id Identifier of the application package resource + * @member appDId The application descriptor identifier + * @member appProvider The provider's name of the onboarded application package + * @member appName Name of the onboarded application + * @member appSoftwareVersion Software version of the application. This is updated when there is any change to the software in the onboarded application package + * @member appDVersion Version of the application descriptor + * @member checksum Checksum of the onboarded application package + * @member signingCertificate The singleton signing certificate if it is included as a file in the AppD archive + * @member softwareImages Information of application software image in application package + * @member additionalArtifacts Additional information of application package artifacts that are not application software images + * @member onboardingState Onboarding state of application package + * @member operationalState Operational state of the onboarded application package + * @member usageState Usage state of the onboarded instance of the application package + * @member mecInfo The MEC version that compatible with this application + * @member userDefinedData User defined data for the application package + * @member onboardingFailureDetails Failure details of current onboarding procedure + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.3.3 Type: AppPkgInfo + */ + type record AppPkgInfo { + Json.String id, + Json.String appDId, + Json.String appProvider optional, + Json.String appName, + Json.String appSoftwareVersion, + Json.String appDVersion, + Checksum checksum, + Json.String signingCertificate optional, + AppPkgSWImageInfo softwareImages, + AppPkgArtifactInfo additionalArtifacts optional, + OnboardingState onboardingState, + AppPkgInfo_OperationalState operationalState, + UsageState usageState, + AppPkgInfo_MecInfo mecInfo, + KeyValuePairs userDefinedData optional, + ProblemDetails onboardingFailureDetails optional, + AppPkgInfo_Links links + } with { + variant (links) "name as '_links'"; + } + type record of AppPkgInfo AppPkgInfoList; + + type record AppPkgSWImageInfo_ { + // FIXME The data type of application software image information data model is related to virtualisation method and needs for further study + } + type record length(1..infinity) of AppPkgSWImageInfo_ AppPkgSWImageInfo; + + type record AppPkgArtifactInfo { + // FIXME The data type of additional information of application package artifacts is not specified in the present document + } + + type enumerated OnboardingState { + CREATED (0), + UPLOADING (1), + PROCESSING (2), + ONBOARDED (3) + } + + type enumerated AppPkgInfo_OperationalState { + ENABLED (0), + DISABLED (1) + } + + type enumerated UsageState { + IN_USE (0), + NOT_IN_USE (1) + } + + type record length(1..infinity) of Json.String AppPkgInfo_MecInfo; + + /** + * @desc Links to resources related to this resource + * @member self_ Self referring URI + * @member appDId Link to the appD resource + * @member appPkgContent Link to the "Onboarded application package content" resource + * @member vnfPkgInfo Link to the corresponding VNF package resource at NFVO + * @see ETSI GS MEC 010-2 Clause 6.2.3.3 Type: AppPkgInfo + */ + type record AppPkgInfo_Links { + LinkType self_, + LinkType appD, + LinkType appPkgContent, + LinkType vnfPkgInfo optional + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc The data type represents a subscription to notification of application package management for the onboarding, or operational state change of application package + * @member id Identifier of the subscription to application package notification + * @member subscriptionType Type of subscription + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.3.4 Type: AppPkgSubscriptionInfo + */ + type record AppPkgSubscriptionInfo { + Json.String id, + AppPkgSubscriptionType subscriptionType, + Json.AnyURI callbackUri, + AppPkgSubscriptionInfo_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this resource + * @member self_ URI of this resource + * @see ETSI GS MEC 010-2 Clause 6.2.3.4 Type: AppPkgSubscriptionInfo + */ + type record AppPkgSubscriptionInfo_Link { + LinkType self_ + } with { + variant (self_) "name as 'self'" + } + + /** + * @desc The data type represents a subscription link list of notification on application package management + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.3.5 Type: AppPkgSubscriptionLinkList + */ + type record AppPkgSubscriptionLinkList { + AppPkgSubscriptionLinkList_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this resource + * @member self_ URI of this resource + * @member subscriptions A link list to the subscriptions to an application package + * @see ETSI GS MEC 010-2 Clause 6.2.3.5 Type: AppPkgSubscriptionLinkList + */ + type record AppPkgSubscriptionLinkList_Link { + LinkType self_, + AppPkgSubscriptionLinkList_Link_Subscriptions subscriptions optional + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc A link list to the subscriptions to an application package + * @member href The URI referring to the subscription + * @member subscriptionType Type of the subscription + * @see ETSI GS MEC 010-2 Clause 6.2.3.5 Type: AppPkgSubscriptionLinkList + */ + type record AppPkgSubscriptionLinkList_Link_Subscription { + Json.AnyURI href, + AppPkgSubscriptionType subscriptionType + } + + type record length(1..infinity) of AppPkgSubscriptionLinkList_Link_Subscription AppPkgSubscriptionLinkList_Link_Subscriptions; + + /** + * @desc This data type represents an application package management notification for informing the subscribers about onboarding application package resources + * @member id Identifier of this notification + * @member notificationType Discriminator for the different notification types + * @member subscriptionId Identifier of the subscription to this notification + * @member timeStamp Date and time of the notification generation + * @member appPkgId Identifier of the onboarded application package + * @member appDId The application descriptor identifier identifies the application package and the application descriptor in a globally unique way + * @member operationalState Operational state of the application package + * @member links Links to resources related to this notification + * @see ETSI GS MEC 010-2 Clause 6.2.3.6 Type: AppPkgNotification + */ + type record AppPkgNotification { + Json.String id, + Json.String notificationType, + Json.String subscriptionId, + TimeStamp timeStamp, + Json.String appPkgId, + Json.String appDId, + AppPkgInfo_OperationalState operationalState, + AppPkgNotification_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this notification + * @member subscription A link to the related subscription + * @see ETSI GS MEC 010-2 Clause 6.2.3.6 Type: AppPkgNotification + */ + type record AppPkgNotification_Link { + LinkType subscription + } + + /** + * @desc The data type represents the input parameters of "subscription operation" to notification of application package management for the onboarding, or operational state change of application package + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member subscriptionType Type of the subscription + * @member appPkgFilter The attribute-based filter is to filter application packages on which the query applies + * @see ETSI GS MEC 010-2 Clause 6.2.3.7 Type: AppPkgSubscription + */ + type record AppPkgSubscription { + Json.AnyURI callbackUri, + AppPkgSubscriptionType subscriptionType, + AppPkgFilter appPkgFilter optional + } + + /** + * @desc The data type represents modifications of the "AppPkgInfo" data type that can be requested to perform "application package operation" + * @member New value of the "operationalState" attribute of the "OnboardedAppPkgInfo" structure + * @see ETSI GS MEC 010-2 Clause 6.2.3.8 Type: AppPkgInfoModifications + */ + type record AppPkgInfoModifications { + AppPkgInfo_OperationalState operationalState + } + + /** + * @desc String representing the type of a subscription + * @see ETSI GS MEC 010-2 Clause 6.2.3.9.2 Simple data types + */ + type Json.String AppPkgSubscriptionType; + + /** + * @desc This data type represents subscription filter criteria to match application package + * @member appPkgInfoId Match the application package identifier which is allocated by the MEO + * @member appDId Match the application descriptor identifier which is allocated by the application provider + * @member appProvider Match the provider's name of the onboarded application + * @member appName Match the name of the onboarded application + * @member appSoftwareVersion Match the software version of the application package + * @member appDVersion Match the version of the application descriptor + * @member operationalState Match particular operational state of the application package + * @member usageState Match particular usage state of the application package + * @see ETSI GS MEC 010-2 Clause 6.2.3.10 Type: AppPkgFilter + */ + type record AppPkgFilter { + Json.String appPkgInfoId optional, + Json.String appDId optional, + Json.String appProvider optional, + Json.String appName optional, + Json.String appSoftwareVersion optional, + Json.String appDVersion optional, + AppPkgInfo_OperationalState operationalState optional, + UsageState usageState optional + } + + /** + * @desc This type represents a grant request + * @member appInstanceId Identifier of the application instance which this grant request is related to + * @member appLcmOpOccId The identifier of the application lifecycle management operation occurrence associated to the GrantRequest + * @member appDId Identifier of the AppD that defines the application for which the LCM operation is to be granted + * @member operation The lifecycle management operation for which granting is requested + * @member addResources List of resource definitions in the AppD for resources to be added by the LCM operation which is related to this grant request, with one entry per resource + * @member tempResources List of resource definitions in the AppD for resources to be temporarily instantiated during the runtime of the LCM operation which is related to this grant request + * @member removeResources Removed by the LCM operation which is related to this grant request, with one entry per resource + * @member updateResources Provides the definitions of resources to be modified by the LCM operation which is related to this grant request, with one entry per resource + * @member additionalParams MEPM, specific to the application and the LCM operation + * @member links Links to resources related to this request + * @see ETSI GS MEC 010-2 Clause 6.2.4 Granting information model + */ + type record GrantRequest { + Json.String appInstanceId, + Json.String appLcmOpOccId, + Json.String appDId, + OperationType operation, + ResourceDefinitions addResources optional, + ResourceDefinitions tempResources optional, + ResourceDefinitions updateResources optional, + KeyValuePairs additionalParams optional, + GrantRequest_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this request + * @member appLcmOpOcc Related lifecycle management operation occurrence + * @member appInstance Related application instance + * @see ETSI GS MEC 010-2 Clause 6.2.4 Granting information model + */ + type record GrantRequest_Link { + LinkType appLcmOpOcc, + LinkType appInstance + } + + /** + * @desc This type provides information of an existing or proposed resource used by the application + * @member id Identifier of this "ResourceDefinition" structure, unique at least within the scope of the "GrantRequest" structure + * @member type_ Type of the resource definition referenced + * @member vduId Reference to the related VDU in the AppD applicable to this resource + * @member resourceTemplateId Reference to a resource template, i.e. VirtualComputeDescriptor, AppExtCpd, VirtualStorageDescriptor in the AppD + * @member resource Resource information for an existing resource + * @see ETSI GS MEC 010-2 Clause 6.2.4.3 Type: ResourceDefinition + */ + type record ResourceDefinition { + Json.String id, + ResourceDefinition_Type type_, + Json.String vduId optional, + ResourceTemplateId resourceTemplateId, + ResourceDefinition_Resource resource + } with { + variant (type_) "name as 'type'"; + } + + type record of ResourceDefinition ResourceDefinitions; + + type enumerated ResourceDefinition_Type { + COMPUTE (0), + STORAGE (1), + LINKPORT (2), + OSCONTAINER (3) + } + + type record of Json.String ResourceTemplateId; + + /** + * @desc Resource information for an existing resource + * @member vimConnectionInfo Specifies the connection information of VIM for the resources of the application instance + * @member resourceId Identifier of the resource in the scope of the VIM + * @see ETSI GS MEC 010-2 Clause 6.2.4.3 Type: ResourceDefinition + */ + type record ResourceDefinition_Resource { + VimConnectionInfo vimConnectionInfo, + Json.String resourceId + } + + /** + * @desc This type represents a grant + * @member id Identifier of the Grant + * @member appInstanceId Identifier of the application instance which this Grant is related to + * @member appLcmOpOccId The identifier of the application lifecycle management operation occurrence associated to the Grant + * @member vimConnections Provides information regarding VIM connections that are approved to be used by the MEPM to allocate resources, and provides parameters of these VIM connections + * @member zones Identifies resource zones where the resources are approved to be allocated by the MEPM + * @member zoneGroups Information about groups of resource zones that are related and that the MEO has chosen to fulfil a zoneGroup constraint in the Grant request + * @member addResources List of resources that are approved to be added, with one entry per resource + * @member tempResources List of resources that are approved to be temporarily instantiated during the runtime of the lifecycle operation, with one entry per resource + * @member removeResources List of resources that are approved to be removed, with one entry per resource + * @member updateResources List of resources that are approved to be modified, with one entry per resource + * @member vimAssets Information about assets for the application that are managed by the MEO in the VIM, such as software images + * @member extVirtualLinks Information about external VLs to connect the application instance to + * @member MEPM, specific to the application and the LCM operation + * @member links Links to resources related to this request + * @see ETSI GS MEC 010-2 Clause 6.2.4.4 Type: Grant + */ + type record Grant { + Json.String id, + Json.String appInstanceId, + Json.String appLcmOpOccId, + VimConnectionInfos vimConnections optional, + ZoneInfos zones optional, + ZoneGroupInfos zoneGroups optional, + GrantInfos addResources optional, + GrantInfos tempResources optional, + GrantInfos removeResources optional, + GrantInfos updateResources optional, + VimAssets vimAssets optional, + ExtVirtualLinkDatas extVirtualLinks optional, + KeyValuePairs additionalParams optional, + Grant_Link links + } with { + variant (links) "name as '_links'"; + } + + type record VimAssets { + VimSoftwareImage softwareImages optional + } + + /** + * @desc Links to resources related to this request + * @member appLcmOpOcc Related lifecycle management operation occurrence + * @member appInstance Related application instance + * @see ETSI GS MEC 010-2 Clause 6.2.4.4 Type: Grant + */ + type record Grant_Link { + LinkType appLcmOpOcc, + LinkType appInstance + } + + /** + * @desc This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted + * @member resourceDefinitionId Identifier of the related "ResourceDefinition" structure from the related "GrantRequest" structure + * @member vimConnectionId Identifier of the VIM connection to be used to manage this resource + * @member zoneId Reference to the identifier of the "ZoneInfo" structure in the "Grant" structure defining the resource zone into which this resource is to be placed + * @member resourceGroupId Identifier of the "infrastructure resource group", logical grouping of virtual resources assigned to a tenant within an Infrastructure Domain, to be provided when allocating the resource + * @member mcioConstraints The constraint values to be assigned to MCIOs of an application with containerized components + * @see ETSI GS MEC 010-2 Clause 6.2.4.5 Type: GrantInfo + */ + type record GrantInfo { + Json.String resourceDefinitionId, + Json.String vimConnectionId optional, + Json.String zoneId optional, + Json.String resourceGroupId optional, + KeyValuePairs mcioConstraints optional + } + type record of GrantInfo GrantInfos; + + /** + * @desc This type provides information regarding a resource zone + * @member id The identifier of this ZoneInfo instance, for the purpose of referencing it from other structures in the "Grant" structure + * @member zoneId The identifier of the resource zone, as managed by the resource management layer (typically, the VIM) + * @member vimConnectionId Identifier of the connection to the VIM that manages the resource zone + * @see ETSI GS MEC 010-2 Clause 6.2.4.6 Type: ZoneInfo + */ + type record ZoneInfo { + Json.String id, + Json.String zoneId, + Json.String vimConnectionId optional + } + type record of ZoneInfo ZoneInfos; + + /** + * @desc This type provides information regarding a resource zone group + * @member zoneId References of identifiers of "ZoneInfo" structures, each of which provides information about a resource zone that belongs to this group + * @see ETSI GS MEC 010-2 Clause 6.2.4.7 Type: ZoneGroupInfo + */ + type record ZoneGroupInfo { + ZoneIds zoneId + } + type record of ZoneGroupInfo ZoneGroupInfos; + type record of Json.String ZoneIds; + + /** + * @desc This type represents an external VL + * @member id The identifier of the external VL instance + * @member vimConnectionId Identifier of the VIM connection to manage this resource + * @member resourceId The identifier of the resource in the scope of the VIM + * @member extCps External CPs of the application instance to be connected to this external VL + * @member extLinkPorts Externally provided link ports to be used to connect external connection points to this external VL + * @see ETSI GS MEC 010-2 Clause 6.2.4.8 Type: ExtVirtualLinkData + */ + type record ExtVirtualLinkData { + Json.String id, + Json.String vimConnectionId optional, + Json.String resourceId, + AppExtCpData extCps, + ExtLinkPortDatas extLinkPorts optional + } + type record of ExtVirtualLinkData ExtVirtualLinkDatas; + + /** + * @desc This type represents an externally provided link port to be used to connect an external connection point to an external VL + * @member id Identifier of this link port as provided by the entity that has created the link port + * @member resourceHandleReference to the virtualised resource realizing this link port + * @see ETSI GS MEC 010-2 Clause 6.2.4.9 Type: ExtLinkPortData + */ + type record ExtLinkPortData { + Json.String id, + ResourceHandle resourceHandle + } + type record of ExtLinkPortData ExtLinkPortDatas; + + /** + * @desc This type represents the information that allows addressing a virtualised resource that is used by an application instance + * @member vimConnectionId Identifier of the VIM connection to manage the resource + * @member resourceId Identifier of the resource in the scope of the VIM + * @member vimLevelResourceType Type of the resource in the scope of the VIM + * @see ETSI GS MEC 010-2 Clause 6.2.4.10 Type: ResourceHandle + */ + type record ResourceHandle { + Json.String vimConnectionId optional, + Json.String resourceId, + Json.String vimLevelResourceType optional + } + + /** + * @desc This type contains a mapping between a software image definition in the AppD and the corresponding software image managed by the MEO in the VIM which is needed during compute resource instantiation + * @member vimConnectionId Identifier of the VIM connection to access the software image referenced in this structure + * @member appDSoftwareImageId Identifier which references the software image descriptor in the AppD + * @member vimSoftwareImageId Identifier of the software image in the resource management layer (i.e. VIM) + * @see ETSI GS MEC 010-2 Clause 6.2.4.11 Type: VimSoftwareImage + */ + type record VimSoftwareImage { + Json.String vimConnectionId optional, + Json.String appDSoftwareImageId, + Json.String vimSoftwareImageId + } + + /** + * @desc This type represents configuration information for external CPs created from a CPD + * @member cpdId The identifier of the CPD in the AppD + * @member cpConfig List of instance data that need to be configured on the CP instances created from the respective CPD + * @see ETSI GS MEC 010-2 Clause 6.2.4.12 Type: AppExtCpData + */ + type record AppExtCpData_ { + Json.String cpdId, + AppExtCpConfig cpConfig + } + + type record length(1..infinity) of AppExtCpData_ AppExtCpData; + + /** + * @desc This type represents an externally provided link port or network address information per instance of an external connection point + * @member cpInstanceId Identifier of the external CP instance to which this set of configuration parameters is requested to be applied + * @member linkPortId Identifier of a pre-configured link port to which the external CP will be associated + * @member cpProtocolData Parameters for configuring the network protocols on the link port that connects the CP to a VL + * @see ETSI GS MEC 010-2 Clause 6.2.4.13 Type: AppExtCpConfig + */ + type record AppExtCpConfig_ { + Json.String cpInstanceId optional, + Json.String linkPortId optional, + CpProtocolData cpProtocolData optional + } + + type record length(1..infinity) of AppExtCpConfig_ AppExtCpConfig; + + /** + * @desc This type represents network protocol data + * @member layerProtocol Identifier of layer(s) and protocol(s) + * @member ipOverEthernet Network address data for IP over Ethernet to assign to the extCP instance + * @see ETSI GS MEC 010-2 Clause 6.2.4.14 Type: CpProtocolData + */ + type record CpProtocolData_ { + LayerProtocol layerProtocol, + IpOverEthernetAddressData ipOverEthernet optional + } + + type record length(1..infinity) of CpProtocolData_ CpProtocolData; + + type enumerated LayerProtocol { + IP_OVER_ETHERNET + } + + /** + * @desc This type represents network address data for IP over Ethernet + * @member macAddress MAC address + * @member ipAddresses List of IP addresses to assign to the CP instance + * @see ETSI GS MEC 010-2 Clause 6.2.4.15 Type: IpOverEthernetAddressData + */ + type record IpOverEthernetAddressData { + Json.String macAddress optional, + IpAddresses ipAddresses optional + } + + /** + * @desc IP addresses to assign to the CP instance + * @member type_ The type of the IP addresses + * @member fixedAddresses Fixed addresses to assign (from the subnet defined by "subnetId" if provided) + * @member numDynamicAddresses Number of dynamic addresses to assign (from the subnet defined by "subnetId" if provided) + * @member addressRange An IP address range to be used, e.g. in case of egress connections + * @see ETSI GS MEC 010-2 Clause 6.2.4.15 Type: IpOverEthernetAddressData + */ + type record IpAddress { + IpAddressType type_, + FixedAddresses fixedAddresses optional, + Json.Integer numDynamicAddresses optional, + AddressRange addressRange optional + } with { + variant (type_) "name as 'type'"; + } + + type record length(1..infinity) of IpAddress IpAddresses; + + type enumerated IpAddressType { + IPV4, + IPV6 + } + + type record length(1..infinity) of Json.String FixedAddresses; + + type record AddressRange { + Json.String minAddress, + Json.String maxAddress, + Json.String subnetId optional + } + + /** + * @desc This data type represents a type of link + * @member href URI referring to a resource + * @see ETSI GS MEC 010-2 Clause 6.2.5.2 Type: LinkType + */ + type record LinkType { + Json.AnyURI href + } + + /** + * @desc This data type represents a list of key-value pairs + * @member + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.5.3 Type: KeyValuePairs + */ + type record KeyValuePairs { + Json.String key_name, + anytype key_value // FIXME To be refined + } + + /** + * @desc This data type represents the time stamp as Unix-time since January 1, 1970, 00:00:00 UTC + * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @see ETSI GS MEC 010-2 Clause 6.2.5.4 Type: TimeStamp + */ + type record TimeStamp { + Seconds seconds, + NanoSeconds nanoSeconds + } + + /** + * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + */ + type Json.UInteger Seconds; + + /** + * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + */ + type Json.UInteger NanoSeconds; + + /** + * @desc This type represents the checksum of an application package + * @member algorithm Name of the algorithm used to generate the checksum, as defined in ETSI GS NFV-SOL 004 [18] + * @member hash The hexadecimal value of the checksum + * @see ETSI GS MEC 010-2 Clause 6.2.5.6 Type: Checksum + */ + type record Checksum { + Json.String algorithm, + Json.String hash + } + + group edge_platform_application_enablement { /* TITAN WORK-AROUND for build issue (class forward declaration) */ + + /** + * @desc The enumeration TransportType represents types of transports. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.4-1: Enumeration TransportType */ type enumerated TransportType { REST_HTTP, @@ -26,7 +1950,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { } /** - * @desc List of supported OAuth 2.0 grant types. + * @desc List of supported OAuth 2.0 grant types. */ type enumerated GrantTypes { OAUTH2_AUTHORIZATION_CODE, @@ -37,12 +1961,12 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { type record length(1..4) of GrantTypes GrantTypesList; /** - * @desc The token endpoint. + * @desc The token endpoint. */ type Json.String TokenEndpoint; /** - * @desc Parameters related to use of OAuth 2.0. + * @desc Parameters related to use of OAuth 2.0. */ type record OAuth2Info { GrantTypesList grantTypes, @@ -50,8 +1974,8 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { } /** - * @desc This type represents security information related to a transport. - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.5.4-1: Attributes of SecurityInfo + * @desc This type represents security information related to a transport. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.5.4-1: Attributes of SecurityInfo */ type record SecurityInfo { OAuth2Info oAuth2Info optional, @@ -59,8 +1983,8 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { } /** - * @desc The enumeration SerializerTypes represents types of serializers. - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.3-1: Enumeration SerializerType + * @desc The enumeration SerializerTypes represents types of serializers. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.3-1: Enumeration SerializerType */ type enumerated SerializerType { JSON, @@ -70,27 +1994,27 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { } /** - * @desc Reference of the catalogue. + * @desc Reference of the catalogue. */ type Json.String CategoryRef_Href; /** - * @desc Unique identifier of the category. + * @desc Unique identifier of the category. */ type Json.String CategoryRef_Id; /** - * @desc Name of the category. + * @desc Name of the category. */ type Json.String Name; /** - * @desc Category version. + * @desc Category version. */ type Json.String CategoryRef_Version; /** - * @desc This type represents the category reference. + * @desc This type represents the category reference. */ type record CategoryRef { CategoryRef_Href href, @@ -103,1704 +2027,6 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { } // End of group edge_platform_application_enablement - group application_descriptor_information_model { - - /** - * @desc An application Descriptor (AppD) is a part of application package, and describes application requirements and rules required by application provider - * @member appDid Identifier of this MEC application descriptor. This attribute shall be globally unique - * @member appName Name to identify the MEC application - * @member appProvider Provider of the application and of the AppD - * @member appSoftVersion Identifies the version of software of the MEC application - * @member appDVersion Identifies the version of the application descriptor - * @member mecVersion Identifies version(s) of MEC system compatible with the MEC application described in this version of the AppD - * @member appInfoName Human readable name for the MEC application - * @member appDescription Human readable description of the MEC application - * @member virtualComputeDescriptor Describes CPU and memory requirements, as well as optional additional requirements, such as disk and acceleration related capabilities, of the virtualisation container used to realize this MEC application - * @member swImageDescriptor Describes the descriptors of the software image to be used by the virtualisation container used to realize this MEC application - * @member appExtCpd Describes external interface(s) exposed by this MEC application - * @member appServiceRequired Describes services a MEC application requires to run - * @member appServiceOptional Describes services a MEC application may use if available - * @member appServiceProduced Describes services a MEC application is able to produce to the platform or other MEC applications - * @member appFeatureRequired Describes features a MEC application requires to run - * @member appFeatureOptional Describes features a MEC application may use if available - * @member transportDependencies Transports, if any, that this application requires to be provided by the platform - * @member appTrafficRule Describes traffic rules the MEC application requires - * @member appDNSRule Describes DNS rules the MEC application requires - * @member appLatency Describes the maximum latency tolerated by the MEC application - * @member terminateAppInstanceOpConfig Configuration parameters for the Terminate application instance operation - * @member changeAppInstanceStateOpConfig Configuration parameters for the change application instance state operation - * @member userContextTransferCapability If the application supports the user context transfer capability - * @member appNetworkPolicy It represents the application network policy of carrying the application traffic - * @see ETSI GS MEC 010-2 Clause 6.2.1.2.2 - */ - type record AppD { - Json.String appDId, - Json.String appName, - Json.String appProvider, - Json.String appSoftVersion, - Json.String appDVersion, - Json.String mecVersion, - Json.String appInfoName optional, - Json.String appDescription, - VirtualComputeDescriptor virtualComputeDescriptor, - SwImageDescriptor virtualStorageDescriptor optional, - AppExternalCpd appExtCpd optional, - ServiceDependency appServiceRequired optional, - ServiceDependency appServiceOptional optional, - ServiceDescriptor appServiceProduced optional, - FeatureDependency appFeatureRequired optional, - FeatureDependency appFeatureOptional optional, - TransportDependency transportDependencies optional, - TrafficRuleDescriptor appTrafficRule optional, - DNSRuleDescriptor appDNSRule optional, - LatencyDescriptor appLatency optional, - TerminateAppInstanceOpConfig terminateAppInstanceOpConfig optional, - ChangeAppInstanceStateOpConfig changeAppInstanceStateOpConfig optional, - UserContextTransferCapability userContextTransferCapability optional, - AppNetworkPolicy appNetworkPolicy optional - } - - /** - * @desc The VirtualComputeDescriptor data type supports the specification of requirements related to virtual compute resources - * @member - * @see ETSI GS MEC 010-2 Clause 6.2.1.3 Type: VirtualComputeDescriptor - */ - type record VirtualComputeDescriptor { - // FIXME shall follow the definition in clause 7.1.9.2.2 of ETSI GS NFV‑IFA 011 [0], with the following consideration: - } - - /** - * @desc The SwImageDescriptor data type describes the software image of a MEC application - * @member - * @see ETSI GS MEC 010-2 Clause 6.2.1.4 Type: SwImageDescriptor - */ - type record SwImageDescriptor { - // FIXME shall follow the definition in clause 7.1.6.5 of ETSI GS NFV‑IFA 011 [0], with the following consideration: - } - - /** - * @desc The VirtualStorageDescriptor data type describes the virtual storage required by a MEC application - * @member - * @see ETSI GS MEC 010-2 Clause 6.2.1.5 Type: VirtualStorageDescriptor - */ - type record VirtualStorageDescriptor { - // FIXME shall follow the definition in clause 7.1.9.4 of ETSI GS NFV‑IFA 011 [0], with the following consideration: - } - - /** - * @desc The AppExternalCpd data type supports the specification of MEC application requirements related to external connection point - * @member virtualNetworkInterfaceRequirements Specifies requirements on a virtual network interface realizing the CPs instantiated from this CPD - * @see ETSI GS MEC 010-2 Clause 6.2.1.6 Type: AppExternalCpd - */ - type record AppExternalCpd { - VirtualNetworkInterfaceRequirements virtualNetworkInterfaceRequirements optional - } - - type record VirtualNetworkInterfaceRequirement { - // FIXME For the definition of the VirtualNetworkInterfaceRequirements, please refer to clause 7.1.6.6 of ETSI GS NFV-IFA 011 [0]. For the definition of Cpd, please refer to clause 7.1.6.3 of ETSI GS NFV-IFA 011 [0] - } - - type record length(1..infinity) of VirtualNetworkInterfaceRequirement VirtualNetworkInterfaceRequirements; - - /** - * @desc The ServiceDescriptor data type describes a MEC service produced by a service-providing MEC applicationt - * @member serName The name of the service, for example, RNIS, LocationService, etc - * @member serCategory A Category reference of the service, defined in ETSI GS MEC 011 [17]i.0 - * @member version The version of the service - * @member transportsSupported Indicates transports and serialization formats supported made available to the service-consuming application - * @see ETSI GS MEC 010-2 Clause 6.2.1.7 Type: ServiceDescriptor - */ - type record ServiceDescriptor { - Json.String serName, - CategoryRef serCategory optional, - Json.String version, - TransportsSupported transportsSupported optional - } - - /** - * @desc Indicates transports and serialization formats supported made available to the service-consuming application - * @member transport Information about the transport in this binding - * @member serializers Information about the serializers in this binding, as defined in the SerializerType type in ETSI GS MEC 011 [17]i.0 - * @see ETSI GS MEC 010-2 Clause 6.2.1.7 Type: ServiceDescriptor - */ - type record TransportsSupported { - TransportDescriptor transport, - SerializerType serializers - } - - /** - * @desc The FeatureDependency data type supports the specification of requirements of a MEC application related to a feature of MEC platform - * @member featureName The name of the feature, for example, UserApps, UEIdentity, etc - * @member version The version of the feature - * @see ETSI GS MEC 010-2 Clause 6.2.1.8 Type: FeatureDependency - */ - type record FeatureDependency { - Json.String featureName, - Json.String version - } - - /** - * @desc The TrafficRuleDescriptor data type describes traffic rules related to a MEC application - * @member trafficRuleId Identifies the traffic rule - * @member filterType Definition of filter type: per FLOW or PACKET - * @member priority Priority of this traffic rule within the range 0 to 255. If traffic rule conflicts, the one with higher priority take precedence - * @member trafficFilter The filter used to identify specific flow/packets that need to be handled by the MEC host - * @member action_ Identifies the action of the MEC host data plane, when a packet matches the trafficFilter - * @member dstInterface Describes the destination interface information - * @see ETSI GS MEC 010-2 Clause 6.2.1.9 Type: TrafficRuleDescriptor - */ - type record TrafficRuleDescriptor { - Json.String trafficRuleId, - FilterType filterType, - integer priority, - TrafficFilter trafficFilter, - Action action_, - InterfaceDescriptor dstInterface optional - } with { - variant (action_) "name as 'action'"; - } - - type enumerated FilterType { - FLOW, - PACKET - } with { - variant "JSON: as number" - } - - type enumerated Action { - DROP, - FORWARD_DECAPSULATED, - FORWARD_AS_IS, - PASSTHROUGH, - DUPLICATED_DECAPSULATED, - DUPLICATE_AS_IS - } with { - variant "JSON: as number" - } - - /** - * @desc The TrafficFilter data type supports the specification of MEC application requirements related to traffic rules - * @member srcAddress An IP address or a range of IP addresses - * @member dstAddress A IP address or a range of IP addresses - * @member srcPort A port or a range of ports - * @member dstPort A port or a range of ports - * @member protocol Specify the protocol of the traffic filter - * @member tag Used for tag based traffic rule - * @member uri An URI label, in application layer - * @member packetLabel A customized packet label in network layer, as defined by the owner of the MEC platform, is used to filter the traffic - * @member srcTunnelAddressUsed for GTP tunnel based traffic rule - * @member tgtTunnelAddress Used for GTP tunnel based traffic rule - * @member srcTunnelPort Used for GTP tunnel based traffic rule - * @member qCI Used to match all packets that have the same QCI - * @member dSCP Used to match all IPv4 packets that have the same DSCP - * @member tC Used to match all IPv6 packets that have the same TC - * @see ETSI GS MEC 010-2 Clause 6.2.1.10 Type: TrafficFilter - */ - type record TrafficFilter { - Json.String srcAddress optional, - Json.String dstAddress optional, - Json.String srcPort optional, - Json.String dstPort optional, - Json.String protocol optional, - Json.String tag optional, - Json.String uri optional, - Json.String packetLabel optional, - Json.String srcTunnelAddress optional, - Json.String tgtTunnelAddress optional, - Json.String srcTunnelPort optional, - Json.String dstTunnelPort optional, - integer qCI optional, - integer dSCP optional, - integer tC optional - } - - /** - * @desc The InterfaceDescriptor data type describes an interface of a MEC application - * @member interfaceType Type of interface - * @member tunnelInfo Included only if the destination address type is tunnel - * @member srcMACAddress The source address identifies the MAC address of the interface - * @member dstMACAddress The destination address identifies the MAC address of the destination - * @see ETSI GS MEC 010-2 Clause 6.2.1.11 Type: InterfaceDescriptor - */ - type record InterfaceDescriptor { - InterfaceType interfaceType, - TunnelInfo tunnelInfo optional, - Json.String srcMACAddress optional, - Json.String dstMACAddress optional - } - - type enumerated InterfaceType { - TUNNEL, - MAC, - IP - } with { - variant "JSON: as number" - } - - /** - * @desc The TunnelInfo data type supports the specification of MEC application requirements related to traffic rules - * @member tunnelType Type of tunnel - * @member tunnelDstAddress Destination address of the tunnel - * @member tunnelSrcAddress Source address of the tunnel - * @member tunnelSpecificData Parameters specific to the tunnel - * @see ETSI GS MEC 010-2 Clause 6.2.1.12 Type: TunnelInfo - */ - type record TunnelInfo { - TunnelType tunnelType, - Json.String tunnelDstAddress, - Json.String tunnelSrcAddress, - Json.String tunnelSpecificData optional - } - - type enumerated TunnelType { - GTP_U, - GRE - } with { - variant "JSON: as number" - } - - /** - * @desc The DNSRuleDescriptor data type describes DNS rules associated with a MEC application - * @member dnsRuleId Identifies the DNS Rule - * @member domainName FQDN of the DNS rule - * @member ipAddressType Specifies the IP address type - * @member ttl Time-to-live value - * @see ETSI GS MEC 010-2 Clause 6.2.1.13 Type: DNSRuleDescriptor - */ - type record DNSRuleDescriptor { - Json.String dnsRuleId, - Json.String domainName, - Json.String ipAddressType, - IpAddress ipAddress, - integer ttl optional - } - - /** - * @desc The LatencyDescriptor data type describes latency requirements for a MEC application - * @member maxLatency The value of the maximum latency in nano seconds tolerated by the MEC application - * @see ETSI GS MEC 010-2 Clause 6.2.1.14 Type: LatencyDescriptor - */ - type record LatencyDescriptor { - Json.UInteger maxLatency - } - - /** - * @desc The TerminateAppInstanceOpConfig data type supports the specification of MEC application requirements related to terminate application instance operation configuration - * @member - * @see ETSI GS MEC 010-2 Clause 6.2.1.15 Type: TerminateAppInstanceOpConfig - */ - type record TerminateAppInstanceOpConfig { - // FIXME shall follow the definition in clause 7.1.5.7 of ETSI GS NFV‑IFA 011 [0]. - } - - /** - * @desc The ChangeAppInstanceStateOpConfig data type supports the specification of MEC application requirements related to change application instance state operation configuration - * @member - * @see ETSI GS MEC 010-2 Clause 6.2.1.16 Type: ChangeAppInstanceStateOpConfig - */ - type record ChangeAppInstanceStateOpConfig { - // FIXME shall follow the definition in clause 7.1.5.8 of ETSI GS NFV‑IFA 011 [0]. - } - - /** - * @desc The ServiceDependency data type supports the specification of requirements of a service-consuming MEC application related to a MEC service - * @member serName The name of the service - * @member serCategory A Category reference of the service - * @member version The version of the service - * @member serTransportDependencies Indicates transport and serialization format dependencies of consuming the service - * @member requestedPermissions - * @see ETSI GS MEC 010-2 Clause 6.2.1.17 Type: ServiceDependency - */ - type record ServiceDependency { - Json.String serName, - CategoryRef serCategory optional, - Json.String version, - TransportDependency serTransportDependencies optional, - Json.String requestedPermissions optional - } - - /** - * @desc The TransportDependency data type supports the specification of requirements of a MEC application related to supported transport bindings (each being a combination of a transport with one or more serializers) - * @member transport Information about the transport in this transport binding - * @member serializers Information about the serializers in this transport binding, as defined in the SerializerType type in ETSI GS MEC 011 [17]i.0 - * @member labels Set of labels that allow to define groups of transport bindings - * @see ETSI GS MEC 010-2 Clause 6.2.1.18 Type: TransportDependency - */ - type record TransportDependency { - TransportDescriptor transport, - SerializerType serializers, - Labels labels - } - - type record length(1..infinity) of Json.String Labels; - - /** - * @desc The TransportDescriptor data type describes a transport - * @member name The name of this transport - * @member description Human-readable description of this transport - * @member type_ Type of the transport, as defined in the TransportType type in ETSI GS MEC 011 [17]i.0 - * @member protocol The name of the protocol used. Shall be set to "HTTP" for a REST API - * @member version The version of the protocol used - * @member security Information about the security used by the transport in ETSI GS MEC 011 [17]i.0 - * @member implSpecificInfo Additional implementation specific details of the transport - * @see ETSI GS MEC 010-2 Clause 6.2.1.19 Type: TransportDescriptor - */ - type record TransportDescriptor { - Json.String name, - Json.String description optional, - TransportType type_, - Json.String protocol, - Json.String version, - SecurityInfo security, - Json.String implSpecificInfo optional - } with { - variant (type_) "name as 'type'"; - } - - /** - * @desc This data type represents the information of user context transfer capability of application - * @member statefulApplication If the application is stateful, this attribute shall be set to true - * @member userContextTransferSupport This attribute shall be present if the application is stateful and shall be absent otherwise - * @see ETSI GS MEC 010-2 Clause 6.2.1.20 Type: UserContextTransferCapability - */ - type record UserContextTransferCapability { - Json.Bool statefulApplication, - Json.Bool userContextTransferSupport optional - } - - /** - * @desc This data type represents the network policy in the application instantiation and operation - * @member steeredNetwork This attribute provides an option for the application to specify a type of network to carry the application traffic - * @member steeredNetwork Provides an option for the application to specify a type of network to carry the application traffic - * @see ETSI GS MEC 010-2 Clause 6.2.1.21 Type: AppNetworkPolicy - */ - type record AppNetworkPolicy { - SteeredNetwork steeredNetwork - } - - /** - * @desc Provides an option for the application to specify a type of network to carry the application traffic - * @member cellularNetwork The application prefers to a cellular network to carry its traffic - * @member wi_fiNetwork The application prefers to a Wi-Fi network to carry its traffic - * @member fixedAccessNetwork The application prefers to a fixed access network to carry its traffic - * @see ETSI GS MEC 010-2 Clause 6.2.1.21 Type: AppNetworkPolicy - */ - type record SteeredNetwork { - Json.Bool cellularNetwork optional, - Json.Bool wi_fiNetwork optional, - Json.Bool fixedAccessNetwork optional - } with { - variant (wi_fiNetwork) "name as 'wi-fiNetwork'"; - } - - } // End of group application_descriptor_information_model - - group application_lifecycle_management_information_model { - - /** - * @desc The LocationConstraints data type supports the specification of MEC application requirements related to MEC application deployment location constraints - * @member countryCode The two-letter ISO 3166 [0] country code in capital letters - * @member civicAddressElement Zero or more elements comprising the civic address - * @member area Geographic area - * @see ETSI GS MEC 010-2 Clause 6.2.2.2 Type: LocationConstraints - */ - type record LocationConstraints { - Json.String countryCode optional, - CivicAddressElement civicAddressElement optional, - Polygon area optional - } - - type record CivicAddressElement { - integer caType, - Json.String caValue - } - - type record Geometry { - Json.String type_, - Coordinates coordinates - } with { - variant (type_) "name as 'type'"; - } - type record of Json.Number Coordinate; - type record of Coordinate Coordinates; - type record Property { - Json.String key, - Json.String value_ - } with { - variant (value_) "name as 'value'"; - } - type record of Property Properties; - type record Polygon { - Json.String type_, - Geometry geometry, - Properties properties, - Json.String this_ - } with { - variant (type_) "name as 'type'"; - variant (this_) "name as 'this'"; - } - - /** - * @desc The data type of CreateAppInstanceRequest represents the parameters for creating a new application instance resource - * @member appDId The application descriptor identifier - * @member appInstanceName Human-readable name of the application instance to be created - * @member appInstanceDescription Human-readable description of the application instance to be created - * @member appPlacementInfo Describes the information of selected MEC platform for the application instance to associate - * @see ETSI GS MEC 010-2 Clause 6.2.2.3 Type: CreateAppInstanceRequest - */ - type record CreateAppInstanceRequest { - Json.String appDId, - Json.String appInstanceName optional, - Json.String appInstanceDescription optional, - MepInformation appPlacementInfo optional - } - - /** - * @desc The data type of AppInstanceInfo represents the parameters of instantiated application instance resources - * @member id Identifier of the application instance represented by this data type - * @member appInstanceName Name of the application instance - * @member appInstanceDescription Human-readable description of the application instance to be created - * @member appDId The application descriptor identifier is managed by the application provider to identify the application descriptor in a globally unique way - * @member appProvider The onboarded application package provider name - * @member appName The onboarded application name - * @member appSoftVersion The application software version - * @member appDVersion Version of the application descriptor - * @member appPkgId Identifier of the onboarded application package - * @member vimConnectionInfo Information about VIM connections to be used for managing the resources for the application instance - * @member nsInstanceId Identifier of the NS instance created by NFVO in which the MEC application has been instantiated as a VNF instance - * @member vnfInstanceId Identifier of the VNF instance created by VNFM that the MEC application has been instantiated as - * @member instantiationState Instantiation state of the application instance - * @member instantiatedAppState Information specific to an instantiated application. This attribute shall be present if the instantiationState attribute value is INSTANTIATED - * @member instantiatedAppState Operational state is applicable in the instantiation state INSTANTIATED - * @member _links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.2.4 Type: AppInstanceInfo - */ - type record AppInstanceInfo { - Json.String id, - Json.String appInstanceName optional, - Json.String appInstanceDescription optional, - Json.String appDId, - Json.String appProvider, - Json.String appName, - Json.String appSoftVersion, - Json.String appDVersion, - Json.String appPkgId, - VimConnectionInfo vimConnectionInfo optional, - Json.String nsInstanceId optional, - Json.String vnfInstanceId optional, - InstantiationState instantiationState, - InstantiatedAppState instantiatedAppState optional, - CommunicationInterface communicationInterface optional, - Link links - } with { - variant (links) "name as '_links'"; - } - type record of AppInstanceInfo AppInstanceInfoList; - - type record Link { - LinkType self_, - LinkType instantiate optional, - LinkType terminate optional, - LinkType operate optional, - LinkType configure_platform_for_app optional - } with { - variant (self_) "name as 'self'"; - } - - type record InstantiatedAppState { - OperationalState operationalState optional, - LocationInformation appInstLocation optional - } - - type enumerated InstantiationState { - INSTANTIATED, - NOT_INSTANTIATED - } - - type enumerated OperationalState { - STARTED, - STOPPED - } - - /** - * @desc The data type of AppInstanceInfo represents the parameters of instantiated application instance resources - * @member appInstSelectorType - * @member appInstances - * @member appsFromProviders Match existing application instances, or those created in the future whilst the subscription is active, that belong to applications from certain providers - * @see ETSI GS MEC 010-2 Clause 6.2.2.5 Type: AppInstanceSubscriptionFilter - */ - type record AppInstanceSubscriptionFilter { - AppInstSelectorType appInstSelectorType, - AppInstances appInstances optional, - appsFromProviders appsFromProviders optional - } - - type enumerated AppInstSelectorType { - VOID (0), - APP_IDENTITY (1), - APP_NAME (2), - APP_D_ID (3), - APP_FROM_PROVIDER (4) - } with { - variant "JSON: as number" - } - - type record length(1..infinity) of Json.String AppInstances; - - /** - * @desc Match existing application instances, or those created in the future whilst the subscription is active, that belong to applications from certain providers - * @member appProvider Name of the application provider to match - * @member appProducts Match application instances that belong to application products with certain product names, from one particular provider - * @see ETSI GS MEC 010-2 Clause 6.2.2.5 Type: AppInstanceSubscriptionFilter - */ - type record AppsFromProvider { - Json.String appProvider, - AppProducts appProducts optional - } - - type record length(1..infinity) of AppsFromProvider appsFromProviders; - - type record AppProduct { - Json.String appName, - Versions versions optional - } - - type record length(1..infinity) of AppProduct AppProducts; - - type record Version { - Json.String appSoftVersion, - Json.String appDVersion optional - } - - type record length(1..infinity) of Version Versions; - - /** - * @desc This data type represents a subscription filter criteria to match an application LCM operation occurrence - * @member appInstanceSubscriptionFilter this attribute contains filter criteria that selects one or more application instances on which to receive "LCM operation occurrence" notifications - * @member notificationTypes Match particular notification types - * @member operationTypes Type of the LCM operation represented by this application instance LCM operation occurrence - * @member operationStates Type of the LCM operation state represented by this application instance LCM operation occurrence - * @see ETSI GS MEC 010-2 Clause 6.2.2.6 Type: AppLcmOpOccSubscriptionFilter - */ - type record AppLcmOpOccSubscriptionFilter { - AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, - Json.String notificationTypes optional, - OperationTypes operationTypes optional, - OperationStates operationStates optional - } - - type enumerated OperationType { - INSTANTIATE, - OPERATE, - TERMINATE, - INVALID_OPERATE // For BI purpose only - } - - type record length(1..infinity) of OperationType OperationTypes; - - type enumerated OperationState { - STARTING, - PROCESSING, - COMPLETED, - FAILED, - FAILED_TEMP - } - - type record length(1..infinity) of OperationState OperationStates; - - /** - * @desc This data type represents request parameters of the "Instantiate Application" operation - * @member virtualComputeDescriptor Describes CPU and memory requirements, as well as optional additional requirements, such as disk and acceleration related capabilities, of the virtualisatio n container used to realize the application instance to be created - * @member virtualStorageDescriptor Defines descriptors of virtual storage resources to be used by the application instance to be created - * @member selectedMECHostInfo Describes the information of selected host for the application instance - * @member locationConstraints Defines the location constraints for the application instance to be created - * @member vimConnectionInfo Information about VIM connections to be used for managing the resources for the application instance, or refer to external/externally-managed virtual links - * @member appTermCandsForCoord Provides sets of applications as termination candidate alternatives that the MEO/MEAO shall select from when utilizing the coordinate LCM operation exchange - * @see ETSI GS MEC 010-2 Clause 6.2.2.7 Type: InstantiateAppRequest - */ - type record InstantiateAppRequest { - VirtualComputeDescriptor virtualComputeDescriptor optional, - VirtualStorageDescriptor virtualStorageDescriptor optional, - MECHostInformation selectedMECHostInfo, - LocationConstraints locationConstraints optional, - VimConnectionInfo vimConnectionInfo optional, - AppTermCandsForCoord appTermCandsForCoord optional - } - - /** - * @desc This data type represents request parameters of the "Operate Application" operation - * @member changeStateTo The desired operational state - * @member stopType The stop type - * @member gracefulStopTimeout The time interval (in seconds) to wait for the application instance to be taken out of service during graceful stop, before stopping the application - * @see ETSI GS MEC 010-2 Clause 6.2.2.8 Type: OperateAppRequest - */ - type record OperateAppRequest { - OperationalState changeStateTo, - StopType stopType optional, - Json.UInteger gracefulStopTimeout optional - } - - type enumerated StopType { - FORCEFUL, - GRACEFUL - } - - /** - * @desc This data type represents request parameters of the "Terminate Application Request" operation - * @member terminationType Indicates whether forceful or graceful termination is requested - * @member gracefulTerminationTimeout This attribute is only applicable in case of graceful termination - * @see ETSI GS MEC 010-2 Clause 6.2.2.9 Type: TerminateAppRequest - */ - type record TerminateAppRequest { - TerminationType terminationType, - Json.UInteger gracefulTerminationTimeout optional - } - - type StopType TerminationType; - - /** - * @desc The data type represents a subscription to notification of application instance operational state change - * @member id Identifier of the subscription to application instance operational state change notification - * @member subscriptionType Shall be set to "AppInstanceStateChangeSubscription" - * @member appInstanceState Application instance state subscribed to - * @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.2.10 Type: AppInstSubscriptionInfo - */ - type record AppInstSubscriptionInfo { - Json.String id, - Json.String subscriptionType, - AppInstanceState appInstanceState optional, - AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, - Json.AnyURI callbackUri, - AppInstSubscriptionInfo_Link links - } with { - variant (links) "name as '_links'"; - } - - type enumerated AppInstanceState { - NOT_INSTANTIATED, - STARTED, - STOPPED - } - - type record AppInstSubscriptionInfo_Link { - LinkType self_ - } with { - variant (self_) "name as 'self'"; - } - - /** - * @desc This data type represents an application instance notification for informing the subscribers about operational state of application instance resources - * @member id Identifier of this notification - * @member notificationType Discriminator for the different notification types - * @member appInstanceState Application instance state - * @member subscriptionId Identifier of the subscription related to this notification - * @member timeStamp Date and time of the notification generation - * @member appInstanceId Identifier of application instance - * @member appPkgId Identifier of the onboarded application package - * @member appDId The application descriptor identifier identifies the application package and the application descriptor in a globally unique way - * @member appInstLocation Location of the MEC application instance - * @member links A link to the related subscription - * @see ETSI GS MEC 010-2 Clause 6.2.2.11 Type: AppInstNotification - */ - type record AppInstNotification { - Json.String id, - NotificationType notificationType, - AppInstanceState appInstanceState optional, - Json.String subscriptionId, - TimeStamp timeStamp, - Json.String appInstanceId, - Json.String appPkgId, - Json.String appDId, - LocationInformation appInstLocation optional, - AppInstNotification_Links links - } with { - variant (links) "name as '_links'"; - } - - type record AppInstNotification_Links { - LinkType subscription - } - - /** - * @desc The data type represents the input parameters of "subscription operation" to notification of application lifecycle management for the operational state change of application instance - * @member subscriptionType Shall be set to "AppInstanceStateChangeSubscription" - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member appInstanceState Only send notifications for application instances that are in one of the states listed in this attribute - * @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription - * @see ETSI GS MEC 010-2 Clause 6.2.2.12 Type: AppInstSubscriptionRequest - */ - type record AppInstSubscriptionRequest { - Json.String subscriptionType, - Json.AnyURI callbackUri, - AppInstanceState appInstanceState optional, - AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional - } - - /** - * @desc This data type represents an application lifecycle management operation occurrence - * @member id Identifier of the subscription to application LCM operation occurrence notification - * @member operationState Operation state - * @member stateEnteredTime Date and time when the current state was entered - * @member startTime Date and time of the start of the operation - * @member lcmOperationType of the actual LCM operation represented by this application instance LCM operation occurrence - * @member operationParams Input parameters of the LCM operation - * @member isCancelPending If the application LCM operation occurrence operationState is in "PROCESSING" state and the operation is being cancelled, this attribute shall be set to true - * @member cancelMode The mode of an cancellation - * @member links Link to the application instance that the operation applies to - * @see ETSI GS MEC 010-2 Clause 6.2.2.13 Type: AppLcmOpOcc - */ - type record AppLcmOpOcc { - Json.String id, - OperationState operationState, - TimeStamp stateEnteredTime, - TimeStamp startTime, - LcmOperation lcmOperation, - OperationParams operationParams optional, - Json.Bool isCancelPending optional, - CancelMode cancelMode optional, - AppLcmOpOcc_Link links - } with { - variant (links) "name as '_links'"; - } - - type OperationType LcmOperation; - - type union OperationParams { - InstantiateAppRequest instantiateAppRequest, - OperateAppRequest operateAppRequest, - TerminateAppRequest terminateAppRequest - } - - type record AppLcmOpOcc_Link { - LinkType self_, - LinkType appInstance - } with { - variant (self_) "name as 'self'"; - } - - /** - * @desc This data type represents a subscription request to notification of application life cycle management operation occurrence - * @member subscriptionType Shall be set to "AppLcmOpOccStateChangeSubscription" - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member appLcmOpOccSubscriptionFilter Subscription filter criteria to match specific application LCM operation occurrences - * @see ETSI GS MEC 010-2 Clause 6.2.2.14 Type: AppLcmOpOccSubscriptionRequest - */ - type record AppLcmOpOccSubscriptionRequest { - Json.String subscriptionType, - Json.AnyURI callbackUri, - AppLcmOpOccSubscriptionFilter appLcmOpOccSubscriptionFilter optional - } - - /** - * @desc This data type represents a subscription to notifications of application life cycle management operation occurrence - * @member id Identifier of this subscription resource - * @member subscriptionType Shall be set to "AppLcmOpOccStateChangeSubscription" - * @member appLcmOpOccSubscriptionFilter Criteria used to select application LCM operation occurrences on which to send notifications related to this subscription - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.2.15 Type: AppLcmOpOccSubscriptionInfo - */ - type record AppLcmOpOccSubscriptionInfo { - Json.String id, - Json.String subscriptionType, - Json.AnyURI callbackUri, - AppLcmOpOccSubscriptionFilter appLcmOpOccSubscriptionFilter optional, - AppLcmOpOccSubscriptionInfo_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppLcmOpOccSubscriptionInfo_Link { - LinkType self_ - } with { - variant (self_) "name as 'self'"; - } - - /** - * @desc This data type represents a notification related to state changes of an application LCM operation occurrence which informs the subscribers - * @member id Identifier of this notification - * @member notificationType Discriminator for the different notification types - * @member operationType Discriminator for the different notification types - * @member operationState Operation state - * @member subscriptionId Identifier of the subscription to this notification - * @member timeStamp Date and time of the notification generation - * @member appLcmOpOccId Identifier of application lifecycle management operation occurrence - * @member appInstanceId Identifier of application instance - * @member links Links to resources related to this notification - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.2.16 Type: AppLcmOpOccNotification - */ - type record AppLcmOpOccNotification { - Json.String id, - NotificationType notificationType, - OperationType operationType, - OperationState operationState, - Json.String subscriptionId, - TimeStamp timeStamp, - Json.String appInstanceId, - AppLcmOpOccNotification_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppLcmOpOccNotification_Link { - LinkType appInstance, - LinkType subscription, - LinkType appLcmOpOcc - } - - /** - * @desc The data type represents the parameters of MEC host information - * @member hostName Human-readable name of MEC host - * @member hostId KeyValuePairs - * @see ETSI GS MEC 010-2 Clause 6.2.2.17 Type: MECHostInformation - */ - type record MECHostInformation { - Json.String hostName optional, - KeyValuePairs hostId - } - - /** - * @desc The VimConnectionInfo data type specifies the connection information of VIM for managing the resources of the application instance - * @member id The identifier of the VIM Connection - * @member vimId The identifier of the VIM instance - * @member vimType Discriminator for the different types of the VIM information - * @member interfaceInfo Information about the interface or interfaces to the VIM, if applicable, such as the URI of an interface endpoint to communicate with the VIM - * @member accessInfo Authentication credentials for accessing the VIM, and other access-related information such as tenants or infrastructure resource groups - * @member extra VIM type specific additional information - * @see ETSI GS MEC 010-2 Clause 6.2.2.18 Type: VimConnectionInfo - */ - type record VimConnectionInfo { - Json.String id, - Json.String vimId optional, - Json.String vimType, - KeyValuePairs interfaceInfo optional, - KeyValuePairs accessInfo optional, - KeyValuePairs extra optional - } - - /** - * @desc The data type represents a subscription link list of notification on application lifecycle management - * @member links List of hyperlinks related to the resource - * @see ETSI GS MEC 010-2 Clause 6.2.2.19 Type: AppInstanceSubscriptionLinkList - */ - type record SubscriptionLinkList { - SubscriptionLinkList_Link links - } with { - variant (links) "name as '_links'"; - } - - type record SubscriptionLinkList_Link { - LinkType self_, - SubscriptionLinkList_Link_Subscriptions subscriptions optional - } with { - variant (self_) "name as 'self'"; - } - - type record SubscriptionLinkList_Link_Subscription { - Json.AnyURI href, - AppInstanceSubscriptionType subscriptionType - } - - type record length(1..infinity) of SubscriptionLinkList_Link_Subscription SubscriptionLinkList_Link_Subscriptions; - - /** - * @desc String representing the type of a subscription - * @see ETSI GS MEC 010-2 Clause 6.2.2.20.2 Simple data types - */ - type Json.String AppInstanceSubscriptionType; - - /** - * @desc This data type represents the parameters for configuring the MEP to run an application instance - * @member appServiceRequired Describes services a MEC application requires to run - * @member appServiceOptional Describes services a MEC application may use if available - * @member appServiceProduced Describes services a MEC application is able to produce to the platform or other MEC applications - * @member appFeatureRequired Describes features a MEC application requires to run - * @member transportDependencies Transports, if any, that this application requires to be provided by the platform - * @member appTrafficRule Describes traffic rules the MEC application requires - * @member appDNSRule Describes DNS rules the MEC application requires - * @member appLatency Describes the maximum latency tolerated by the MEC application - * @member userContextTransferCapability If the application supports the user context transfer capability, this attribute shall be included - * @member appNetworkPolicy If present, it represents the application network policy of carrying the application traffic - * @see ETSI GS MEC 010-2 Clause 6.2.2.21 Type: ConfigPlatformForAppRequest - */ - type record ConfigPlatformForAppRequest { - ServiceDependency appServiceRequired optional, - ServiceDependency appServiceOptional optional, - ServiceDependency appServiceProduced optional, - FeatureDependency appFeatureRequired optional, - FeatureDependency appFeatureOptional optional, - TransportDependency transportDependencies optional, - TrafficRuleDescriptor appTrafficRule optional, - DNSRuleDescriptor appDNSRule optional, - LatencyDescriptor appLatency optional, - UserContextTransferCapability userContextTransferCapability optional, - AppNetworkPolicy appNetworkPolicy optional - } - - /** - * @desc The data type represents the parameters of MEC platform information - * @member mepName Human-readable name of MEC platform - * @member mepId Deployment-specific identifier of MEC platform - * @see ETSI GS MEC 010-2 Clause 6.2.2.22 Type: MepInformation - */ - type record MepInformation { - Json.String mepName optional, - Json.String mepId optional - } - - /** - * @desc The AppTermCandsForCoord data type represents the parameters to provide candidates of applications to terminate in pre-emption situations for LCM coordination exchanges - * @member terminationOptions Sets of application options for the MEO/MEAO to select from as candidates for termination - * @see ETSI GS MEC 010-2 Clause 6.2.2.23 Type: AppTermCandsForCoord - */ - type record AppTermCandsForCoord { - TerminationOptions terminationOptions - } - - type record TerminationOption { - AppInstIdTerminationCands appInstIdTerminationCands - } - - type record length(1..infinity) of Json.String AppInstIdTerminationCands; - - type record length(1..infinity) of TerminationOption TerminationOptions; - - /** - * @desc The data type represents the input parameters of "subscription operation" to notification of application instance identifier creation - * @member subscriptionType Shall be set to "AppIdentifierCreationSubscription" - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription - * @see ETSI GS MEC 010-2 Clause 6.2.2.25 Type: AppInstIdCreationSubscriptionRequest - */ - type record AppInstIdCreationSubscriptionRequest { - Json.String subscriptionType, - Json.AnyURI callbackUri, - AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional - } - - /** - * @desc The data type represents a subscription to notification of application instance identifier creation - * @member id Identifier of the subscription to application instance operational state change notification - * @member subscriptionType Shall be set to "AppIdentifierCreationSubscription" - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.2.26 Type: AppInstIdCreationSubscriptionInfo - */ - type record AppInstIdCreationSubscriptionInfo { - Json.String id, - Json.String subscriptionType, - Json.AnyURI callbackUri, - AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, - AppInstIdCreationSubscriptionInfo_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppInstIdCreationSubscriptionInfo_Link { - LinkType self_ - } with { - variant (self_) "name as 'self'"; - } - - /** - * @desc This data type represents a notification for informing the subscribers about the creation of a new "individual application instance" resource and the associated application instance identifier - * @member id Identifier of this notification - * @member notificationType Discriminator for the different notification types - * @member subscriptionId Identifier of the subscription related to this notification - * @member timeStamp Date and time of the notification generation - * @member appInstanceId The created application instance Identifier - * @member links Links to resources related to this notification - * @see ETSI GS MEC 010-2 Clause 6.2.2.27 Type: AppInstanceIdentifierCreationNotification - */ - type record AppInstanceIdentifierCreationNotification { - Json.String id, - NotificationType notificationType, - TimeStamp timeStamp, - Json.String appInstanceId, - AppInstanceIdentifierCreationNotification_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppInstanceIdentifierCreationNotification_Link { - LinkType subscription, - LinkType appInstance - } - - /** - * @desc The data type represents the input parameters of "subscription operation" to notification of application instance identifier deletion - * @member subscriptionType Shall be set to "AppIdentifierDeletionSubscription" - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription - * @see ETSI GS MEC 010-2 Clause 6.2.2.28 Type: AppInstIdDeletionSubscriptionRequest - */ - type record AppInstIdDeletionSubscriptionRequest { - Json.String subscriptionType, - Json.AnyURI callbackUri, - AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional - } - - /** - * @desc The data type represents a subscription to notification of application instance identifier deletion - * @member id Identifier of the subscription to application instance operational state change notification - * @member subscriptionType Shall be set to "AppIdentifierDeletionSubscription" - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.2.29 Type: AppInstIdDeletionSubscriptionInfo - */ - type record AppInstIdDeletionSubscriptionInfo { - Json.String id, - Json.String subscriptionType, - Json.AnyURI callbackUri, - AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, - AppInstIdDeletionSubscriptionInfo_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppInstIdDeletionSubscriptionInfo_Link { - LinkType self_ - } with { - variant (self_) "name as 'self'"; - } - - /** - * @desc This data type represents a notification for informing the subscribers about the deletion of an "individual application instance" resource and the associated application instance identifier - * @member id Identifier of this notification - * @member notificationType Discriminator for the different notification types - * @member subscriptionId Identifier of the subscription related to this notification - * @member timeStamp Date and time of the notification generation - * @member appInstanceId The deleted application instance Identifier - * @member links Links to resources related to this notification - * @see ETSI GS MEC 010-2 Clause 6.2.2.30 Type: AppInstanceIdentifierDeletionNotification - */ - type record AppInstanceIdentifierDeletionNotification { - Json.String id, - NotificationType notificationType, - Json.String subscriptionId, - TimeStamp timeStamp, - Json.String appInstanceId, - AppInstanceIdentifierDeletionNotification_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppInstanceIdentifierDeletionNotification_Link { - LinkType subscription, - LinkType appInstance - } - - /** - * @desc The LocationInformation data type represents the location information of the site hosting the MEC application instance - * @member countryCode The two-letter ISO 3166 [3] country code in capital letters where an instance is deployed - * @member civicAddress Provides the civic address of the site hosting the MEC application instance - * @member Geographical position (i.e. latitude and longitude) where an instance is deployed - * @see ETSI GS MEC 010-2 Clause 6.2.2.31 Type: LocationInformation - */ - type record LocationInformation { - Json.String countryCode, - CivicAddressElement civicAddress optional, - Json.String geographicalPosition optional - } - - /** - * @desc This data type represents the valid modes of cancelling an application LCM operation - * @see ETSI GS MEC 010-2 Clause 6.2.2.32 Type: CancelMode - */ - type StopType CancelMode; - - } // End of group application_lifecycle_management_information_model - - group application_package_information_model { - - /** - * @desc The data type CreateAppPkg represents the parameters for creating a new application package resource - * @member appPkgName Name of the application package to be onboarded - * @member appPkgVersion Version of the application package to be onboarded - * @member appProvider The provider's name of the application package to be onboarded - * @member checksum Checksum of the onboarded application package - * @member userDefinedData User defined data for the application package - * @member appPkgPath Address information of the application package - * @see ETSI GS MEC 010-2 Clause 6.2.3.2 Type: CreateAppPkg - */ - type record CreateAppPkg { - Json.String appPkgName, - Json.String appPkgVersion, - Json.String appProvider optional, - Checksum checksum, - KeyValuePairs userDefinedData optional, - Json.AnyURI appPkgPath - } - - /** - * @desc The data type AppPkgInfo represents the parameters for an application package resource - * @member id Identifier of the application package resource - * @member appDId The application descriptor identifier - * @member appProvider The provider's name of the onboarded application package - * @member appName Name of the onboarded application - * @member appSoftwareVersion Software version of the application. This is updated when there is any change to the software in the onboarded application package - * @member appDVersion Version of the application descriptor - * @member checksum Checksum of the onboarded application package - * @member signingCertificate The singleton signing certificate if it is included as a file in the AppD archive - * @member softwareImages Information of application software image in application package - * @member additionalArtifacts Additional information of application package artifacts that are not application software images - * @member onboardingState Onboarding state of application package - * @member operationalState Operational state of the onboarded application package - * @member usageState Usage state of the onboarded instance of the application package - * @member mecInfo The MEC version that compatible with this application - * @member userDefinedData User defined data for the application package - * @member onboardingFailureDetails Failure details of current onboarding procedure - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.3.3 Type: AppPkgInfo - */ - type record AppPkgInfo { - Json.String id, - Json.String appDId, - Json.String appProvider optional, - Json.String appName, - Json.String appSoftwareVersion, - Json.String appDVersion, - Checksum checksum, - Json.String signingCertificate optional, - AppPkgSWImageInfo softwareImages, - AppPkgArtifactInfo additionalArtifacts optional, - OnboardingState onboardingState, - AppPkgInfo_OperationalState operationalState, - UsageState usageState, - AppPkgInfo_MecInfo mecInfo, - KeyValuePairs userDefinedData optional, - ProblemDetails onboardingFailureDetails optional, - AppPkgInfo_Links links - } with { - variant (links) "name as '_links'"; - } - type record of AppPkgInfo AppPkgInfoList; - - type record AppPkgSWImageInfo_ { - // FIXME The data type of application software image information data model is related to virtualisation method and needs for further study - } - type record length(1..infinity) of AppPkgSWImageInfo_ AppPkgSWImageInfo; - type record AppPkgArtifactInfo { - // FIXME The data type of additional information of application package artifacts is not specified in the present document - } - - type enumerated OnboardingState { - CREATED, - UPLOADING, - PROCESSING, - ONBOARDED - } - - type enumerated AppPkgInfo_OperationalState { - ENABLED, - DISABLED, - UNKNOWN // Used for BI purpose only - } - - type enumerated UsageState { - IN_USE, - NOT_IN_USE - } - - type record length(1..infinity) of Json.String AppPkgInfo_MecInfo; - - type record AppPkgInfo_Links { - LinkType self_, - LinkType appD, - LinkType appPkgContent, - LinkType vnfPkgInfo optional - } with { - variant (self_) "name as 'self'"; - } - - /** - * @desc The data type represents a subscription to notification of application package management for the onboarding, or operational state change of application package - * @member id Identifier of the subscription to application package notification - * @member subscriptionType Type of subscription - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.3.4 Type: AppPkgSubscriptionInfo - */ - type record AppPkgSubscriptionInfo { - Json.String id, - AppPkgSubscriptionType subscriptionType, - Json.AnyURI callbackUri, - AppPkgSubscriptionInfo_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppPkgSubscriptionInfo_Link { - LinkType self_ - } with { - variant (self_) "name as 'self'" - } - - /** - * @desc The data type represents a subscription link list of notification on application package management - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.3.5 Type: AppPkgSubscriptionLinkList - */ - type record AppPkgSubscriptionLinkList { - AppPkgSubscriptionLinkList_Link links - } with { - variant (links) "name as '_links'"; - } - - /** - * @desc Links to resources related to this resource - * @member self_ URI of this resource - * @member subscriptions A link list to the subscriptions to an application package - * @see ETSI GS MEC 010-2 Clause 6.2.3.5 Type: AppPkgSubscriptionLinkList - */ - type record AppPkgSubscriptionLinkList_Link { - LinkType self_, - AppPkgSubscriptionLinkList_Link_Subscriptions subscriptions optional - } with { - variant (self_) "name as 'self'"; - } - - type record AppPkgSubscriptionLinkList_Link_Subscription { - Json.AnyURI href, - AppPkgSubscriptionType subscriptionType - } - - type record length(1..infinity) of AppPkgSubscriptionLinkList_Link_Subscription AppPkgSubscriptionLinkList_Link_Subscriptions; - - /** - * @desc This data type represents an application package management notification for informing the subscribers about onboarding application package resources - * @member id Identifier of this notification - * @member notificationType Discriminator for the different notification types - * @member subscriptionId Identifier of the subscription to this notification - * @member timeStamp Date and time of the notification generation - * @member appPkgId Identifier of the onboarded application package - * @member appDId The application descriptor identifier identifies the application package and the application descriptor in a globally unique way - * @member operationalState Operational state of the application package - * @member linksLinks to resources related to this notification - * @see ETSI GS MEC 010-2 Clause 6.2.3.6 Type: AppPkgNotification - */ - type record AppPkgNotification { - Json.String id, - Json.String notificationType, - Json.String subscriptionId, - TimeStamp timeStamp, - Json.String appPkgId, - Json.String appDId, - AppPkgInfo_OperationalState operationalState, - AppPkgNotification_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppPkgNotification_Link { - LinkType subscription - } - - /** - * @desc The data type represents the input parameters of "subscription operation" to notification of application package management for the onboarding, or operational state change of application package - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member subscriptionType Type of the subscription - * @member appPkgFilter The attribute-based filter is to filter application packages on which the query applies - * @see ETSI GS MEC 010-2 Clause 6.2.3.7 Type: AppPkgSubscription - */ - type record AppPkgSubscription { - Json.AnyURI callbackUri, - AppPkgSubscriptionType subscriptionType, - AppPkgFilter appPkgFilter optional - } - - /** - * @desc The data type represents modifications of the "AppPkgInfo" data type that can be requested to perform "application package operation" - * @member New value of the "operationalState" attribute of the "OnboardedAppPkgInfo" structure - * @see ETSI GS MEC 010-2 Clause 6.2.3.8 Type: AppPkgInfoModifications - */ - type record AppPkgInfoModifications { - AppPkgInfo_OperationalState operationalState - } - - /** - * @desc String representing the type of a subscription - * @see ETSI GS MEC 010-2 Clause 6.2.3.9.2 Simple data types - */ - type Json.String AppPkgSubscriptionType; - - /** - * @desc This data type represents subscription filter criteria to match application package - * @member appPkgInfoId Match the application package identifier which is allocated by the MEO - * @member appDId Match the application descriptor identifier which is allocated by the application provider - * @member appProvider Match the provider's name of the onboarded application - * @member appName Match the name of the onboarded application - * @member appSoftwareVersion Match the software version of the application package - * @member appDVersion Match the version of the application descriptor - * @member operationalState Match particular operational state of the application package - * @member usageState Match particular usage state of the application package - * @see ETSI GS MEC 010-2 Clause 6.2.3.10 Type: AppPkgFilter - */ - type record AppPkgFilter { - Json.String appPkgInfoId optional, - Json.String appDId optional, - Json.String appProvider optional, - Json.String appName optional, - Json.String appSoftwareVersion optional, - Json.String appDVersion optional, - AppPkgInfo_OperationalState operationalState optional, - UsageState usageState optional - } - - } // End of group application_package_information_model - - group granting_information_model { - - /** - * @desc This type represents a grant request - * @member appInstanceId Identifier of the application instance which this grant request is related to - * @member appLcmOpOccId The identifier of the application lifecycle management operation occurrence associated to the GrantRequest - * @member appDId Identifier of the AppD that defines the application for which the LCM operation is to be granted - * @member operation The lifecycle management operation for which granting is requested - * @member addResources List of resource definitions in the AppD for resources to be added by the LCM operation which is related to this grant request, with one entry per resource - * @member tempResources List of resource definitions in the AppD for resources to be temporarily instantiated during the runtime of the LCM operation which is related to this grant request - * @member removeResources Removed by the LCM operation which is related to this grant request, with one entry per resource - * @member updateResources Provides the definitions of resources to be modified by the LCM operation which is related to this grant request, with one entry per resource - * @member additionalParams MEPM, specific to the application and the LCM operation - * @member links Links to resources related to this request - * @see ETSI GS MEC 010-2 Clause 6.2.4 Granting information model - */ - type record GrantRequest { - Json.String appInstanceId, - Json.String appLcmOpOccId, - Json.String appDId, - OperationType operation, - ResourceDefinition addResources optional, - ResourceDefinition tempResources optional, - ResourceDefinition updateResources optional, - KeyValuePairs additionalParams optional, - GrantRequest_Link links - } with { - variant (links) "name as '_links'"; - } - - type record GrantRequest_Link { - LinkType appLcmOpOcc, - LinkType appInstance - } - - /** - * @desc This type provides information of an existing or proposed resource used by the application - * @member id Identifier of this "ResourceDefinition" structure, unique at least within the scope of the "GrantRequest" structure - * @member type_ Type of the resource definition referenced - * @member vduId Reference to the related VDU in the AppD applicable to this resource - * @member resourceTemplateId Reference to a resource template, i.e. VirtualComputeDescriptor, AppExtCpd, VirtualStorageDescriptor in the AppD - * @member resource Resource information for an existing resource - * @see ETSI GS MEC 010-2 Clause 6.2.4.3 Type: ResourceDefinition - */ - type record ResourceDefinition { - Json.String id, - ResourceDefinition_Type type_, - Json.String vduId optional, - Json.String resourceTemplateId, - ResourceDefinition_Resource resource - } - - type enumerated ResourceDefinition_Type { - COMPUTE, - VL, - STORAGE, - LINKPORT - } - - type record ResourceDefinition_Resource { - VimConnectionInfo vimConnectionInfo, - Json.String resourceId - } - - /** - * @desc This type represents a grant - * @member id Identifier of the Grant - * @member appInstanceId Identifier of the application instance which this Grant is related to - * @member appLcmOpOccId The identifier of the application lifecycle management operation occurrence associated to the Grant - * @member vimConnections Provides information regarding VIM connections that are approved to be used by the MEPM to allocate resources, and provides parameters of these VIM connections - * @member zones Identifies resource zones where the resources are approved to be allocated by the MEPM - * @member zoneGroups Information about groups of resource zones that are related and that the MEO has chosen to fulfil a zoneGroup constraint in the Grant request - * @member addResources List of resources that are approved to be added, with one entry per resource - * @member tempResources List of resources that are approved to be temporarily instantiated during the runtime of the lifecycle operation, with one entry per resource - * @member removeResources List of resources that are approved to be removed, with one entry per resource - * @member updateResources List of resources that are approved to be modified, with one entry per resource - * @member vimAssets Information about assets for the application that are managed by the MEO in the VIM, such as software images - * @member extVirtualLinks Information about external VLs to connect the application instance to - * @member MEPM, specific to the application and the LCM operation - * @member links Links to resources related to this request - * @see ETSI GS MEC 010-2 Clause 6.2.4.4 Type: Grant - */ - type record Grant { - Json.String id, - Json.String appInstanceId, - Json.String appLcmOpOccId, - VimConnectionInfo vimConnections optional, - ZoneInfo zones optional, - ZoneGroupInfo zoneGroups optional, - GrantInfo addResources optional, - GrantInfo tempResources optional, - GrantInfo removeResources optional, - GrantInfo updateResources optional, - VimAssets vimAssets optional, - ExtVirtualLinkData extVirtualLinks optional, - KeyValuePairs additionalParams optional, - Grant_Link links - } with { - variant (links) "name as '_links'"; - } - - type record VimAssets { - VimSoftwareImage softwareImages optional - } - - type record Grant_Link { - LinkType appLcmOpOcc, - LinkType appInstance - } - - /** - * @desc This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted - * @member resourceDefinitionId Identifier of the related "ResourceDefinition" structure from the related "GrantRequest" structure - * @member vimConnectionId Identifier of the VIM connection to be used to manage this resource - * @member zoneId Reference to the identifier of the "ZoneInfo" structure in the "Grant" structure defining the resource zone into which this resource is to be placed - * @member resourceGroupId Identifier of the "infrastructure resource group", logical grouping of virtual resources assigned to a tenant within an Infrastructure Domain, to be provided when allocating the resource - * @see ETSI GS MEC 010-2 Clause 6.2.4.5 Type: GrantInfo - */ - type record GrantInfo { - Json.String resourceDefinitionId, - Json.String vimConnectionId optional, - Json.String zoneId optional, - Json.String resourceGroupId optional - } - - /** - * @desc This type provides information regarding a resource zone - * @member id The identifier of this ZoneInfo instance, for the purpose of referencing it from other structures in the "Grant" structure - * @member zoneId The identifier of the resource zone, as managed by the resource management layer (typically, the VIM) - * @member vimConnectionId Identifier of the connection to the VIM that manages the resource zone - * @see ETSI GS MEC 010-2 Clause 6.2.4.6 Type: ZoneInfo - */ - type record ZoneInfo { - Json.String id, - Json.String zoneId, - Json.String vimConnectionId optional - } - - /** - * @desc This type provides information regarding a resource zone group - * @member zoneId References of identifiers of "ZoneInfo" structures, each of which provides information about a resource zone that belongs to this group - * @see ETSI GS MEC 010-2 Clause 6.2.4.7 Type: ZoneGroupInfo - */ - type record ZoneGroupInfo { - ZoneIds zoneId - } - - type record length(1..infinity) of Json.String ZoneIds; - - /** - * @desc This type represents an external VL - * @member id The identifier of the external VL instance - * @member vimConnectionId Identifier of the VIM connection to manage this resource - * @member resourceId The identifier of the resource in the scope of the VIM - * @member extCps External CPs of the application instance to be connected to this external VL - * @member extLinkPorts Externally provided link ports to be used to connect external connection points to this external VL - * @see ETSI GS MEC 010-2 Clause 6.2.4.8 Type: ExtVirtualLinkData - */ - type record ExtVirtualLinkData { - Json.String id, - Json.String vimConnectionId optional, - Json.String resourceId, - AppExtCpData extCps, - ExtLinkPortData extLinkPorts optional - } - - /** - * @desc This type represents an externally provided link port to be used to connect an external connection point to an external VL - * @member id Identifier of this link port as provided by the entity that has created the link port - * @member resourceHandleReference to the virtualised resource realizing this link port - * @see ETSI GS MEC 010-2 Clause 6.2.4.9 Type: ExtLinkPortData - */ - type record ExtLinkPortData { - Json.String id, - ResourceHandle resourceHandle - } - - /** - * @desc This type represents the information that allows addressing a virtualised resource that is used by an application instance - * @member vimConnectionId Identifier of the VIM connection to manage the resource - * @member resourceId Identifier of the resource in the scope of the VIM - * @member vimLevelResourceType Type of the resource in the scope of the VIM - * @see ETSI GS MEC 010-2 Clause 6.2.4.10 Type: ResourceHandle - */ - type record ResourceHandle { - Json.String vimConnectionId optional, - Json.String resourceId, - Json.String vimLevelResourceType optional - } - - /** - * @desc This type contains a mapping between a software image definition in the AppD and the corresponding software image managed by the MEO in the VIM which is needed during compute resource instantiation - * @member vimConnectionId Identifier of the VIM connection to access the software image referenced in this structure - * @member appDSoftwareImageId Identifier which references the software image descriptor in the AppD - * @member vimSoftwareImageId Identifier of the software image in the resource management layer (i.e. VIM) - * @see ETSI GS MEC 010-2 Clause 6.2.4.11 Type: VimSoftwareImage - */ - type record VimSoftwareImage { - Json.String vimConnectionId optional, - Json.String appDSoftwareImageId, - Json.String vimSoftwareImageId - } - - /** - * @desc This type represents configuration information for external CPs created from a CPD - * @member cpdId The identifier of the CPD in the AppD - * @member cpConfig List of instance data that need to be configured on the CP instances created from the respective CPD - * @see ETSI GS MEC 010-2 Clause 6.2.4.12 Type: AppExtCpData - */ - type record AppExtCpData_ { - Json.String cpdId, - AppExtCpConfig cpConfig - } - - type record length(1..infinity) of AppExtCpData_ AppExtCpData; - - /** - * @desc This type represents an externally provided link port or network address information per instance of an external connection point - * @member cpInstanceId Identifier of the external CP instance to which this set of configuration parameters is requested to be applied - * @member linkPortId Identifier of a pre-configured link port to which the external CP will be associated - * @member cpProtocolData Parameters for configuring the network protocols on the link port that connects the CP to a VL - * @see ETSI GS MEC 010-2 Clause 6.2.4.13 Type: AppExtCpConfig - */ - type record AppExtCpConfig_ { - Json.String cpInstanceId optional, - Json.String linkPortId optional, - CpProtocolData cpProtocolData optional - } - - type record length(1..infinity) of AppExtCpConfig_ AppExtCpConfig; - - /** - * @desc This type represents network protocol data - * @member layerProtocol Identifier of layer(s) and protocol(s) - * @member ipOverEthernet Network address data for IP over Ethernet to assign to the extCP instance - * @see ETSI GS MEC 010-2 Clause 6.2.4.14 Type: CpProtocolData - */ - type record CpProtocolData_ { - LayerProtocol layerProtocol, - IpOverEthernetAddressData ipOverEthernet optional - } - - type record length(1..infinity) of CpProtocolData_ CpProtocolData; - - type enumerated LayerProtocol { - IP_OVER_ETHERNET - } - - /** - * @desc This type represents network address data for IP over Ethernet - * @member macAddress MAC address - * @member ipAddresses List of IP addresses to assign to the CP instance - * @see ETSI GS MEC 010-2 Clause 6.2.4.15 Type: IpOverEthernetAddressData - */ - type record IpOverEthernetAddressData { - Json.String macAddress optional, - IpAddresses ipAddresses optional - } - - /** - * @desc IP addresses to assign to the CP instance - * @member type_ The type of the IP addresses - * @member fixedAddresses Fixed addresses to assign (from the subnet defined by "subnetId" if provided) - * @member numDynamicAddresses Number of dynamic addresses to assign (from the subnet defined by "subnetId" if provided) - * @member addressRange An IP address range to be used, e.g. in case of egress connections - * @see ETSI GS MEC 010-2 Clause 6.2.4.15 Type: IpOverEthernetAddressData - */ - type record IpAddress { - IpAddressType type_, - FixedAddresses fixedAddresses optional, - integer numDynamicAddresses optional, - AddressRange addressRange optional - } - - type record length(1..infinity) of IpAddress IpAddresses; - - type enumerated IpAddressType { - IPV4, - IPV6 - } - - type record length(1..infinity) of Json.String FixedAddresses; - - type record AddressRange { - Json.String minAddress, - Json.String maxAddress, - Json.String subnetId optional - } - - } // End of group granting_information_model - - group common_information_model { - - /** - * @desc This data type represents a type of link - * @member href URI referring to a resource - * @see ETSI GS MEC 010-2 Clause 6.2.5.2 Type: LinkType - */ - type record LinkType { - Json.AnyURI href - } - /** - * @desc This data type represents a list of key-value pairs - * @member - * @member - * @see ETSI GS MEC 010-2 Clause 6.2.5.3 Type: KeyValuePairs - */ - type record KeyValuePairs { - Json.String key_name, - anytype key_value // FIXME To be refined - } - - /** - * @desc This data type represents the time stamp as Unix-time since January 1, 1970, 00:00:00 UTC - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see ETSI GS MEC 010-2 Clause 6.2.5.4 Type: TimeStamp - */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds - } - - /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type Json.UInteger Seconds; - - /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type Json.UInteger NanoSeconds; - - /** - * @desc This type represents the checksum of an application package - * @member algorithm Name of the algorithm used to generate the checksum, as defined in ETSI GS NFV-SOL 004 [18] - * @member hash The hexadecimal value of the checksum - * @see ETSI GS MEC 010-2 Clause 6.2.5.6 Type: Checksum - */ - type record Checksum { - Json.String algorithm, - Json.String hash - } - - } // End of group common_information_model - } with { extension "anytype integer, float, boolean, universal charstring"; encode "JSON" diff --git a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn index fd3a04d..b70a27f 100644 --- a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn @@ -31,7 +31,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { */ type record AppListItem { ApplicationList_AppInfo appInfo, - VendorSpecificExt vendorSpecificExt optional + VendorSpecificExt vendorSpecificExt optional } type record of AppListItem AppList; @@ -145,8 +145,8 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.3 Type: AppContext */ type record UserAppInstanceInfo { - Json.String appInstanceId optional, - Json.AnyURI referenceURI optional, + Json.String appInstanceId optional, + Json.AnyURI referenceURI optional, LocationConstraints appLocation optional } type record of UserAppInstanceInfo UserAppInstanceInfoList; @@ -229,8 +229,8 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.4 Type: ApplicationContextUpdateNotification */ type record ApplicationContextUpdateNotification { - Json.String notificationType, - Json.String contextId, + Json.String notificationType, + Json.String contextId, UserAppInstanceInfoList userAppInstanceInfo } @@ -269,7 +269,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { */ type record CivicAddressElement { Json.Integer caType, - Json.String caValue + Json.String caValue } /** @@ -278,8 +278,8 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { */ type record Polygon { Json.String type_, - Geometry geometry, - Properties properties, + Geometry geometry, + Properties properties, Json.String this_ } with { variant (type_) "name as 'type'"; diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn index f237430..fd0248c 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn @@ -24,7 +24,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @desc Operation that is being performed on the MEC */ type enumerated OperationAction { - STOPPING (0), + STOPPING (0), TERMINATING (1) } @@ -37,10 +37,10 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.4.2-1: Attributes of AppTerminationNotification */ type record AppTerminationNotification { - NotificationType notificationType, - OperationAction operationAction, + NotificationType notificationType, + OperationAction operationAction, MaxGracefulTimeout maxGracefulTimeout, - Subscription links + Subscription links } with { variant (links) "name as '_links'"; } @@ -118,8 +118,8 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { */ type record ServiceLivenessInfo { ServiceState state, - TimeStamp timeStamp, - integer interval + TimeStamp timeStamp, + integer interval } /** @@ -146,9 +146,9 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @desc This type represents the category reference. */ type record CategoryRef { - CategoryRef_Href href, - CategoryRef_Id id, - Name name, + CategoryRef_Href href, + CategoryRef_Id id, + Name name, CategoryRef_Version version } type record length(1..infinity) of CategoryRef CategoryRefList; @@ -202,18 +202,18 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @see ETSI GS MEC 011 V3.1.1 (2022-09) 7.1.2.6-1: Attributes of AppInfo */ type record AppInfo { - Json.String appName, - Json.String appProvider optional, - CategoryRef appCategory optional, - Json.String appDId optional, - Json.String appInstanceId optional, - EndPointInfo endpoint optional, - ServiceDependency appServiceRequired optional, - ServiceDependency appServiceOptional optional, - FeatureDependency appFeatureRequired optional, - FeatureDependency appFeatureOptional optional, - Json.Bool isInsByMec optional, - AppProfile appProfile optional + Json.String appName, + Json.String appProvider optional, + CategoryRef appCategory optional, + Json.String appDId optional, + Json.String appInstanceId optional, + EndPointInfo endpoint optional, + ServiceDependencies appServiceRequired optional, + ServiceDependencies appServiceOptional optional, + FeatureDependencies appFeatureRequired optional, + FeatureDependencies appFeatureOptional optional, + Json.Bool isInsByMec optional, + AppProfile appProfile optional } // End of type AppInfo /** @@ -254,11 +254,11 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.5.3-1: Attributes of DestinationInterface */ type record DestinationInterface { - InterfaceType interfaceType, - TunnelInfo tunnelInfo optional, + InterfaceType interfaceType, + TunnelInfo tunnelInfo optional, DestinationInterface_MacAddress srcMacAddress optional, DestinationInterface_MacAddress dstMacAddress optional, - DestinationInterface_IpAddress dstIpAddress optional + DestinationInterface_IpAddress dstIpAddress optional } type record of DestinationInterface DestinationInterfaceList; @@ -310,12 +310,12 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.2.3-1: Attributes of DnsRule */ type record DnsRule { - DnsRule_Id dnsRuleId, - DomainName domainName, + DnsRule_Id dnsRuleId, + DomainName domainName, DnsRule_IpAddressType ipAddressType, - DnsRule_IpAddress ipAddress, - Ttl ttl, - DnsRule_State state + DnsRule_IpAddress ipAddress, + Ttl ttl, + DnsRule_State state } type record of DnsRule DnsRuleList; @@ -333,7 +333,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @desc A IP address and port pair. */ type record Address { - Host host, + Host host, Address_Port port_ } with { variant (port_) "name as 'port'"; @@ -423,7 +423,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 6.2.2-1: Attributes of the SubscriptionLinkList */ type record Links { - LinkType self_, + LinkType self_, Subscriptions subscriptions } with { variant (self_) "name as 'self'"; -- GitLab From 49eadc03ad1075b1fa1c3ad74f5f4adf8deea237 Mon Sep 17 00:00:00 2001 From: garciay Date: Tue, 8 Aug 2023 10:23:43 +0200 Subject: [PATCH 22/58] Implementation od MEC 040 TPs --- ...Mec_FederationEnablementAPI_TestCases.ttcn | 1846 ++++++++++++++++- ...c_FederationEnablementAPI_TestControl.ttcn | 42 + .../FederationEnablementAPI_Functions.ttcn | 113 + .../ttcn/FederationEnablementAPI_Pics.ttcn | 5 + .../ttcn/FederationEnablementAPI_Pixits.ttcn | 39 + .../FederationEnablementAPI_Templates.ttcn | 48 + ...ederationEnablementAPI_TypesAndValues.ttcn | 3 +- ...FixedAccessInformationServiceAPI_Pics.ttcn | 3 + ttcn/LibMec/ttcn/LibMec_Pixits.ttcn | 8 +- .../ttcn/LibHttp_JsonMessageBodyTypes.ttcn | 13 +- .../ttcn/LibHttp_JsonTemplates.ttcn | 54 +- 11 files changed, 2163 insertions(+), 11 deletions(-) diff --git a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn index 121d712..75a2179 100644 --- a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn +++ b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn @@ -9,6 +9,9 @@ module AtsMec_FederationEnablementAPI_TestCases { import from LibHttp_Templates all; import from LibHttp_JsonTemplates all; import from LibHttp_TestSystem all; + + // LibMec/EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_Templates all; // LibMec/FederationEnablementAPI import from FederationEnablementAPI_TypesAndValues all; @@ -16,10 +19,1849 @@ module AtsMec_FederationEnablementAPI_TestCases { import from FederationEnablementAPI_Functions all; import from FederationEnablementAPI_Pics all; import from FederationEnablementAPI_Pixits all; - + // LibMec import from LibMec_Functions all; import from LibMec_Pics all; import from LibMec_Pixits all; - + + group lookup { + + /** + * @desc Check that the IUT responds with a list of all available systemInfo when requested by a MEC Orchestrator - No query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO, + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + *, + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_01 + + /** + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - SystemId query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_1, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_02 + + /** + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple SystemId query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_001_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_1, "UTF-8")) & "&systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_03 + + /** + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Empty SystemId query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_001_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=", + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_04 + + /** + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - SystemName query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_001_OK_05() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_NAME_1, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_05 + + /** + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple SystemName query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_001_OK_06() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_NAME_1, "UTF-8")) & "&systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_NAME_2, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_06 + + /** + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Empty SystemName query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_001_OK_07() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemName=", + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_07 + + /** + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - systemProvider query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_001_OK_08() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_1, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_08 + + /** + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple systemProvider query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_001_OK_09() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_1, "UTF-8")) & "?systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_2, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_09 + + /** + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Empty systemProvider query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_001_OK_10() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemProvider=", + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_10 + + /** + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_001_OK_11() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_1, "UTF-8")) & "?systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_NAME_3, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_11 + + /** + * @desc Check that the IUT responds with an error when selection is not applicable - SystemId + */ + testcase TC_MEC_MEC040_SRV_MEF_001_NF_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_UNKNOWN, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_NF_01 + + /** + * @desc Check that the IUT responds with an error when selection is not applicable - SystemName + */ + testcase TC_MEC_MEC040_SRV_MEF_001_NF_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_NAME_UNKNOWN, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_NF_02 + + /** + * @desc Check that the IUT responds with an error when selection is not applicable - SystemProvider + */ + testcase TC_MEC_MEC040_SRV_MEF_001_NF_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_UNKNOWN, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_NF_03 + + /** + * @desc Check that the IUT responds with an error when request is malformed + */ + testcase TC_MEC_MEC040_SRV_MEF_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?system=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_1, "UTF-8")), // system instead of systemId + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_BR + + } // End of group lookup + + group subscription { + + /** + * @desc Check that the IUT creates a new systemInfo when requested by a MEC Orchestrator + */ + testcase TC_MEC_MEC040_SRV_MEF_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_FED_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info( + m_system_info( + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_PROVIDER_1 + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_fed_system_info( + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + )))))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds the success code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info(v_response.response.body.json_body.systemInfo); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_002_OK + + /** + * @desc Check that the IUT responds with an error on creating an existing systemInfo + */ + testcase TC_MEC_MEC040_SRV_MEF_002_BR_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var SystemInfo v_system_info := valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info(v_system_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_FED_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info( + m_system_info( // Already created + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_PROVIDER_1 + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with yhe correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info(v_system_info); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_002_BR_01 + + /** + * @desc Check that the IUT responds with an error on creating an existing systemInfo + */ + testcase TC_MEC_MEC040_SRV_MEF_002_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var SystemInfo v_system_info := valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info(v_system_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_FED_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info( + m_system_info( + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_ID_1 // Shall be omitted + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with yhe correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info(v_system_info); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_002_BR_02 + + /** + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator + */ + testcase TC_MEC_MEC040_SRV_MEF_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info( + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct SystemInfo entry ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_003_OK + + /** + * @desc Check that the IUT responds with an error when it receives a request for returning a systemInfo referred with a wrong systemId + */ + testcase TC_MEC_MEC040_SRV_MEF_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_3, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_003_NF + + } // End of group subscription + + group patch { + + /** + * @desc Check that the IUT updates the systemInfo when requested by a MEC Orchestrator + */ + testcase TC_MEC_MEC040_SRV_MEF_004_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info_update( + m_system_info_update( + -, + m_end_point_uris( + { PX_FED_ENDPOINT_URI_1, PX_FED_ENDPOINT_URI_2 } + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info( + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_2 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the patched SystemInfo entry ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_004_OK_01 + + /** + * @desc Check that the IUT updates the systemInfo when requested by a MEC Orchestrator + */ + testcase TC_MEC_MEC040_SRV_MEF_004_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info_update( + m_system_info_update( + PX_FED_SYSTEM_NAME_1 & "_patched" + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info( + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_1 & "_patched", + PX_FED_SYSTEM_ID_2 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the patched SystemInfo entry ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_004_OK_02 + + /** + * @desc Check that the IUT updates the systemInfo when requested by a MEC Orchestrator + */ + testcase TC_MEC_MEC040_SRV_MEF_004_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info_update( + m_system_info_update( + PX_FED_SYSTEM_NAME_1 & "_patched", + m_end_point_uris( + { PX_FED_ENDPOINT_URI_1, PX_FED_ENDPOINT_URI_2 } + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info( + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_1 & "_patched", + PX_FED_SYSTEM_ID_2 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the patched SystemInfo entry ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_004_OK_03 + + /** + * @desc Check that the IUT responds with an error when requested to update an unknown systemInfo + */ + testcase TC_MEC_MEC040_SRV_MEF_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info_update( + m_system_info_update( + -, + m_end_point_uris( + { PX_FED_ENDPOINT_URI_1, PX_FED_ENDPOINT_URI_2 } + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_004_NF + + /** + * @desc Check that the IUT responds with an error when requested to update with an inconsistant URI + */ + testcase TC_MEC_MEC040_SRV_MEF_004_BR_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_FED_API_SUB_WRONG & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), // v10 instead of v1 + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info_update( + m_system_info_update( + -, + m_end_point_uris( + { PX_FED_ENDPOINT_URI_1, PX_FED_ENDPOINT_URI_2 } + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_004_BR_01 + + /** + * @desc Check that the IUT responds with an error when requested to update with no data provided + */ + testcase TC_MEC_MEC040_SRV_MEF_004_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info_update( + m_system_info_update // No data provided + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_004_BR_02 + + } // End of group patch + + group delete { + + /** + * @desc Check that the IUT deletes the systemInfo when requested by a MEC Orchestrator + */ + testcase TC_MEC_MEC040_SRV_MEF_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_005_OK + + /** + * @desc Check that the IUT responds with an error when requested to delete an unknown systemInfo + */ + testcase TC_MEC_MEC040_SRV_MEF_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_005_NF + + } // End of group delete + } // End of module AtsMec_FederationEnablementAPI_TestCases diff --git a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn index 73c204b..2f973bc 100644 --- a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn +++ b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn @@ -11,6 +11,48 @@ module AtsMec_FederationEnablementAPI_TestControl { control { + if (PICS_FED_API_SUPPORTED) { + + if (PICS_MEC_PLAT and PICS_SERVICES) { + execute(TC_MEC_MEC040_SRV_MEF_001_OK_01()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_02()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_03()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_04()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_05()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_06()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_07()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_08()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_09()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_10()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_11()); + + execute(TC_MEC_MEC040_SRV_MEF_001_NF_01()); + execute(TC_MEC_MEC040_SRV_MEF_001_NF_02()); + execute(TC_MEC_MEC040_SRV_MEF_001_NF_03()); + + execute(TC_MEC_MEC040_SRV_MEF_001_BR()); + + execute(TC_MEC_MEC040_SRV_MEF_002_OK()); + execute(TC_MEC_MEC040_SRV_MEF_002_BR_01()); + execute(TC_MEC_MEC040_SRV_MEF_002_BR_02()); + + execute(TC_MEC_MEC040_SRV_MEF_003_OK()); + execute(TC_MEC_MEC040_SRV_MEF_003_NF()); + + execute(TC_MEC_MEC040_SRV_MEF_004_OK_01()); + execute(TC_MEC_MEC040_SRV_MEF_004_OK_02()); + execute(TC_MEC_MEC040_SRV_MEF_004_OK_03()); + + execute(TC_MEC_MEC040_SRV_MEF_004_NF()); + execute(TC_MEC_MEC040_SRV_MEF_004_BR_01()); + execute(TC_MEC_MEC040_SRV_MEF_004_BR_02()); + + execute(TC_MEC_MEC040_SRV_MEF_005_OK()); + execute(TC_MEC_MEC040_SRV_MEF_005_NF()); + } + + } + } // End of 'control' statement } // End of module AtsMec_FederationEnablementAPI_TestControl diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Functions.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Functions.ttcn index 92a7a6a..aabbe21 100644 --- a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Functions.ttcn +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Functions.ttcn @@ -1,3 +1,116 @@ module FederationEnablementAPI_Functions { + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + import from LibCommon_Time all; + import from LibCommon_VerdictControl all; + import from LibCommon_Sync all; + + // LibHttp + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec/FixedAccessInformationServiceAPI + import from FederationEnablementAPI_TypesAndValues all; + import from FederationEnablementAPI_Templates all; + import from FederationEnablementAPI_Pixits all; + + // LibMec + import from LibMec_Templates all; + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + function f_create_system_info( + out SystemInfo p_system_info + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_FED_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info( + m_system_info( + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_PROVIDER_1 + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_fed_system_info( + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + )))))) -> value v_response { + tc_ac.stop; + + p_system_info := v_response.response.body.json_body.systemInfo; + log("f_create_system_info: INFO: IUT successfully responds to the subscription: ", p_system_info); + } + [] tc_ac.timeout { + log("f_create_system_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_system_info + + function f_delete_system_info( + in SystemInfo p_system_info + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(p_system_info.systemId, "UTF-8")), + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_system_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_system_info + + function f_create_system_info_list( + out SystemInfoList p_system_info_list + ) runs on HttpComponent { + for (var integer i := 0; i < lengthof(p_system_info_list); i := i + 1) { + f_create_system_info(p_system_info_list[i]); + } + } // End of function f_create_system_info_list + + function f_delete_system_info_list( + in SystemInfoList p_system_info_list + ) runs on HttpComponent { + for (var integer i := 0; i < lengthof(p_system_info_list); i := i + 1) { + f_delete_system_info(p_system_info_list[i]); + } + } // End of function f_delete_system_info_list + } // End of modue FederationEnablementAPI_Functions \ No newline at end of file diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pics.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pics.ttcn index a04be3d..d45a081 100644 --- a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pics.ttcn +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pics.ttcn @@ -1,3 +1,8 @@ module FederationEnablementAPI_Pics { + /** + * @desc Does the IUT support MEC Federation API? + */ + modulepar boolean PICS_FED_API_SUPPORTED := true; + } // End of module FederationEnablementAPI_Pics \ No newline at end of file diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pixits.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pixits.ttcn index ba1c4a9..a13a3bf 100644 --- a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pixits.ttcn +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pixits.ttcn @@ -1,3 +1,42 @@ module FederationEnablementAPI_Pixits { + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec/FixedAccessInformationServiceAPI + import from FederationEnablementAPI_TypesAndValues all; + + modulepar Json.String PX_FED_SYSTEM_ID_1 := ""; + + modulepar Json.String PX_FED_SYSTEM_NAME_1 := ""; + + modulepar Json.String PX_FED_SYSTEM_PROVIDER_1 := ""; + + modulepar Json.String PX_FED_SYSTEM_ID_2 := ""; + + modulepar Json.String PX_FED_SYSTEM_NAME_2 := ""; + + modulepar Json.String PX_FED_SYSTEM_PROVIDER_2 := ""; + + modulepar Json.String PX_FED_SYSTEM_ID_3 := ""; + + modulepar Json.String PX_FED_SYSTEM_NAME_3 := ""; + + modulepar Json.String PX_FED_SYSTEM_PROVIDER_3 := ""; + + modulepar Json.String PX_FED_SYSTEM_ID_UNKNOWN := ""; + + modulepar Json.String PX_FED_SYSTEM_NAME_UNKNOWN := ""; + + modulepar Json.String PX_FED_SYSTEM_PROVIDER_UNKNOWN := ""; + + modulepar Json.String PX_FED_ENDPOINT_URI_1 := ""; + + modulepar Json.String PX_FED_ENDPOINT_URI_2 := ""; + + modulepar Json.String PX_FED_ENDPOINT_URI_3 := ""; + } // End of module FederationEnablementAPI_Pixits \ No newline at end of file diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Templates.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Templates.ttcn index 77eebbe..a724d4e 100644 --- a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Templates.ttcn +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Templates.ttcn @@ -1,3 +1,51 @@ module FederationEnablementAPI_Templates { + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec/EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; + + // LibMec/FixedAccessInformationServiceAPI + import from FederationEnablementAPI_TypesAndValues all; + + template (omit) SystemInfo m_system_info( + in Json.String p_system_name, + in Json.String p_system_provider, + in template (omit) Json.String p_system_id := omit + ) := { + systemId := p_system_id, + systemName := p_system_name, + systemProvider := p_system_provider + } // End of template m_system_info + + template (present) SystemInfo mw_system_info( + template (present) Json.String p_system_name := ?, + template (present) Json.String p_system_provider := ?, + template Json.String p_system_id := * + ) := { + systemId := p_system_id, + systemName := p_system_name, + systemProvider := p_system_provider + } // End of template mw_system_info + + template (omit) SystemInfoUpdate m_system_info_update( + in template (omit) Json.String p_system_name := omit, + in template (omit) EdgePlatformApplicationEnablementAPI_TypesAndValues.EndPointInfo p_end_point := omit + ) := { + systemName := p_system_name, + endPoint := p_end_point + } // End of template m_system_info_update + + template SystemInfoUpdate mw_system_info_update( + template Json.String p_system_name := *, + template EdgePlatformApplicationEnablementAPI_TypesAndValues.EndPointInfo p_end_point := * + ) := { + systemName := p_system_name, + endPoint := p_end_point + } // End of template mw_system_info_update + } // End of module FederationEnablementAPI_Templates \ No newline at end of file diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_TypesAndValues.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_TypesAndValues.ttcn index 1e7895b..640e6c2 100644 --- a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_TypesAndValues.ttcn @@ -24,6 +24,7 @@ module FederationEnablementAPI_TypesAndValues { Json.String systemName, Json.String systemProvider } // End of type SystemInfo + type record of SystemInfo SystemInfoList; /** * @desc information provided by MEC orchestrator as a part of the "Update of MEC system(s) to the federation" @@ -33,7 +34,7 @@ module FederationEnablementAPI_TypesAndValues { */ type record SystemInfoUpdate { Json.String systemName optional, - EdgePlatformApplicationEnablementAPI_TypesAndValues.EndPointInfo endpoint optional + EdgePlatformApplicationEnablementAPI_TypesAndValues.EndPointInfo endPoint optional } // End of type SystemInfoUpdate } with { diff --git a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pics.ttcn b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pics.ttcn index 670fd23..e5c2449 100644 --- a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pics.ttcn +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pics.ttcn @@ -1,5 +1,8 @@ module FixedAccessInformationServiceAPI_Pics { + /** + * @desc Does the IUT support MEC Federation API? + */ modulepar boolean PICS_FAI_API_SUPPORTED := true; } // End of module FixedAccessInformationServiceAPI_Pics diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index 1752a7d..78bd7c3 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -85,5 +85,11 @@ module LibMec_Pixits { modulepar charstring PX_FAI_SUB_URI := "/fai/v1/optical_network_info"; modulepar charstring PX_UE_ZONAL_TRAF_SUB_URI := "/fai/v1/optical_network_info"; - + + modulepar charstring PX_FED_API_LIST_SYSTEM_INFO := "/fed_enablement/v1/fed_resources/system_info"; + + modulepar charstring PX_FED_API_SUB := "/fed_enablement/v1/fed_resources/system_info"; + + modulepar charstring PX_FED_API_SUB_WRONG := "/fed_enablement/v10/fed_resources/system_info"; // v10 instead of v1 + } // End of module LibMec_Pixits diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index 7d94b67..c8498ab 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -24,6 +24,10 @@ module LibHttp_JsonMessageBodyTypes { import from FixedAccessInformationServiceAPI_TypesAndValues all; // LibMec/V2XInformationServiceAPI import from V2XInformationServiceAPI_TypesAndValues all; + // LibMec/IoT + import from IoTAPI_TypesAndValues all; + // LibMec/FixedAccessInformationServiceAPI + import from FederationEnablementAPI_TypesAndValues all; /** * This file volontary contains a trivial declaration of the type JsonBody. @@ -65,7 +69,7 @@ module LibHttp_JsonMessageBodyTypes { MtsCapabilityInfo mtsCapabilityInfo, MtsSessionInfo mtsSessionInfo, MtsSessionInfos mtsSessionInfos, - TransportInfoList transportInfoList, + EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfoList transportInfoList, TrafficRuleList trafficRuleList, TrafficRule trafficRule, /*AppMobilityServiceInfo appMobilityServiceInfo,*/ @@ -138,7 +142,7 @@ module LibHttp_JsonMessageBodyTypes { MeasurementConfigLinkList measurementConfigLinkList, MeasurementConfig measurementConfig, FaInfo faInfo, - DeviceInfo deviceInfo, + FixedAccessInformationServiceAPI_TypesAndValues.DeviceInfo deviceInfo, CableLineInfo cableLineInfo, PonInfo ponInfo, OnuAlarmSubscription onuAlarmSubscription, @@ -156,7 +160,10 @@ module LibHttp_JsonMessageBodyTypes { ProvChgUuUniNotification provChgUuUniNotification, ProvChgUuMbmsNotification provChgUuMbmsNotification, ProvChgPc5Notification provChgPc5Notification, - // TODO Add here your custom variants + SystemInfo systemInfo, // ETSI GS MEC 040 V3.1.1 Clause 6.2.2 Type: SystemInfo + SystemInfoList systemInfoList, // ETSI GS MEC 040 V3.1.1 Clause 6.2.2 Type: SystemInfo + SystemInfoUpdate systemInfoUpdate, // ETSI GS MEC 040 V3.1.1 Clause 6.2.3 Type: SystemInfoUpdate + // TODO Add here your custom variants universal charstring raw } with { variant "" diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn index 0f1b54b..700b069 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -46,6 +46,12 @@ module LibHttp_JsonTemplates { // LibMec/V2XInformationServiceAPI import from V2XInformationServiceAPI_TypesAndValues all; + // LibMec/IoT + import from IoTAPI_TypesAndValues all; + + // LibMec/FixedAccessInformationServiceAPI + import from FederationEnablementAPI_TypesAndValues all; + template (value) JsonBody m_json_body_raw( in template (value) charstring p_raw ) := { @@ -834,13 +840,13 @@ group ams_api { } // End of template mw_body_json_srv_liveness_info template (value) JsonBody m_body_json_transport_info_list( - in template (value) TransportInfoList p_transportInfoList + in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfoList p_transportInfoList ) := { transportInfoList := p_transportInfoList } // End of template m_body_json_transport_info_list template (present) JsonBody mw_body_json_transport_info_list( - template (present) TransportInfoList p_transportInfoList := ? + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfoList p_transportInfoList := ? ) := { transportInfoList := p_transportInfoList } // End of template mw_body_json_transport_info_list @@ -1262,13 +1268,13 @@ group ams_api { } // End of template mw_body_json_fai_fa_info template (value) JsonBody m_body_json_fai_device_info( - in template (value) DeviceInfo p_deviceInfo + in template (value) FixedAccessInformationServiceAPI_TypesAndValues.DeviceInfo p_deviceInfo ) := { deviceInfo := p_deviceInfo } // End of template m_body_json_fai_device_info template (present) JsonBody mw_body_json_fai_device_info( - template (present) DeviceInfo p_deviceInfo := ? + template (present) FixedAccessInformationServiceAPI_TypesAndValues.DeviceInfo p_deviceInfo := ? ) := { deviceInfo := p_deviceInfo } // End of template mw_body_json_fai_device_info @@ -1323,4 +1329,44 @@ group ams_api { } // End of group fai + group federation { + + template (value) JsonBody m_body_json_fed_system_info( + in template (value) SystemInfo p_systemInfo + ) := { + systemInfo := p_systemInfo + } // End of template m_body_json_fed_system_info + + template (present) JsonBody mw_body_json_fed_system_info( + template (present) SystemInfo p_systemInfo := ? + ) := { + systemInfo := p_systemInfo + } // End of template mw_body_json_fed_system_info + + template (value) JsonBody m_body_json_fed_system_info_list( + in template (value) SystemInfoList p_systemInfoList + ) := { + systemInfoList := p_systemInfoList + } // End of template m_body_json_fed_system_info_list + + template (present) JsonBody mw_body_json_fed_system_info_list( + template (present) SystemInfoList p_systemInfoList := ? + ) := { + systemInfoList := p_systemInfoList + } // End of template mw_body_json_fed_system_info_list + + template (value) JsonBody m_body_json_fed_system_info_update( + in template (value) SystemInfoUpdate p_systemInfoUpdate + ) := { + systemInfoUpdate := p_systemInfoUpdate + } // End of template m_body_json_fed_system_info_update + + template (present) JsonBody mw_body_json_fed_system_info_update( + template (present) SystemInfoUpdate p_systemInfoUpdate := ? + ) := { + systemInfoUpdate := p_systemInfoUpdate + } // End of template mw_body_json_fed_system_info_update + + } // End of group federation + } // End of module LibHttp_JsonTemplates -- GitLab From d2b4d9429d79e37d989193fbe636546004630c52 Mon Sep 17 00:00:00 2001 From: garciay Date: Wed, 9 Aug 2023 10:32:30 +0200 Subject: [PATCH 23/58] Implementation od MEC 033/iotdev TPs --- .../module.mk | 2 + .../module.mk | 2 + .../module.mk | 2 + ...Mec_FederationEnablementAPI_TestCases.ttcn | 1 + .../module.mk | 2 + ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn | 966 ++++++++++++++++++ .../AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn | 23 + ttcn/AtsMec_Location/module.mk | 2 + ttcn/AtsMec_Rnis/module.mk | 2 + ttcn/AtsMec_TrafficManagement/module.mk | 2 + ttcn/AtsMec_UEidentity/module.mk | 2 + ttcn/AtsMec_V2XInformationService/module.mk | 2 + ttcn/AtsMec_WlanInformation/module.mk | 2 + ...fecycleAndOperationGrantingAPI_Pixits.ttcn | 16 + ...ycleAndOperationGrantingAPI_Templates.ttcn | 100 ++ .../FederationEnablementAPI_Functions.ttcn | 4 +- ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn | 122 ++- ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pics.ttcn | 5 + ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn | 43 + ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn | 87 ++ .../IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn | 13 +- ttcn/LibMec/ttcn/LibMec_Pixits.ttcn | 4 + .../ttcn/LibHttp_JsonMessageBodyTypes.ttcn | 4 +- .../ttcn/LibHttp_JsonTemplates.ttcn | 28 + 24 files changed, 1428 insertions(+), 8 deletions(-) diff --git a/ttcn/AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting/module.mk b/ttcn/AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting/module.mk index a11413d..9b2aa7c 100644 --- a/ttcn/AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting/module.mk +++ b/ttcn/AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting/module.mk @@ -22,6 +22,8 @@ modules := ../LibCommon \ ../LibMec/WlanInformationAPI \ ../LibMec/FixedAccessInformationServiceAPI \ ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ diff --git a/ttcn/AtsMec_DeviceApplicationInterface/module.mk b/ttcn/AtsMec_DeviceApplicationInterface/module.mk index d6154fd..a3bfbe0 100644 --- a/ttcn/AtsMec_DeviceApplicationInterface/module.mk +++ b/ttcn/AtsMec_DeviceApplicationInterface/module.mk @@ -22,6 +22,8 @@ modules := ../LibCommon \ ../LibMec/WlanInformationAPI \ ../LibMec/FixedAccessInformationServiceAPI \ ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ diff --git a/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk b/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk index e5209bf..ec2ed73 100644 --- a/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk +++ b/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk @@ -23,6 +23,8 @@ modules := ../LibCommon \ ../LibMec/WlanInformationAPI \ ../LibMec/FixedAccessInformationServiceAPI \ ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ diff --git a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn index 75a2179..7030ecd 100644 --- a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn +++ b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn @@ -1849,6 +1849,7 @@ module AtsMec_FederationEnablementAPI_TestCases { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + v_system_info_list[1].systemId := omit; f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { diff --git a/ttcn/AtsMec_FixedAccessInformationService/module.mk b/ttcn/AtsMec_FixedAccessInformationService/module.mk index 0c3a7e2..5b3e010 100644 --- a/ttcn/AtsMec_FixedAccessInformationService/module.mk +++ b/ttcn/AtsMec_FixedAccessInformationService/module.mk @@ -22,6 +22,8 @@ modules := ../LibCommon \ ../LibMec/WlanInformationAPI \ ../LibMec/FixedAccessInformationServiceAPI \ ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ diff --git a/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn index f02d4df..854bb5c 100644 --- a/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn +++ b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn @@ -10,6 +10,11 @@ module AtsMec_IoTAPI_TestCases { import from LibHttp_JsonTemplates all; import from LibHttp_TestSystem all; + // LibMec/LibMec_ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Templates all; + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits all; + // LibMec/IoTAPI import from IoTAPI_TypesAndValues all; import from IoTAPI_Templates all; @@ -22,4 +27,965 @@ module AtsMec_IoTAPI_TestCases { import from LibMec_Pics all; import from LibMec_Pixits all; + group iotdev { + + group lookup { + + /** + * @desc Check that the IUT responds with the list of registered IoT devices when queried by a Service Consumer + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO, + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_device_info_list( + { + mw_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + -, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1 + ), + mw_device_info( + PX_IOT_DEVICE_ID_2, + PX_IOT_DEVICE_AUTH_2, + -, + PX_IOT_DEVICE_SUPI_2, + PX_IOT_DEVICE_IMSI_2 + ), + mw_device_info( + PX_IOT_DEVICE_ID_3, + PX_IOT_DEVICE_AUTH_3, + -, + PX_IOT_DEVICE_SUPI_3, + PX_IOT_DEVICE_IMSI_3 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_01 + + /** + * @desc Check that the IUT responds with the list of registered IoT devices when queried using a filter by a Service Consumer + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO & "?filter=(eq,enabled,false)", + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_device_info_list( + { + mw_device_info( + PX_IOT_DEVICE_ID_2, + PX_IOT_DEVICE_AUTH_2, + -, + PX_IOT_DEVICE_SUPI_2, + PX_IOT_DEVICE_IMSI_2 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_02 + + /** + * @desc Check that the IUT responds with the list of registered IoT devices when queried by a Service Consumer filtering one field + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO & "?fields=deviceId", + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_device_info_list( + { + mw_device_info( + PX_IOT_DEVICE_ID_3, + PX_IOT_DEVICE_AUTH_3, + -, + PX_IOT_DEVICE_SUPI_3, + PX_IOT_DEVICE_IMSI_3 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_03 + + /** + * @desc Check that the IUT responds with the list of registered IoT devices when queried by a Service Consumer filtering the number of fields and applying a filter to a specific field + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO & "?fields=deviceId&filter=(eq,enabled,false)", + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_device_info_list( + { + mw_device_info( + PX_IOT_DEVICE_ID_2, + PX_IOT_DEVICE_AUTH_2, + -, + PX_IOT_DEVICE_SUPI_2, + PX_IOT_DEVICE_IMSI_2 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_04 + + } // End of group lookup + + group subscription { + + /** + * @desc Check that the IUT registers the information of an IoT device when requested by a Service Consumer + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_IOT_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_fed_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + -, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1 + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_fed_device_info( + mw_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + false, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1 + )))))) -> value v_response { + tc_ac.stop; + + if (f_check_headers(valueof(v_response.response.header)) == false) { + log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + log("*** " & testcasename() & ": PASS: IUT successfully create DeviceInfo entry ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info(v_response.response.body.json_body.deviceInfo_iot); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_002_OK + + /** + * @desc Check that the IUT returns an error when Service Consumer request to register an IoT device with incorrect parameters + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_002_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_IOT_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_fed_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + false, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1 + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info(v_response.response.body.json_body.deviceInfo_iot); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_002_BR + + /** + * @desc Check that the IUT returns the IoT device information when requested by Service Consumer specifying the device identifier + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_2, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_device_info( + mw_device_info( + PX_IOT_DEVICE_ID_2, + PX_IOT_DEVICE_AUTH_2, + true, // According to Note 3 of 6.2.2-1 table, it cannot be set directly by the service consumer + PX_IOT_DEVICE_SUPI_2, + PX_IOT_DEVICE_IMSI_2 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct DeviceInfo entry ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_003_OK + + /** + * @desc Check that the IUT returns the IoT device information when requested by Service Consumer specifying the device identifier + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_003_NF + + } // End of group subscribe + + group patch { + + /** + * @desc Check that the IUT updates the information about a registered IoT device when requested by a Service Consumer + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + var TrafficRuleDescriptor v_traffic_rule_descriptor := valueof( + m_traffic_rule_descriptor( + PX_TRAFFIC_RULE_ID, + PX_TRAFFIC_FILTERTYPE, + PX_TRAFFIC_RULE_PRIORITY, + m_traffic_filter( + PX_TRAFFIC_FILTER_SRC_ADDRESS, + PX_TRAFFIC_FILTER_DST_ADDRESS, + PX_TRAFFIC_FILTER_SRC_PORT, + PX_TRAFFIC_FILTER_DST_PORT, + PX_TRAFFIC_FILTER_PROTOCOL + ), + PX_TRAFFIC_RULE_ACTION + )); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_1, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_fed_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + -, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1, + PX_REQUESTED_PLTF_ID, + {v_traffic_rule_descriptor} + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_device_info( + mw_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + -, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1, + PX_REQUESTED_PLTF_ID, + {v_traffic_rule_descriptor} + )))))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates DeviceInfo entry ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_004_OK + + /** + * @desc Check that the IUT returns an error when a Service Consumer requests to update a not registered IoT device + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + var TrafficRuleDescriptor v_traffic_rule_descriptor := valueof( + m_traffic_rule_descriptor( + PX_TRAFFIC_RULE_ID, + PX_TRAFFIC_FILTERTYPE, + PX_TRAFFIC_RULE_PRIORITY, + m_traffic_filter( + PX_TRAFFIC_FILTER_SRC_ADDRESS, + PX_TRAFFIC_FILTER_DST_ADDRESS, + PX_TRAFFIC_FILTER_SRC_PORT, + PX_TRAFFIC_FILTER_DST_PORT, + PX_TRAFFIC_FILTER_PROTOCOL + ), + PX_TRAFFIC_RULE_ACTION + )); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_fed_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + -, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1, + PX_REQUESTED_PLTF_ID, + {v_traffic_rule_descriptor} + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_004_NF + + /** + * @desc Check that the IUT returns an error when Service Consumer request to register an IoT device with incorrect parameters + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_004_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + var TrafficRuleDescriptor v_traffic_rule_descriptor := valueof( + m_traffic_rule_descriptor( + PX_TRAFFIC_RULE_ID, + PX_TRAFFIC_FILTERTYPE, + PX_TRAFFIC_RULE_PRIORITY, + m_traffic_filter( + PX_TRAFFIC_FILTER_SRC_ADDRESS, + PX_TRAFFIC_FILTER_DST_ADDRESS, + PX_TRAFFIC_FILTER_SRC_PORT, + PX_TRAFFIC_FILTER_DST_PORT, + PX_TRAFFIC_FILTER_PROTOCOL + ), + PX_TRAFFIC_RULE_ACTION + )); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_fed_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + true, // According to Note 3 of 6.2.2-1 table, it cannot be set directly by the service consumer + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1, + PX_REQUESTED_PLTF_ID, + {v_traffic_rule_descriptor} + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_004_BR + + } // End of group patch + + group delete { + + /** + * @desc Check that the IUT deregisters an IoT device information when requested by a Service Consumer specifying the IoT registered device identifier + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_2, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 code ***"); + v_device_info_list[1].deviceId := ""; + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_005_OK + + /** + * @desc Check that the IUT deregisters an IoT device information when requested by a Service Consumer specifying the IoT registered device identifier + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_005_NF + + } // End of group delete + + } // End of group iotdev + + group iotpltf { + + } // End of group iotpltf + } // End of module AtsMec_IoTAPI_TestCases diff --git a/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn index ad2c195..1cec745 100644 --- a/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn +++ b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn @@ -11,6 +11,29 @@ module AtsMec_IoTAPI_TestControl { control { + if (PICS_IOT_API_SUPPORTED) { + + if (PICS_MEC_PLAT and PICS_SERVICES) { + execute(TC_MEC_MEC033_IOTS_IOTDEV_001_OK_01()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_001_OK_02()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_001_OK_03()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_001_OK_04()); + + execute(TC_MEC_MEC033_IOTS_IOTDEV_002_OK()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_002_BR()); + + execute(TC_MEC_MEC033_IOTS_IOTDEV_003_OK()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_003_NF()); + + execute(TC_MEC_MEC033_IOTS_IOTDEV_004_OK()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_004_NF()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_004_BR()); + + execute(TC_MEC_MEC033_IOTS_IOTDEV_005_OK()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_005_NF()); + } + } + } // End of 'control' statement } // End of module AtsMec_IoTAPI_TestControl diff --git a/ttcn/AtsMec_Location/module.mk b/ttcn/AtsMec_Location/module.mk index 480db29..a601740 100644 --- a/ttcn/AtsMec_Location/module.mk +++ b/ttcn/AtsMec_Location/module.mk @@ -22,6 +22,8 @@ modules := ../LibCommon \ ../LibMec/WlanInformationAPI \ ../LibMec/FixedAccessInformationServiceAPI \ ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ diff --git a/ttcn/AtsMec_Rnis/module.mk b/ttcn/AtsMec_Rnis/module.mk index 361f51f..5889511 100644 --- a/ttcn/AtsMec_Rnis/module.mk +++ b/ttcn/AtsMec_Rnis/module.mk @@ -22,6 +22,8 @@ modules := ../LibCommon \ ../LibMec/WlanInformationAPI \ ../LibMec/FixedAccessInformationServiceAPI \ ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ diff --git a/ttcn/AtsMec_TrafficManagement/module.mk b/ttcn/AtsMec_TrafficManagement/module.mk index 6c17382..b24f6e6 100644 --- a/ttcn/AtsMec_TrafficManagement/module.mk +++ b/ttcn/AtsMec_TrafficManagement/module.mk @@ -23,6 +23,8 @@ modules := ../LibCommon \ ../LibMec/WlanInformationAPI \ ../LibMec/FixedAccessInformationServiceAPI \ ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ diff --git a/ttcn/AtsMec_UEidentity/module.mk b/ttcn/AtsMec_UEidentity/module.mk index 907dd93..d351d3b 100644 --- a/ttcn/AtsMec_UEidentity/module.mk +++ b/ttcn/AtsMec_UEidentity/module.mk @@ -22,6 +22,8 @@ modules := ../LibCommon \ ../LibMec/WlanInformationAPI \ ../LibMec/FixedAccessInformationServiceAPI \ ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ diff --git a/ttcn/AtsMec_V2XInformationService/module.mk b/ttcn/AtsMec_V2XInformationService/module.mk index 366db2c..4e4bc43 100644 --- a/ttcn/AtsMec_V2XInformationService/module.mk +++ b/ttcn/AtsMec_V2XInformationService/module.mk @@ -22,6 +22,8 @@ modules := ../LibCommon \ ../LibMec/WlanInformationAPI \ ../LibMec/FixedAccessInformationServiceAPI \ ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ diff --git a/ttcn/AtsMec_WlanInformation/module.mk b/ttcn/AtsMec_WlanInformation/module.mk index 221a3d4..f543231 100644 --- a/ttcn/AtsMec_WlanInformation/module.mk +++ b/ttcn/AtsMec_WlanInformation/module.mk @@ -22,6 +22,8 @@ modules := ../LibCommon \ ../LibMec/WlanInformationAPI \ ../LibMec/FixedAccessInformationServiceAPI \ ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn index a8d9de7..fbceab5 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn @@ -22,7 +22,23 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits { modulepar Json.String PX_NON_EXISTANT_GRANTING_ID := "PX_NON_EXISTANT_GRANTING_ID"; + modulepar Json.String PX_TRAFFIC_RULE_ID := "PX_TRAFFIC_RULE_ID"; + modulepar FilterType PX_TRAFFIC_FILTERTYPE := FLOW; + + modulepar Json.Integer PX_TRAFFIC_RULE_PRIORITY := 0; + + modulepar Action PX_TRAFFIC_RULE_ACTION := PASSTHROUGH; + + modulepar Json.String PX_TRAFFIC_FILTER_SRC_ADDRESS := ""; + + modulepar Json.String PX_TRAFFIC_FILTER_DST_ADDRESS := ""; + + modulepar Json.String PX_TRAFFIC_FILTER_SRC_PORT := "12345"; + + modulepar Json.String PX_TRAFFIC_FILTER_DST_PORT := "12346"; + + modulepar Json.String PX_TRAFFIC_FILTER_PROTOCOL := ""; modulepar Json.String PX_APP_PKG_NAME := "APP_PKG_NAME" diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn index fe37d7a..66ac297 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn @@ -344,6 +344,106 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { requestedPermissions := p_requestedPermissions } // End of template mw_service_dependency + template (omit) TrafficRuleDescriptor m_traffic_rule_descriptor( + in template (value) Json.String p_trafficRuleId, + in template (value) FilterType p_filterType, + in template (value) Json.Integer p_priority, + in template (value) TrafficFilter p_trafficFilter, + in template (value) Action p_action, + in template (omit) InterfaceDescriptor p_dstInterface := omit + ) := { + trafficRuleId := p_trafficRuleId, + filterType := p_filterType, + priority := p_priority, + trafficFilter := p_trafficFilter, + action_ := p_action, + dstInterface := p_dstInterface + } // End of template m_traffic_rule_descriptor + + template (present) TrafficRuleDescriptor mw_traffic_rule_descriptor( + template (present) Json.String p_trafficRuleId := ?, + template (present) FilterType p_filterType := ?, + template (present) Json.Integer p_priority := ?, + template (present) TrafficFilter p_trafficFilter := ?, + template (present) Action p_action := ?, + template InterfaceDescriptor p_dstInterface := * + ) := { + trafficRuleId := p_trafficRuleId, + filterType := p_filterType, + priority := p_priority, + trafficFilter := p_trafficFilter, + action_ := p_action, + dstInterface := p_dstInterface + } // End of template mw_traffic_rule_descriptor + + template (omit) TrafficFilter m_traffic_filter( + in template (omit) Json.String p_srcAddress := omit, + in template (omit) Json.String p_dstAddress := omit, + in template (omit) Json.String p_srcPort := omit, + in template (omit) Json.String p_dstPort := omit, + in template (omit) Json.String p_protocol := omit, + in template (omit) Json.String p_tag := omit, + in template (omit) Json.String p_uri := omit, + in template (omit) Json.String p_packetLabel := omit, + in template (omit) Json.String p_srcTunnelAddress := omit, + in template (omit) Json.String p_tgtTunnelAddress := omit, + in template (omit) Json.String p_srcTunnelPort := omit, + in template (omit) Json.String p_dstTunnelPort := omit, + in template (omit) Json.Integer p_qCI := omit, + in template (omit) Json.Integer p_dSCP := omit, + in template (omit) Json.Integer p_tC := omit + ) :={ + srcAddress := p_srcAddress, + dstAddress := p_dstAddress, + srcPort := p_srcPort, + dstPort := p_dstPort, + protocol := p_protocol, + tag := p_tag, + uri := p_uri, + packetLabel := p_packetLabel, + srcTunnelAddress := p_srcTunnelAddress, + tgtTunnelAddress := p_tgtTunnelAddress, + srcTunnelPort := p_srcTunnelPort, + dstTunnelPort := p_dstTunnelPort, + qCI := p_qCI, + dSCP := p_dSCP, + tC := p_tC + } // End of template m_traffic_filter + + template TrafficFilter mw_traffic_filter( + template Json.String p_srcAddress := *, + template Json.String p_dstAddress := *, + template Json.String p_srcPort := *, + template Json.String p_dstPort := *, + template Json.String p_protocol := *, + template Json.String p_tag := *, + template Json.String p_uri := *, + template Json.String p_packetLabel := *, + template Json.String p_srcTunnelAddress := *, + template Json.String p_tgtTunnelAddress := *, + template Json.String p_srcTunnelPort := *, + template Json.String p_dstTunnelPort := *, + template Json.Integer p_qCI := *, + template Json.Integer p_dSCP := *, + template Json.Integer p_tC := * + ) :={ + srcAddress := p_srcAddress, + dstAddress := p_dstAddress, + srcPort := p_srcPort, + dstPort := p_dstPort, + protocol := p_protocol, + tag := p_tag, + uri := p_uri, + packetLabel := p_packetLabel, + srcTunnelAddress := p_srcTunnelAddress, + tgtTunnelAddress := p_tgtTunnelAddress, + srcTunnelPort := p_srcTunnelPort, + dstTunnelPort := p_dstTunnelPort, + qCI := p_qCI, + dSCP := p_dSCP, + tC := p_tC + } // End of template mw_traffic_filter + } // End of group mepm_lifcyclemgt group mex_lifcyclemgt { diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Functions.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Functions.ttcn index aabbe21..cdf7464 100644 --- a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Functions.ttcn +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Functions.ttcn @@ -101,7 +101,7 @@ module FederationEnablementAPI_Functions { out SystemInfoList p_system_info_list ) runs on HttpComponent { for (var integer i := 0; i < lengthof(p_system_info_list); i := i + 1) { - f_create_system_info(p_system_info_list[i]); + f_create_system_info(p_system_info_list[i]); } } // End of function f_create_system_info_list @@ -109,7 +109,9 @@ module FederationEnablementAPI_Functions { in SystemInfoList p_system_info_list ) runs on HttpComponent { for (var integer i := 0; i < lengthof(p_system_info_list); i := i + 1) { + if (ispresent(p_system_info_list[i].systemId)) { f_delete_system_info(p_system_info_list[i]); + } } } // End of function f_delete_system_info_list diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn index 3a5a360..b728f05 100644 --- a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn @@ -1,3 +1,123 @@ module IoTAPI_Functions { -} // End of IoTAPI_Functions + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + import from LibCommon_Time all; + import from LibCommon_VerdictControl all; + import from LibCommon_Sync all; + + // LibHttp + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec/FixedAccessInformationServiceAPI + import from IoTAPI_TypesAndValues all; + import from IoTAPI_Templates all; + import from IoTAPI_Pixits all; + + // LibMec + import from LibMec_Templates all; + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + function f_create_device_info( + out DeviceInfo p_device_info + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_IOT_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_fed_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + false, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1 + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_fed_device_info( + mw_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + false, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1 + )))))) -> value v_response { + tc_ac.stop; + + p_device_info := v_response.response.body.json_body.deviceInfo_iot; + log("f_create_device_info: INFO: IUT successfully responds to the subscription: ", p_device_info); + } + [] tc_ac.timeout { + log("f_create_device_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_device_info + + function f_delete_device_info( + in DeviceInfo p_device_info + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(p_device_info.deviceId, "UTF-8")), + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_device_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_device_info + + function f_create_device_info_list( + out DeviceInfoList p_device_info_list + ) runs on HttpComponent { + for (var integer i := 0; i < lengthof(p_device_info_list); i := i + 1) { + f_create_device_info(p_device_info_list[i]); + } + } // End of function f_create_device_info_list + + function f_delete_device_info_list( + in DeviceInfoList p_device_info_list + ) runs on HttpComponent { + for (var integer i := 0; i < lengthof(p_device_info_list); i := i + 1) { + if (p_device_info_list[i].deviceId != "") { + f_delete_device_info(p_device_info_list[i]); + } + } + } // End of function f_delete_device_info_list + +} // End of modue IoTAPI_Functions \ No newline at end of file diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pics.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pics.ttcn index 9d74084..52985e1 100644 --- a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pics.ttcn +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pics.ttcn @@ -1,3 +1,8 @@ module IoTAPI_Pics { + /** + * @desc Does the IUT support MEC IoT API? + */ + modulepar boolean PICS_IOT_API_SUPPORTED := true; + } // End of IoTAPI_Pics diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn index 9a5c93b..cc315ae 100644 --- a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn @@ -1,3 +1,46 @@ module IoTAPI_Pixits { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec/FixedAccessInformationServiceAPI + import from FederationEnablementAPI_TypesAndValues all; + + modulepar Json.String PX_IOT_DEVICE_ID_1 := ""; + + modulepar Json.String PX_IOT_DEVICE_SUPI_1 := ""; + + modulepar Json.String PX_IOT_DEVICE_IMSI_1 := ""; + + modulepar Json.String PX_IOT_DEVICE_AUTH_1 := ""; + + modulepar Json.String PX_IOT_DEVICE_ID_2 := ""; + + modulepar Json.String PX_IOT_DEVICE_SUPI_2 := ""; + + modulepar Json.String PX_IOT_DEVICE_IMSI_2 := ""; + + modulepar Json.String PX_IOT_DEVICE_AUTH_2 := ""; + + modulepar Json.String PX_IOT_DEVICE_ID_3 := ""; + + modulepar Json.String PX_IOT_DEVICE_SUPI_3 := ""; + + modulepar Json.String PX_IOT_DEVICE_IMSI_3 := ""; + + modulepar Json.String PX_IOT_DEVICE_AUTH_3 := ""; + + modulepar Json.String PX_IOT_DEVICE_ID_UNKNOWN := ""; + + modulepar Json.String PX_IOT_ENDPOINT_URI_1 := ""; + + modulepar Json.String PX_IOT_ENDPOINT_URI_2 := ""; + + modulepar Json.String PX_IOT_ENDPOINT_URI_3 := ""; + + modulepar Json.String PX_REQUESTED_PLTF_ID := ""; } // End of IoTAPI_Pixits diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn index a27bba0..040323d 100644 --- a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn @@ -1,3 +1,90 @@ module IoTAPI_Templates { + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec/LibMec_ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; + + // LibMec/EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; + + // LibMec/IoTAPI + import from IoTAPI_TypesAndValues all; + + template (omit) DeviceInfo m_device_info( + in Json.String p_deviceId, + in Json.String p_deviceAuthenticationInfo, + in Json.Bool p_enabled := false, + in template (omit) Json.String p_supi := omit, + in template (omit) Json.String p_imsi := omit, + in template (omit) Json.String p_requestedIotPlatformId := omit, + in template (omit) TrafficRuleDescriptors p_requestedMecTrafficRule := omit, + in template (omit) DeviceMetatData p_deviceMetadata := omit, + in template (omit) Json.String p_gpsi := omit, + in template (omit) Json.String p_pei := omit, + in template (omit) Json.String p_msisdn := omit, + in template (omit) Json.String p_imei := omit, + in template (omit) Json.String p_iccid := omit, + in template (omit) DeviceSpecificMessageFormats p_deviceSpecificMessageFormats := omit, + in template (omit) DownlinkInfo p_downlinkInfo := omit, + in template (omit) Json.String p_clientCertificate := omit + + ) := { + deviceAuthenticationInfo := p_deviceAuthenticationInfo, + deviceMetadata := p_deviceMetadata, + gpsi := p_gpsi, + pei := p_pei, + supi := p_supi, + msisdn := p_msisdn, + imei := p_imei, + imsi := p_imsi, + iccid := p_iccid, + deviceId := p_deviceId, + requestedMecTrafficRule := p_requestedMecTrafficRule, + requestedIotPlatformId := p_requestedIotPlatformId, + deviceSpecificMessageFormats := p_deviceSpecificMessageFormats, + downlinkInfo := p_downlinkInfo, + clientCertificate := p_clientCertificate, + enabled := p_enabled + } // End of template m_device_info + + template (present) DeviceInfo mw_device_info( + template (present) Json.String p_deviceId := ?, + template (present) Json.String p_deviceAuthenticationInfo := ?, + template (present) Json.Bool p_enabled := ?, + template Json.String p_supi := *, + template Json.String p_imsi := *, + template Json.String p_requestedIotPlatformId := *, + template TrafficRuleDescriptors p_requestedMecTrafficRule := *, + template DeviceMetatData p_deviceMetadata := *, + template Json.String p_gpsi := *, + template Json.String p_pei := *, + template Json.String p_msisdn := *, + template Json.String p_imei := *, + template Json.String p_iccid := *, + template DeviceSpecificMessageFormats p_deviceSpecificMessageFormats := *, + template DownlinkInfo p_downlinkInfo := *, + template Json.String p_clientCertificate := * + ) := { + deviceAuthenticationInfo := p_deviceAuthenticationInfo, + deviceMetadata := p_deviceMetadata, + gpsi := p_gpsi, + pei := p_pei, + supi := p_supi, + msisdn := p_msisdn, + imei := p_imei, + imsi := p_imsi, + iccid := p_iccid, + deviceId := p_deviceId, + requestedMecTrafficRule := p_requestedMecTrafficRule, + requestedIotPlatformId := p_requestedIotPlatformId, + deviceSpecificMessageFormats := p_deviceSpecificMessageFormats, + downlinkInfo := p_downlinkInfo, + clientCertificate := p_clientCertificate, + enabled := p_enabled + } // End of template mw_device_info } // End of IoTAPI_Templates diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn index 94f21a9..185df84 100644 --- a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn @@ -10,10 +10,10 @@ module IoTAPI_TypesAndValues { // LibCommon import from LibCommon_BasicTypesAndValues all; - // MEC-010-1 + // LibMec/LibMec_ApplicationPackageLifecycleAndOperationGrantingAPI import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; - // MEC-011 + // LibMec/EdgePlatformApplicationEnablementAPI import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; /** @@ -38,7 +38,7 @@ module IoTAPI_TypesAndValues { */ type record DeviceInfo { Json.String deviceAuthenticationInfo, - record of Json.String deviceMetadata optional, + DeviceMetatData deviceMetadata optional, Json.String gpsi optional, Json.String pei optional, Json.String supi optional, @@ -47,7 +47,7 @@ module IoTAPI_TypesAndValues { Json.String imsi optional, Json.String iccid optional, Json.String deviceId, - TrafficRuleDescriptorList requestedMecTrafficRule optional, + TrafficRuleDescriptors requestedMecTrafficRule optional, Json.String requestedIotPlatformId optional, DeviceSpecificMessageFormats deviceSpecificMessageFormats optional, DownlinkInfo downlinkInfo optional, @@ -55,6 +55,10 @@ module IoTAPI_TypesAndValues { Json.Bool enabled } // End of type DeviceInfo + type record of DeviceInfo DeviceInfoList; + + type record of Json.String DeviceMetatData; + /** * @desc * @member eventMsgFormat Event message format configuration @@ -132,7 +136,6 @@ module IoTAPI_TypesAndValues { type record of Json.String UplinkTopics; type record of Json.String DownlinkTopics; - type record of ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficRuleDescriptor TrafficRuleDescriptorList; type record of EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfo TransportInfoList; /** diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index 78bd7c3..8f29c11 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -92,4 +92,8 @@ module LibMec_Pixits { modulepar charstring PX_FED_API_SUB_WRONG := "/fed_enablement/v10/fed_resources/system_info"; // v10 instead of v1 + modulepar charstring PX_IOT_API_LIST_DEVICE_INFO := "/iots/v1/registered_devices"; + + modulepar charstring PX_IOT_API_SUB := "/iots/v1/registered_devices"; + } // End of module LibMec_Pixits diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index c8498ab..492d3cd 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -163,7 +163,9 @@ module LibHttp_JsonMessageBodyTypes { SystemInfo systemInfo, // ETSI GS MEC 040 V3.1.1 Clause 6.2.2 Type: SystemInfo SystemInfoList systemInfoList, // ETSI GS MEC 040 V3.1.1 Clause 6.2.2 Type: SystemInfo SystemInfoUpdate systemInfoUpdate, // ETSI GS MEC 040 V3.1.1 Clause 6.2.3 Type: SystemInfoUpdate - // TODO Add here your custom variants + IoTAPI_TypesAndValues.DeviceInfo deviceInfo_iot, // ETSI GS MEC 033 V3.1.1 Clause 6.2.2 Type: DeviceInfo + IoTAPI_TypesAndValues.DeviceInfoList deviceInfoList_iot, // ETSI GS MEC 033 V3.1.1 Clause 6.2.2 Type: DeviceInfo + // TODO Add here your custom variants universal charstring raw } with { variant "" diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn index 700b069..e7e183e 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -1329,6 +1329,34 @@ group ams_api { } // End of group fai + group iot { + + template (value) JsonBody m_body_json_fed_device_info( + in template (value) IoTAPI_TypesAndValues.DeviceInfo p_deviceInfo + ) := { + deviceInfo_iot := p_deviceInfo + } // End of template m_body_json_fed_device_info + + template (present) JsonBody mw_body_json_fed_device_info( + template (present) IoTAPI_TypesAndValues.DeviceInfo p_deviceInfo := ? + ) := { + deviceInfo_iot := p_deviceInfo + } // End of template mw_body_json_fed_device_info + + template (value) JsonBody m_body_json_fed_device_info_list( + in template (value) IoTAPI_TypesAndValues.DeviceInfoList p_deviceInfoList + ) := { + deviceInfoList_iot := p_deviceInfoList + } // End of template m_body_json_fed_device_info_list + + template (present) JsonBody mw_body_json_fed_device_info_list( + template (present) IoTAPI_TypesAndValues.DeviceInfoList p_deviceInfoList := ? + ) := { + deviceInfoList_iot := p_deviceInfoList + } // End of template mw_body_json_fed_device_info_list + + } // End of group iot + group federation { template (value) JsonBody m_body_json_fed_system_info( -- GitLab From a6ace51ee2c5508ba1da432670ff1934ae968dea Mon Sep 17 00:00:00 2001 From: garciay Date: Wed, 9 Aug 2023 15:14:49 +0200 Subject: [PATCH 24/58] Implementation od MEC 033/iotpltf TPs --- ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn | 2640 +++++++++++------ .../AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn | 14 + ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn | 118 +- ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn | 47 +- ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn | 102 + .../IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn | 3 +- ttcn/LibMec/ttcn/LibMec_Pixits.ttcn | 4 + .../ttcn/LibHttp_JsonMessageBodyTypes.ttcn | 2 + .../ttcn/LibHttp_JsonTemplates.ttcn | 36 +- 9 files changed, 2078 insertions(+), 888 deletions(-) diff --git a/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn index 854bb5c..60301b6 100644 --- a/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn +++ b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn @@ -15,6 +15,9 @@ module AtsMec_IoTAPI_TestCases { import from ApplicationPackageLifecycleAndOperationGrantingAPI_Templates all; import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits all; + // LibMec/EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_Templates all; + // LibMec/IoTAPI import from IoTAPI_TypesAndValues all; import from IoTAPI_Templates all; @@ -32,301 +35,293 @@ module AtsMec_IoTAPI_TestCases { group lookup { /** - * @desc Check that the IUT responds with the list of registered IoT devices when queried by a Service Consumer - */ + * @desc Check that the IUT responds with the list of registered IoT devices when queried by a Service Consumer + */ testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var DeviceInfoList v_device_info_list := { - valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), - valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), - valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) - }; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_device_info_list(v_device_info_list); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_fed_device_info_list( - { - mw_device_info( - PX_IOT_DEVICE_ID_1, - PX_IOT_DEVICE_AUTH_1, - -, - PX_IOT_DEVICE_SUPI_1, - PX_IOT_DEVICE_IMSI_1 - ), - mw_device_info( - PX_IOT_DEVICE_ID_2, - PX_IOT_DEVICE_AUTH_2, - -, - PX_IOT_DEVICE_SUPI_2, - PX_IOT_DEVICE_IMSI_2 - ), - mw_device_info( - PX_IOT_DEVICE_ID_3, - PX_IOT_DEVICE_AUTH_3, - -, - PX_IOT_DEVICE_SUPI_3, - PX_IOT_DEVICE_IMSI_3 - ) + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_iot_device_info_list( + { + mw_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + -, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1 + ), + mw_device_info( + PX_IOT_DEVICE_ID_2, + PX_IOT_DEVICE_AUTH_2, + -, + PX_IOT_DEVICE_SUPI_2, + PX_IOT_DEVICE_IMSI_2 + ), + mw_device_info( + PX_IOT_DEVICE_ID_3, + PX_IOT_DEVICE_AUTH_3, + -, + PX_IOT_DEVICE_SUPI_3, + PX_IOT_DEVICE_IMSI_3 + ) } - ))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_device_info_list(v_device_info_list); - f_cf_01_http_down(); + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_01 /** - * @desc Check that the IUT responds with the list of registered IoT devices when queried using a filter by a Service Consumer - */ + * @desc Check that the IUT responds with the list of registered IoT devices when queried using a filter by a Service Consumer + */ testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var DeviceInfoList v_device_info_list := { - valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), - valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), - valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) - }; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_device_info_list(v_device_info_list); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO & "?filter=(eq,enabled,false)", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_fed_device_info_list( - { - mw_device_info( - PX_IOT_DEVICE_ID_2, - PX_IOT_DEVICE_AUTH_2, - -, - PX_IOT_DEVICE_SUPI_2, - PX_IOT_DEVICE_IMSI_2 - ) + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO & "?filter=(eq,enabled,false)", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_iot_device_info_list( + { + mw_device_info( + PX_IOT_DEVICE_ID_2, + PX_IOT_DEVICE_AUTH_2, + -, + PX_IOT_DEVICE_SUPI_2, + PX_IOT_DEVICE_IMSI_2 + ) } - ))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_device_info_list(v_device_info_list); - f_cf_01_http_down(); + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_02 /** - * @desc Check that the IUT responds with the list of registered IoT devices when queried by a Service Consumer filtering one field - */ + * @desc Check that the IUT responds with the list of registered IoT devices when queried by a Service Consumer filtering one field + */ testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_03() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var DeviceInfoList v_device_info_list := { - valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), - valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), - valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) - }; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_device_info_list(v_device_info_list); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO & "?fields=deviceId", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_fed_device_info_list( - { - mw_device_info( - PX_IOT_DEVICE_ID_3, - PX_IOT_DEVICE_AUTH_3, - -, - PX_IOT_DEVICE_SUPI_3, - PX_IOT_DEVICE_IMSI_3 - ) - } - ))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_device_info_list(v_device_info_list); - f_cf_01_http_down(); + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO & "?fields=deviceId", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_iot_device_info_list( + { + mw_device_info( + PX_IOT_DEVICE_ID_3, + PX_IOT_DEVICE_AUTH_3, + -, + PX_IOT_DEVICE_SUPI_3, + PX_IOT_DEVICE_IMSI_3 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_03 /** - * @desc Check that the IUT responds with the list of registered IoT devices when queried by a Service Consumer filtering the number of fields and applying a filter to a specific field - */ + * @desc Check that the IUT responds with the list of registered IoT devices when queried by a Service Consumer filtering the number of fields and applying a filter to a specific field + */ testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_04() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var DeviceInfoList v_device_info_list := { - valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), - valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), - valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) - }; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_device_info_list(v_device_info_list); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO & "?fields=deviceId&filter=(eq,enabled,false)", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_fed_device_info_list( - { - mw_device_info( - PX_IOT_DEVICE_ID_2, - PX_IOT_DEVICE_AUTH_2, - -, - PX_IOT_DEVICE_SUPI_2, - PX_IOT_DEVICE_IMSI_2 - ) + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO & "?fields=deviceId&filter=(eq,enabled,false)", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_iot_device_info_list( + { + mw_device_info( + PX_IOT_DEVICE_ID_2, + PX_IOT_DEVICE_AUTH_2, + -, + PX_IOT_DEVICE_SUPI_2, + PX_IOT_DEVICE_IMSI_2 + ) } - ))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_device_info_list(v_device_info_list); - f_cf_01_http_down(); + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_04 } // End of group lookup @@ -334,266 +329,260 @@ module AtsMec_IoTAPI_TestCases { group subscription { /** - * @desc Check that the IUT registers the information of an IoT device when requested by a Service Consumer - */ + * @desc Check that the IUT registers the information of an IoT device when requested by a Service Consumer + */ testcase TC_MEC_MEC033_IOTS_IOTDEV_002_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_IOT_API_SUB, - v_headers, - m_http_message_body_json( - m_body_json_fed_device_info( - m_device_info( - PX_IOT_DEVICE_ID_1, - PX_IOT_DEVICE_AUTH_1, - -, - PX_IOT_DEVICE_SUPI_1, - PX_IOT_DEVICE_IMSI_1 - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_fed_device_info( - mw_device_info( - PX_IOT_DEVICE_ID_1, - PX_IOT_DEVICE_AUTH_1, - false, - PX_IOT_DEVICE_SUPI_1, - PX_IOT_DEVICE_IMSI_1 - )))))) -> value v_response { - tc_ac.stop; - - if (f_check_headers(valueof(v_response.response.header)) == false) { - log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } else { - log("*** " & testcasename() & ": PASS: IUT successfully create DeviceInfo entry ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_IOT_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_iot_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + -, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1 + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_iot_device_info( + mw_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + false, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1 + )))))) -> value v_response { + tc_ac.stop; + + if (f_check_headers(valueof(v_response.response.header)) == false) { + log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + log("*** " & testcasename() & ": PASS: IUT successfully create DeviceInfo entry ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - } // End of 'alt' statement - - // Postamble - f_delete_device_info(v_response.response.body.json_body.deviceInfo_iot); - f_cf_01_http_down(); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info(v_response.response.body.json_body.deviceInfo_iot); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_002_OK /** - * @desc Check that the IUT returns an error when Service Consumer request to register an IoT device with incorrect parameters - */ + * @desc Check that the IUT returns an error when Service Consumer request to register an IoT device with incorrect parameters + */ testcase TC_MEC_MEC033_IOTS_IOTDEV_002_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_IOT_API_SUB, - v_headers, - m_http_message_body_json( - m_body_json_fed_device_info( - m_device_info( - PX_IOT_DEVICE_ID_1, - PX_IOT_DEVICE_AUTH_1, - false, - PX_IOT_DEVICE_SUPI_1, - PX_IOT_DEVICE_IMSI_1 - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT responds with the correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_device_info(v_response.response.body.json_body.deviceInfo_iot); - f_cf_01_http_down(); + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_IOT_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_iot_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + false, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1 + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_002_BR /** - * @desc Check that the IUT returns the IoT device information when requested by Service Consumer specifying the device identifier - */ + * @desc Check that the IUT returns the IoT device information when requested by Service Consumer specifying the device identifier + */ testcase TC_MEC_MEC033_IOTS_IOTDEV_003_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var DeviceInfoList v_device_info_list := { - valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), - valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), - valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) - }; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_device_info_list(v_device_info_list); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_2, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_fed_device_info( - mw_device_info( - PX_IOT_DEVICE_ID_2, - PX_IOT_DEVICE_AUTH_2, - true, // According to Note 3 of 6.2.2-1 table, it cannot be set directly by the service consumer - PX_IOT_DEVICE_SUPI_2, - PX_IOT_DEVICE_IMSI_2 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct DeviceInfo entry ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_device_info_list(v_device_info_list); - f_cf_01_http_down(); + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_2, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_iot_device_info( + mw_device_info( + PX_IOT_DEVICE_ID_2, + PX_IOT_DEVICE_AUTH_2, + true, // According to Note 3 of 6.2.2-1 table, it cannot be set directly by the service consumer + PX_IOT_DEVICE_SUPI_2, + PX_IOT_DEVICE_IMSI_2 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct DeviceInfo entry ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_003_OK /** - * @desc Check that the IUT returns the IoT device information when requested by Service Consumer specifying the device identifier - */ + * @desc Check that the IUT returns the IoT device information when requested by Service Consumer specifying the device identifier + */ testcase TC_MEC_MEC033_IOTS_IOTDEV_003_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var DeviceInfoList v_device_info_list := { - valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), - valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), - valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) - }; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_device_info_list(v_device_info_list); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_device_info_list(v_device_info_list); - f_cf_01_http_down(); + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_003_NF } // End of group subscribe @@ -601,262 +590,260 @@ module AtsMec_IoTAPI_TestCases { group patch { /** - * @desc Check that the IUT updates the information about a registered IoT device when requested by a Service Consumer - */ + * @desc Check that the IUT updates the information about a registered IoT device when requested by a Service Consumer + */ testcase TC_MEC_MEC033_IOTS_IOTDEV_004_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var DeviceInfoList v_device_info_list := { - valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), - valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), - valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) - }; - var TrafficRuleDescriptor v_traffic_rule_descriptor := valueof( - m_traffic_rule_descriptor( - PX_TRAFFIC_RULE_ID, - PX_TRAFFIC_FILTERTYPE, - PX_TRAFFIC_RULE_PRIORITY, - m_traffic_filter( - PX_TRAFFIC_FILTER_SRC_ADDRESS, - PX_TRAFFIC_FILTER_DST_ADDRESS, - PX_TRAFFIC_FILTER_SRC_PORT, - PX_TRAFFIC_FILTER_DST_PORT, - PX_TRAFFIC_FILTER_PROTOCOL - ), - PX_TRAFFIC_RULE_ACTION - )); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_device_info_list(v_device_info_list); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_patch( + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + var TrafficRuleDescriptor v_traffic_rule_descriptor := valueof( + m_traffic_rule_descriptor( + PX_TRAFFIC_RULE_ID, + PX_TRAFFIC_FILTERTYPE, + PX_TRAFFIC_RULE_PRIORITY, + m_traffic_filter( + PX_TRAFFIC_FILTER_SRC_ADDRESS, + PX_TRAFFIC_FILTER_DST_ADDRESS, + PX_TRAFFIC_FILTER_SRC_PORT, + PX_TRAFFIC_FILTER_DST_PORT, + PX_TRAFFIC_FILTER_PROTOCOL + ), + PX_TRAFFIC_RULE_ACTION + )); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_1, "UTF-8")), v_headers, m_http_message_body_json( - m_body_json_fed_device_info( - m_device_info( - PX_IOT_DEVICE_ID_1, - PX_IOT_DEVICE_AUTH_1, - -, - PX_IOT_DEVICE_SUPI_1, - PX_IOT_DEVICE_IMSI_1, - PX_REQUESTED_PLTF_ID, - {v_traffic_rule_descriptor} - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_fed_device_info( - mw_device_info( - PX_IOT_DEVICE_ID_1, - PX_IOT_DEVICE_AUTH_1, - -, - PX_IOT_DEVICE_SUPI_1, - PX_IOT_DEVICE_IMSI_1, - PX_REQUESTED_PLTF_ID, - {v_traffic_rule_descriptor} - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully updates DeviceInfo entry ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_device_info_list(v_device_info_list); - f_cf_01_http_down(); + m_body_json_iot_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + -, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1, + PX_REQUESTED_PLTF_ID, + {v_traffic_rule_descriptor} + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_iot_device_info( + mw_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + -, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1, + PX_REQUESTED_PLTF_ID, + {v_traffic_rule_descriptor} + )))))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates DeviceInfo entry ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_004_OK /** - * @desc Check that the IUT returns an error when a Service Consumer requests to update a not registered IoT device - */ + * @desc Check that the IUT returns an error when a Service Consumer requests to update a not registered IoT device + */ testcase TC_MEC_MEC033_IOTS_IOTDEV_004_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var DeviceInfoList v_device_info_list := { - valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), - valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), - valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) - }; - var TrafficRuleDescriptor v_traffic_rule_descriptor := valueof( - m_traffic_rule_descriptor( - PX_TRAFFIC_RULE_ID, - PX_TRAFFIC_FILTERTYPE, - PX_TRAFFIC_RULE_PRIORITY, - m_traffic_filter( - PX_TRAFFIC_FILTER_SRC_ADDRESS, - PX_TRAFFIC_FILTER_DST_ADDRESS, - PX_TRAFFIC_FILTER_SRC_PORT, - PX_TRAFFIC_FILTER_DST_PORT, - PX_TRAFFIC_FILTER_PROTOCOL - ), - PX_TRAFFIC_RULE_ACTION - )); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_device_info_list(v_device_info_list); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_patch( - PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_fed_device_info( - m_device_info( - PX_IOT_DEVICE_ID_1, - PX_IOT_DEVICE_AUTH_1, - -, - PX_IOT_DEVICE_SUPI_1, - PX_IOT_DEVICE_IMSI_1, - PX_REQUESTED_PLTF_ID, - {v_traffic_rule_descriptor} - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_device_info_list(v_device_info_list); - f_cf_01_http_down(); + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + var TrafficRuleDescriptor v_traffic_rule_descriptor := valueof( + m_traffic_rule_descriptor( + PX_TRAFFIC_RULE_ID, + PX_TRAFFIC_FILTERTYPE, + PX_TRAFFIC_RULE_PRIORITY, + m_traffic_filter( + PX_TRAFFIC_FILTER_SRC_ADDRESS, + PX_TRAFFIC_FILTER_DST_ADDRESS, + PX_TRAFFIC_FILTER_SRC_PORT, + PX_TRAFFIC_FILTER_DST_PORT, + PX_TRAFFIC_FILTER_PROTOCOL + ), + PX_TRAFFIC_RULE_ACTION + )); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_iot_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + -, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1, + PX_REQUESTED_PLTF_ID, + {v_traffic_rule_descriptor} + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_004_NF /** - * @desc Check that the IUT returns an error when Service Consumer request to register an IoT device with incorrect parameters - */ + * @desc Check that the IUT returns an error when Service Consumer request to register an IoT device with incorrect parameters + */ testcase TC_MEC_MEC033_IOTS_IOTDEV_004_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var DeviceInfoList v_device_info_list := { - valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), - valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), - valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) - }; - var TrafficRuleDescriptor v_traffic_rule_descriptor := valueof( - m_traffic_rule_descriptor( - PX_TRAFFIC_RULE_ID, - PX_TRAFFIC_FILTERTYPE, - PX_TRAFFIC_RULE_PRIORITY, - m_traffic_filter( - PX_TRAFFIC_FILTER_SRC_ADDRESS, - PX_TRAFFIC_FILTER_DST_ADDRESS, - PX_TRAFFIC_FILTER_SRC_PORT, - PX_TRAFFIC_FILTER_DST_PORT, - PX_TRAFFIC_FILTER_PROTOCOL - ), - PX_TRAFFIC_RULE_ACTION - )); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_device_info_list(v_device_info_list); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_patch( + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + var TrafficRuleDescriptor v_traffic_rule_descriptor := valueof( + m_traffic_rule_descriptor( + PX_TRAFFIC_RULE_ID, + PX_TRAFFIC_FILTERTYPE, + PX_TRAFFIC_RULE_PRIORITY, + m_traffic_filter( + PX_TRAFFIC_FILTER_SRC_ADDRESS, + PX_TRAFFIC_FILTER_DST_ADDRESS, + PX_TRAFFIC_FILTER_SRC_PORT, + PX_TRAFFIC_FILTER_DST_PORT, + PX_TRAFFIC_FILTER_PROTOCOL + ), + PX_TRAFFIC_RULE_ACTION + )); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "UTF-8")), v_headers, m_http_message_body_json( - m_body_json_fed_device_info( - m_device_info( - PX_IOT_DEVICE_ID_1, - PX_IOT_DEVICE_AUTH_1, - true, // According to Note 3 of 6.2.2-1 table, it cannot be set directly by the service consumer - PX_IOT_DEVICE_SUPI_1, - PX_IOT_DEVICE_IMSI_1, - PX_REQUESTED_PLTF_ID, - {v_traffic_rule_descriptor} - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_device_info_list(v_device_info_list); - f_cf_01_http_down(); + m_body_json_iot_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + true, // According to Note 3 of 6.2.2-1 table, it cannot be set directly by the service consumer + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1, + PX_REQUESTED_PLTF_ID, + {v_traffic_rule_descriptor} + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_004_BR } // End of group patch @@ -864,120 +851,120 @@ module AtsMec_IoTAPI_TestCases { group delete { /** - * @desc Check that the IUT deregisters an IoT device information when requested by a Service Consumer specifying the IoT registered device identifier - */ + * @desc Check that the IUT deregisters an IoT device information when requested by a Service Consumer specifying the IoT registered device identifier + */ testcase TC_MEC_MEC033_IOTS_IOTDEV_005_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var DeviceInfoList v_device_info_list := { - valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), - valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), - valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) - }; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_device_info_list(v_device_info_list); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_2, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 code ***"); - v_device_info_list[1].deviceId := ""; - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_device_info_list(v_device_info_list); - f_cf_01_http_down(); + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_2, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 code ***"); + v_device_info_list[1].deviceId := ""; + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_005_OK /** - * @desc Check that the IUT deregisters an IoT device information when requested by a Service Consumer specifying the IoT registered device identifier - */ + * @desc Check that the IUT deregisters an IoT device information when requested by a Service Consumer specifying the IoT registered device identifier + */ testcase TC_MEC_MEC033_IOTS_IOTDEV_005_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var DeviceInfoList v_device_info_list := { - valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), - valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), - valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) - }; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_device_info_list(v_device_info_list); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_device_info_list(v_device_info_list); - f_cf_01_http_down(); + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_device_info_list(v_device_info_list); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_005_NF } // End of group delete @@ -986,6 +973,909 @@ module AtsMec_IoTAPI_TestCases { group iotpltf { + group lookup { + + /** + * @desc Check that the IUT responds with the list of registered IoT platforms when queried by a Service Consumer + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var IotPlatformInfoList v_iot_platform_list := { + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_3, + PX_MB_TRANSPORTINFO_NAME_3, + PX_MB_TRANSPORTINFO_TYPE_3, + PX_MB_TRANSPORTINFO_PROTOCOL_3, + PX_MB_TRANSPORTINFO_VERSION_3, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }), + m_security_info, + m_impl_specific_info + ) + } + )) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_iot_platform_info_list(v_iot_platform_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_INFO, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_iot_iot_platform_info_list( + v_iot_platform_list + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_iot_platform_info_list(v_iot_platform_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_001_OK + + } // End of group lookup + + group subscribe { + + /** + * @desc Check that the IUT registers the information of a new IoT platform when requested by a Service Consumer + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB, + v_headers, + m_http_message_body_json( + m_body_json_iot_iot_platform_info( + m_iot_platform_info( + PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_iot_iot_platform_info( + mw_iot_platform_info( + PX_IOT_PLTF_ID_1, + { + mw_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + mw_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + mw_security_info, + mw_impl_specific_info + ) + } + )))))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a IotPlatformInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_iot_platform_info(v_response.response.body.json_body.iotPlatformInfo); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_OK + + /** + * @desc Check that the IUT returns an error when Service Consumer request to register an IoT device with incorrect parameters + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB, + v_headers, + m_http_message_body_json( + m_body_json_iot_iot_platform_info( + m_iot_platform_info_error( + PX_IOT_PLTF_ID_1 + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_BR + + /** + * @desc Check that the IUT returns the IoT platform information when requested by Service Consumer specifying the IoT platform identifier + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var IotPlatformInfoList v_iot_platform_list := { + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_3, + PX_MB_TRANSPORTINFO_NAME_3, + PX_MB_TRANSPORTINFO_TYPE_3, + PX_MB_TRANSPORTINFO_PROTOCOL_3, + PX_MB_TRANSPORTINFO_VERSION_3, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }), + m_security_info, + m_impl_specific_info + ) + } + )) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_iot_platform_info_list(v_iot_platform_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_2, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_iot_iot_platform_info( + m_iot_platform_info( + PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct IotPlatformInfo entry ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_iot_platform_info_list(v_iot_platform_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_OK + + /** + * @desc Check that the IUT returns error when Service Consumer request to retrieve a not registered IoT platform + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var IotPlatformInfoList v_iot_platform_list := { + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_3, + PX_MB_TRANSPORTINFO_NAME_3, + PX_MB_TRANSPORTINFO_TYPE_3, + PX_MB_TRANSPORTINFO_PROTOCOL_3, + PX_MB_TRANSPORTINFO_VERSION_3, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }), + m_security_info, + m_impl_specific_info + ) + } + )) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_iot_platform_info_list(v_iot_platform_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_UNKNOWN, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_iot_platform_info_list(v_iot_platform_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_NF + + } // End of group subscribe + + group patch { + + /** + * @desc Check that the IUT updates the information about a registered IoT platform when requested by a Service Consumer + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var IotPlatformInfoList v_iot_platform_list := { + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_3, + PX_MB_TRANSPORTINFO_NAME_3, + PX_MB_TRANSPORTINFO_TYPE_3, + PX_MB_TRANSPORTINFO_PROTOCOL_3, + PX_MB_TRANSPORTINFO_VERSION_3, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }), + m_security_info, + m_impl_specific_info + ) + } + )) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_iot_platform_info_list(v_iot_platform_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_2, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_iot_iot_platform_info( + m_iot_platform_info( + PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1 & "_patch", + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1, PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_iot_iot_platform_info( + m_iot_platform_info( + PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1 & "_patch", + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1, PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct IotPlatformInfo entry ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_iot_platform_info_list(v_iot_platform_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_OK + + /** + * @desc Check that the IUT returns an error when a Service Consumer requests to update a not registered IoT platform + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var IotPlatformInfoList v_iot_platform_list := { + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_3, + PX_MB_TRANSPORTINFO_NAME_3, + PX_MB_TRANSPORTINFO_TYPE_3, + PX_MB_TRANSPORTINFO_PROTOCOL_3, + PX_MB_TRANSPORTINFO_VERSION_3, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }), + m_security_info, + m_impl_specific_info + ) + } + )) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_iot_platform_info_list(v_iot_platform_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_UNKNOWN, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_iot_iot_platform_info( + m_iot_platform_info( + PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1 & "_patch", + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1, PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct IotPlatformInfo entry ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_iot_platform_info_list(v_iot_platform_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_NF + + } // End of group patch + + group delete { + + /** + * @desc Check that the IUT deregisters an IoT platform information when requested by a Service Consumer specifying the registered IoT platform identifier + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var IotPlatformInfoList v_iot_platform_list := { + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_3, + PX_MB_TRANSPORTINFO_NAME_3, + PX_MB_TRANSPORTINFO_TYPE_3, + PX_MB_TRANSPORTINFO_PROTOCOL_3, + PX_MB_TRANSPORTINFO_VERSION_3, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }), + m_security_info, + m_impl_specific_info + ) + } + )) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_iot_platform_info_list(v_iot_platform_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_2, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct success code ***"); + v_iot_platform_list[1].iotPlatformId := ""; + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_iot_platform_info_list(v_iot_platform_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_OK + + /** + * @desc Check that the IUT returns an error when a Service Consumer request to deregister an IoT platform using incorrect parameters + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var IotPlatformInfoList v_iot_platform_list := { + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_3, + PX_MB_TRANSPORTINFO_NAME_3, + PX_MB_TRANSPORTINFO_TYPE_3, + PX_MB_TRANSPORTINFO_PROTOCOL_3, + PX_MB_TRANSPORTINFO_VERSION_3, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }), + m_security_info, + m_impl_specific_info + ) + } + )) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_iot_platform_info_list(v_iot_platform_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_UNKNOWN, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_iot_platform_info_list(v_iot_platform_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_NF + + } // End of group delete + } // End of group iotpltf } // End of module AtsMec_IoTAPI_TestCases diff --git a/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn index 1cec745..70941a0 100644 --- a/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn +++ b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn @@ -31,6 +31,20 @@ module AtsMec_IoTAPI_TestControl { execute(TC_MEC_MEC033_IOTS_IOTDEV_005_OK()); execute(TC_MEC_MEC033_IOTS_IOTDEV_005_NF()); + + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_001_OK()); + + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_OK()); + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_BR()); + + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_OK()); + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_NF()); + + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_OK()); + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_NF()); + + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_OK()); + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_NF()); } } diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn index b728f05..b338fce 100644 --- a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn @@ -16,7 +16,10 @@ module IoTAPI_Functions { import from LibHttp_JsonTemplates all; import from LibHttp_TestSystem all; - // LibMec/FixedAccessInformationServiceAPI + // LibMec/EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_Templates all; + + // LibMec/IoTAPI import from IoTAPI_TypesAndValues all; import from IoTAPI_Templates all; import from IoTAPI_Pixits all; @@ -40,7 +43,7 @@ module IoTAPI_Functions { PICS_ROOT_API & PX_IOT_API_SUB, v_headers, m_http_message_body_json( - m_body_json_fed_device_info( + m_body_json_iot_device_info( m_device_info( PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, @@ -54,7 +57,7 @@ module IoTAPI_Functions { mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_fed_device_info( + mw_body_json_iot_device_info( mw_device_info( PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, @@ -120,4 +123,113 @@ module IoTAPI_Functions { } } // End of function f_delete_device_info_list + function f_create_iot_platform_info( + out IotPlatformInfo p_iot_platform_info + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB, + v_headers, + m_http_message_body_json( + m_body_json_iot_iot_platform_info( + m_iot_platform_info( + PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_iot_iot_platform_info( + mw_iot_platform_info( + PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )))))) -> value v_response { + tc_ac.stop; + + p_iot_platform_info := v_response.response.body.json_body.iotPlatformInfo; + log("f_create_iot_platform_info: INFO: IUT successfully responds to the subscription: ", p_iot_platform_info); + } + [] tc_ac.timeout { + log("f_create_iot_platform_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_iot_platform_info + + function f_delete_iot_platform_info( + in IotPlatformInfo p_iot_platform_info + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(p_iot_platform_info.iotPlatformId, "UTF-8")), + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_iot_platform_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_iot_platform_info + + function f_create_iot_platform_info_list( + out IotPlatformInfoList p_iot_platform_info_list + ) runs on HttpComponent { + for (var integer i := 0; i < lengthof(p_iot_platform_info_list); i := i + 1) { + f_create_iot_platform_info(p_iot_platform_info_list[i]); + } + } // End of function f_create_iot_platform_info_list + + function f_delete_iot_platform_info_list( + in IotPlatformInfoList p_iot_platform_info_list + ) runs on HttpComponent { + for (var integer i := 0; i < lengthof(p_iot_platform_info_list); i := i + 1) { + if (p_iot_platform_info_list[i].iotPlatformId != "") { + f_delete_iot_platform_info(p_iot_platform_info_list[i]); + } + } + } // End of function f_delete_iot_platform_info_list + } // End of modue IoTAPI_Functions \ No newline at end of file diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn index cc315ae..1d9f8ed 100644 --- a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn @@ -6,8 +6,8 @@ module IoTAPI_Pixits { // LibCommon import from LibCommon_BasicTypesAndValues all; - // LibMec/FixedAccessInformationServiceAPI - import from FederationEnablementAPI_TypesAndValues all; + // LibMec/EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; modulepar Json.String PX_IOT_DEVICE_ID_1 := ""; @@ -43,4 +43,45 @@ module IoTAPI_Pixits { modulepar Json.String PX_REQUESTED_PLTF_ID := ""; -} // End of IoTAPI_Pixits + modulepar Json.String PX_IOT_PLTF_ID_1 := ""; + + modulepar Json.String PX_IOT_PLTF_ID_2 := ""; + + modulepar Json.String PX_IOT_PLTF_ID_3 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_ID_1 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_NAME_1 := ""; + + modulepar EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType PX_MB_TRANSPORTINFO_TYPE_1 + := REST_HTTP; + + modulepar Json.String PX_MB_TRANSPORTINFO_PROTOCOL_1 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_VERSION_1 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_ID_2 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_NAME_2 := ""; + + modulepar EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType PX_MB_TRANSPORTINFO_TYPE_2 + := REST_HTTP; + + modulepar Json.String PX_MB_TRANSPORTINFO_PROTOCOL_2 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_VERSION_2 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_ID_3 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_NAME_3 := ""; + + modulepar EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType PX_MB_TRANSPORTINFO_TYPE_3 + := REST_HTTP; + + modulepar Json.String PX_MB_TRANSPORTINFO_PROTOCOL_3 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_VERSION_3 := ""; + + modulepar Json.String PX_IOT_PLTF_ID_UNKNOWN := ""; + +} // End of module IoTAPI_Pixits \ No newline at end of file diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn index 040323d..12199bd 100644 --- a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn @@ -87,4 +87,106 @@ module IoTAPI_Templates { enabled := p_enabled } // End of template mw_device_info + template (omit) IotPlatformInfo m_iot_platform_info( + in Json.String p_iotPlatformId, + in template (value) MBTransportInfoList p_userTransportInfo, + in Json.Bool p_enabled := false, + in template (omit) EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfoList p_customServicesTransportInfo := omit + + ) := { + iotPlatformId := p_iotPlatformId, + userTransportInfo := p_userTransportInfo, + customServicesTransportInfo := p_customServicesTransportInfo, + enabled := p_enabled + } // End of template m_iot_platform_info + + template (omit) IotPlatformInfo m_iot_platform_info_error( + in Json.String p_iotPlatformId, + in Json.Bool p_enabled := false, + in template (omit) EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfoList p_customServicesTransportInfo := omit + + ) := { + iotPlatformId := p_iotPlatformId, + userTransportInfo := omit, + customServicesTransportInfo := p_customServicesTransportInfo, + enabled := p_enabled + } // End of template m_iot_platform_info_error + + template (present) IotPlatformInfo mw_iot_platform_info( + template (present) Json.String p_iotPlatformId := ?, + template (present) MBTransportInfoList p_userTransportInfo := ?, + template (present) Json.Bool p_enabled := ?, + template EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfoList p_customServicesTransportInfo := * + + ) := { + iotPlatformId := p_iotPlatformId, + userTransportInfo := p_userTransportInfo, + customServicesTransportInfo := p_customServicesTransportInfo, + enabled := p_enabled + } // End of template mw_iot_platform_info + + template (omit) MBTransportInfo m_mb_transport_info( + in Json.String p_id, + in Json.String p_name, + in EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType p_type, + in Json.String p_protocol, + in Json.String p_version, + in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.EndPointInfo p_endpoint, + in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo p_security, + in template (value) ImplSpecificInfo p_implSpecificInfo, + in template (omit) Json.String p_description := omit + ) := { + id := p_id, + name := p_name, + description := p_description, + type_ := p_type, + protocol := p_protocol, + version := p_version, + endpoint := p_endpoint, + security := p_security, + implSpecificInfo := p_implSpecificInfo + } // End of template m_mb_transport_info + + template (present) MBTransportInfo mw_mb_transport_info( + template (present) Json.String p_id := ?, + template (present) Json.String p_name := ?, + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType p_type := ?, + template (present) Json.String p_protocol := ?, + template (present) Json.String p_version := ?, + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.EndPointInfo p_endpoint := ?, + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo p_security := ?, + template (present) ImplSpecificInfo p_implSpecificInfo := ?, + template Json.String p_description := * + ) := { + id := p_id, + name := p_name, + description := p_description, + type_ := p_type, + protocol := p_protocol, + version := p_version, + endpoint := p_endpoint, + security := p_security, + implSpecificInfo := p_implSpecificInfo + } // End of template mw_mb_transport_info + + template (omit) ImplSpecificInfo m_impl_specific_info( + in template (omit) EventTopics p_eventTopics := omit, + in template (omit) UplinkTopics p_uplinkTopics := omit, + in template (omit) DownlinkTopics p_downlinkTopics := omit + ) := { + eventTopics := p_eventTopics, + uplinkTopics := p_uplinkTopics, + downlinkTopics := p_downlinkTopics + } // End of template m_impl_specific_info + + template ImplSpecificInfo mw_impl_specific_info( + template EventTopics p_eventTopics := *, + template UplinkTopics p_uplinkTopics := *, + template DownlinkTopics p_downlinkTopics := * + ) := { + eventTopics := p_eventTopics, + uplinkTopics := p_uplinkTopics, + downlinkTopics := p_downlinkTopics + } // End of template mw_impl_specific_info + } // End of IoTAPI_Templates diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn index 185df84..20fe1aa 100644 --- a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn @@ -89,10 +89,11 @@ module IoTAPI_TypesAndValues { */ type record IotPlatformInfo { Json.String iotPlatformId, - MBTransportInfoList userTransportInfo, + MBTransportInfoList userTransportInfo optional, // optional on;ly for the 400 Bad Request TP TransportInfoList customServicesTransportInfo optional, Json.Bool enabled } // End of IotPlatformInfo + type record of IotPlatformInfo IotPlatformInfoList; /** * @desc User transport based on a message bus diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index 8f29c11..385e889 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -96,4 +96,8 @@ module LibMec_Pixits { modulepar charstring PX_IOT_API_SUB := "/iots/v1/registered_devices"; + modulepar charstring PX_IOT_API_LIST_PLTF_INFO := "/iots/v1/registered_iot_platforms"; + + modulepar charstring PX_IOT_API_LIST_PLTF_SUB := "/iots/v1/registered_iot_platforms"; + } // End of module LibMec_Pixits diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index 492d3cd..124821a 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -165,6 +165,8 @@ module LibHttp_JsonMessageBodyTypes { SystemInfoUpdate systemInfoUpdate, // ETSI GS MEC 040 V3.1.1 Clause 6.2.3 Type: SystemInfoUpdate IoTAPI_TypesAndValues.DeviceInfo deviceInfo_iot, // ETSI GS MEC 033 V3.1.1 Clause 6.2.2 Type: DeviceInfo IoTAPI_TypesAndValues.DeviceInfoList deviceInfoList_iot, // ETSI GS MEC 033 V3.1.1 Clause 6.2.2 Type: DeviceInfo + IotPlatformInfoList iotPlatformInfoList, // ETSI GS MEC 033 V3.1.1 Clause 6.2.3 Type: IotPlatformInfo + IotPlatformInfo iotPlatformInfo, // ETSI GS MEC 033 V3.1.1 Clause 6.2.3 Type: IotPlatformInfo // TODO Add here your custom variants universal charstring raw } with { diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn index e7e183e..d6fa9dd 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -1331,17 +1331,17 @@ group ams_api { group iot { - template (value) JsonBody m_body_json_fed_device_info( + template (value) JsonBody m_body_json_iot_device_info( in template (value) IoTAPI_TypesAndValues.DeviceInfo p_deviceInfo ) := { deviceInfo_iot := p_deviceInfo - } // End of template m_body_json_fed_device_info + } // End of template m_body_json_iot_device_info - template (present) JsonBody mw_body_json_fed_device_info( + template (present) JsonBody mw_body_json_iot_device_info( template (present) IoTAPI_TypesAndValues.DeviceInfo p_deviceInfo := ? ) := { deviceInfo_iot := p_deviceInfo - } // End of template mw_body_json_fed_device_info + } // End of template mw_body_json_iot_device_info template (value) JsonBody m_body_json_fed_device_info_list( in template (value) IoTAPI_TypesAndValues.DeviceInfoList p_deviceInfoList @@ -1349,11 +1349,35 @@ group ams_api { deviceInfoList_iot := p_deviceInfoList } // End of template m_body_json_fed_device_info_list - template (present) JsonBody mw_body_json_fed_device_info_list( + template (present) JsonBody mw_body_json_iot_device_info_list( template (present) IoTAPI_TypesAndValues.DeviceInfoList p_deviceInfoList := ? ) := { deviceInfoList_iot := p_deviceInfoList - } // End of template mw_body_json_fed_device_info_list + } // End of template mw_body_json_iot_device_info_list + + template (value) JsonBody m_body_json_iot_iot_platform_info( + in template (value) IotPlatformInfo p_iotPlatformInfo + ) := { + iotPlatformInfo := p_iotPlatformInfo + } // End of template m_body_json_iot_iot_platform_info + + template (present) JsonBody mw_body_json_iot_iot_platform_info( + template (present) IotPlatformInfo p_iotPlatformInfo := ? + ) := { + iotPlatformInfo := p_iotPlatformInfo + } // End of template mw_body_json_iot_iot_platform_info + + template (value) JsonBody m_body_json_iot_iot_platform_info_list( + in template (value) IotPlatformInfoList p_iotPlatformInfoList + ) := { + iotPlatformInfoList := p_iotPlatformInfoList + } // End of template m_body_json_iot_iot_platform_info_list + + template (present) JsonBody mw_body_json_iot_iot_platform_info_list( + template (present) IotPlatformInfoList p_iotPlatformInfoList := ? + ) := { + iotPlatformInfoList := p_iotPlatformInfoList + } // End of template mw_body_json_iot_iot_platform_info_list } // End of group iot -- GitLab From f69de71a232c23ce083ba196306a8bd75b28a665 Mon Sep 17 00:00:00 2001 From: garciay Date: Wed, 13 Sep 2023 08:15:14 +0200 Subject: [PATCH 25/58] Bug fixed in TP_MEC_MEC040_SRV_MEF_003_NF/BR --- gs032p3-ttcn-test-suite.code-workspace | 3 + ...Mec_FederationEnablementAPI_TestCases.ttcn | 59 +++++++++++++++++++ ...c_FederationEnablementAPI_TestControl.ttcn | 1 + 3 files changed, 63 insertions(+) diff --git a/gs032p3-ttcn-test-suite.code-workspace b/gs032p3-ttcn-test-suite.code-workspace index 6894bd4..da72d48 100644 --- a/gs032p3-ttcn-test-suite.code-workspace +++ b/gs032p3-ttcn-test-suite.code-workspace @@ -5,6 +5,9 @@ }, { "path": "../gs032p2-test-purposes" + }, + { + "path": "../eurecom" } ], "settings": { diff --git a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn index 7030ecd..cda5f3b 100644 --- a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn +++ b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn @@ -1349,6 +1349,65 @@ module AtsMec_FederationEnablementAPI_TestCases { f_cf_01_http_down(); } // End of testcase TC_MEC_MEC040_SRV_MEF_003_NF + /** + * @desc Check that the IUT responds with an error when it receives a request with an inconsistant URI + */ + testcase TC_MEC_MEC040_SRV_MEF_003_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_SUB_WRONG & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_1, "UTF-8")), // Inconsistent URI + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_003_BR + } // End of group subscription group patch { diff --git a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn index 2f973bc..f5634c7 100644 --- a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn +++ b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn @@ -38,6 +38,7 @@ module AtsMec_FederationEnablementAPI_TestControl { execute(TC_MEC_MEC040_SRV_MEF_003_OK()); execute(TC_MEC_MEC040_SRV_MEF_003_NF()); + execute(TC_MEC_MEC040_SRV_MEF_003_BR()); execute(TC_MEC_MEC040_SRV_MEF_004_OK_01()); execute(TC_MEC_MEC040_SRV_MEF_004_OK_02()); -- GitLab From 3cd64eefa0d7d10aa3b1a5eb8b104e074106bf95 Mon Sep 17 00:00:00 2001 From: garciay Date: Tue, 31 Oct 2023 08:47:05 +0100 Subject: [PATCH 26/58] Rename AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting into AtsMec_ApplicationPackageLifecycleAndOperationGranting --- .../AtsMec_Ams/AtsMec_Ams_TestCases.ttcn | 48 +++---- ...ycleAndOperationGrantingAPI_TestCases.ttcn | 122 +++++++++--------- ...leAndOperationGrantingAPI_TestControl.ttcn | 0 .../module.mk | 0 .../module/demo/HTTP_Test_no_ASPs.ttcn | 2 +- .../ttcn/LibCommon_Sync.ttcn | 2 +- 6 files changed, 87 insertions(+), 87 deletions(-) rename ttcn/{AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting => AtsMec_ApplicationPackageLifecycleAndOperationGranting}/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn (98%) rename ttcn/{AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting => AtsMec_ApplicationPackageLifecycleAndOperationGranting}/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn (100%) rename ttcn/{AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting => AtsMec_ApplicationPackageLifecycleAndOperationGranting}/module.mk (100%) diff --git a/ttcn/AtsMec/AtsMec_Ams/AtsMec_Ams_TestCases.ttcn b/ttcn/AtsMec/AtsMec_Ams/AtsMec_Ams_TestCases.ttcn index 4778a5e..7044065 100644 --- a/ttcn/AtsMec/AtsMec_Ams/AtsMec_Ams_TestCases.ttcn +++ b/ttcn/AtsMec/AtsMec_Ams/AtsMec_Ams_TestCases.ttcn @@ -46,7 +46,7 @@ var HttpMessage v_response; // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -109,7 +109,7 @@ var Headers v_headers; // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -161,7 +161,7 @@ */ testcase TC_MEC_MEC012_SRV_AMS_002_OK() runs on HttpComponent system HttpTestAdapter { var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -239,7 +239,7 @@ */ testcase TC_MEC_MEC012_SRV_AMS_002_BR() runs on HttpComponent system HttpTestAdapter { var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -315,7 +315,7 @@ var HttpMessage v_response; // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -367,7 +367,7 @@ var Headers v_headers; // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -418,7 +418,7 @@ var HttpMessage v_response; // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -494,7 +494,7 @@ var Headers v_headers; // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -554,7 +554,7 @@ var Headers v_headers; // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -617,7 +617,7 @@ var HttpMessage v_response; // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -665,7 +665,7 @@ var Headers v_headers; // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -718,7 +718,7 @@ var HttpMessage v_response; // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -783,7 +783,7 @@ var HttpMessage v_response; // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -835,7 +835,7 @@ */ testcase TC_MEC_MEC012_SRV_AMS_003_OK() runs on HttpComponent system HttpTestAdapter { var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -898,7 +898,7 @@ */ testcase TC_MEC_MEC012_SRV_AMS_003_BR() runs on HttpComponent system HttpTestAdapter { var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -959,7 +959,7 @@ */ testcase TC_MEC_MEC012_SRV_AMS_004_OK() runs on HttpComponent system HttpTestAdapter { var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -1035,7 +1035,7 @@ */ testcase TC_MEC_MEC012_SRV_AMS_004_BR() runs on HttpComponent system HttpTestAdapter { var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -1107,7 +1107,7 @@ */ testcase TC_MEC_MEC012_SRV_AMS_005_OK() runs on HttpComponent system HttpTestAdapter { var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -1163,7 +1163,7 @@ */ testcase TC_MEC_MEC012_SRV_AMS_005_NF() runs on HttpComponent system HttpTestAdapter { var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -1221,7 +1221,7 @@ */ testcase TC_MEC_MEC012_SRV_AMS_006_OK() runs on HttpComponent system HttpTestAdapter { var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -1271,7 +1271,7 @@ */ testcase TC_MEC_MEC012_SRV_AMS_006_NF() runs on HttpComponent system HttpTestAdapter { var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -1329,7 +1329,7 @@ */ testcase TC_MEC_MEC012_SRV_AMS_007_OK() runs on HttpComponent system HttpTestAdapter { var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -1395,7 +1395,7 @@ */ testcase TC_MEC_MEC012_SRV_AMS_007_BR() runs on HttpComponent system HttpTestAdapter { var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; @@ -1459,7 +1459,7 @@ */ testcase TC_MEC_MEC012_SRV_AMS_007_NF() runs on HttpComponent system HttpTestAdapter { var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; diff --git a/ttcn/AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn similarity index 98% rename from ttcn/AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn rename to ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn index 1f1e4af..4d9627b 100644 --- a/ttcn/AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn @@ -45,7 +45,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -109,7 +109,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var Headers v_headers; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -166,7 +166,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -232,7 +232,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response_2; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -310,7 +310,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -361,7 +361,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -424,7 +424,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -479,7 +479,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var Headers v_headers; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -530,7 +530,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -597,7 +597,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var Headers v_headers; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -653,7 +653,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -704,7 +704,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -755,7 +755,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var Headers v_headers; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -804,7 +804,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -857,7 +857,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -911,7 +911,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -960,7 +960,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1010,7 +1010,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1059,7 +1059,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1117,7 +1117,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1171,7 +1171,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1224,7 +1224,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1284,7 +1284,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1338,7 +1338,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1389,7 +1389,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1445,7 +1445,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1494,7 +1494,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1544,7 +1544,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1594,7 +1594,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1641,7 +1641,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1692,7 +1692,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1742,7 +1742,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1793,7 +1793,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1844,7 +1844,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1893,7 +1893,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1946,7 +1946,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1997,7 +1997,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2048,7 +2048,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var Headers v_headers; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2097,7 +2097,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2150,7 +2150,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2204,7 +2204,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2253,7 +2253,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2313,7 +2313,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2367,7 +2367,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2418,7 +2418,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2474,7 +2474,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2523,7 +2523,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2573,7 +2573,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2623,7 +2623,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2670,7 +2670,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2721,7 +2721,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2775,7 +2775,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2832,7 +2832,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2889,7 +2889,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2949,7 +2949,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -3006,7 +3006,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -3057,7 +3057,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -3108,7 +3108,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -3164,7 +3164,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -3211,7 +3211,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -3258,7 +3258,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; diff --git a/ttcn/AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn similarity index 100% rename from ttcn/AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn rename to ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn diff --git a/ttcn/AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting/module.mk b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/module.mk similarity index 100% rename from ttcn/AtsMec_AtsMec_ApplicationPackageLifecycleAndOperationGranting/module.mk rename to ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/module.mk diff --git a/ttcn/modules/titan.TestPorts.HTTPmsg/module/demo/HTTP_Test_no_ASPs.ttcn b/ttcn/modules/titan.TestPorts.HTTPmsg/module/demo/HTTP_Test_no_ASPs.ttcn index 3d69543..dfe710b 100644 --- a/ttcn/modules/titan.TestPorts.HTTPmsg/module/demo/HTTP_Test_no_ASPs.ttcn +++ b/ttcn/modules/titan.TestPorts.HTTPmsg/module/demo/HTTP_Test_no_ASPs.ttcn @@ -158,7 +158,7 @@ function f_singleEncDecCheck( in HTTPMessage p_msg) if(ischosen( p_msg.request ) ){ tr_expectedMsg.request.client_id := *; } - else if(ischosen( p_msg.response )){ + else if(ischosen( p_msg.response )) { tr_expectedMsg.response.client_id := *; } diff --git a/ttcn/patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn b/ttcn/patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn index 5b2ae66..7c54ff1 100644 --- a/ttcn/patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn +++ b/ttcn/patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn @@ -991,7 +991,7 @@ module LibCommon_Sync { syncPort.send(m_syncClientReady(p_syncId)); tc_sync.start; alt{ - [] syncPort.receive(m_syncServerReady(p_syncId)){ + [] syncPort.receive(m_syncServerReady(p_syncId)) { tc_sync.stop ; } [] tc_sync.timeout{ log("**** f_clientSync: Sync client did not receive message from sync server within the specified time limit - sync client will ask sync server to stop test case! ****") ; -- GitLab From 2c13226408e4b194a12932c97baed945f72a303b Mon Sep 17 00:00:00 2001 From: garciay Date: Tue, 31 Oct 2023 09:52:38 +0100 Subject: [PATCH 27/58] Rebuild AtsMec_V2XInformationServiceAPI --- ...ec_V2XInformationServiceAPI_TestCases.ttcn | 251 +++++++++++------- .../V2XInformationServiceAPI_Templates.ttcn | 74 +++++- 2 files changed, 219 insertions(+), 106 deletions(-) diff --git a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn index ca8f28e..75e8df8 100644 --- a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn +++ b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn @@ -763,7 +763,15 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_http_message_body_json( m_body_json_v2x_predicted_qos( m_predicted_qos( + -, PX_LOC_GRANULARITY, + m_qos( + { + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), // FIXME To be refined + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }) + } + )/*, { m_predicted_qos_routes( { @@ -793,7 +801,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { ) } ) - } + }*/ )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -806,6 +814,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { mw_http_message_body_json( mw_body_json_v2x_predicted_qos( mw_predicted_qos( + -, PX_LOC_GRANULARITY )))))) -> value v_response { tc_ac.stop; @@ -855,7 +864,15 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_http_message_body_json( m_body_json_v2x_predicted_qos( m_predicted_qos( + -, PX_LOC_GRANULARITY & "InvalidSemantic", + m_qos( + { + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), // FIXME To be refined + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }) + } + )/*, { m_predicted_qos_routes( { @@ -885,7 +902,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { ) } ) - } + }*/ )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -943,7 +960,15 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_http_message_body_json( m_body_json_v2x_predicted_qos( m_predicted_qos( + -, PX_LOC_GRANULARITY, + m_qos( + { + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), // FIXME To be refined + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }) + } + )/*, { m_predicted_qos_routes( { @@ -973,7 +998,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { ) } ) - } + }*/ )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -1030,8 +1055,16 @@ module AtsMec_V2XInformationServiceAPI_TestCases { v_headers, m_http_message_body_json( m_body_json_v2x_message( - m_v2x_message - ))))); + m_v2x_message( + m_v2x_msg_properties_values( + -, -, -, + m_location_info( + m_ecgi( + PX_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.72, 10.41) + )))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1088,7 +1121,15 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_http_message_body_json( m_body_json_v2x_message( m_v2x_message( - -, + m_v2x_msg_properties_values( + -, -, -, + m_location_info( + m_ecgi( + PX_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.72, 10.41) + )), "UnknownEncodeFormat" )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -1425,7 +1466,6 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_http_message_body_json( m_body_json_prov_chg_uu_uni_subscription( m_prov_chg_uu_uni_subscription( - PX_PROV_UU_UNI_SUB_CALLBACK, m_prov_chg_uu_uni_filter_criteria( m_location_info( m_ecgi( @@ -1438,7 +1478,9 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_v2x_application_server( oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) - )))))))); + )), + PX_PROV_UU_UNI_SUB_CALLBACK + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1450,8 +1492,8 @@ module AtsMec_V2XInformationServiceAPI_TestCases { mw_http_message_body_json( mw_body_json_prov_chg_uu_uni_subscription( mw_prov_chg_uu_uni_subscription( - PX_PROV_UU_UNI_SUB_CALLBACK, -, + PX_PROV_UU_UNI_SUB_CALLBACK, ? )))))) { tc_ac.stop; @@ -1501,7 +1543,6 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_http_message_body_json( m_body_json_prov_chg_uu_mbms_subscription( m_prov_chg_uu_mbms_subscription( - PX_PROV_UU_MBMS_SUB_CALLBACK, m_prov_chg_uu_mbms_filter_criteria( m_location_info( m_ecgi( @@ -1521,7 +1562,9 @@ module AtsMec_V2XInformationServiceAPI_TestCases { PX_V2X_SERVICE_AREA_ID, PX_MCC, PX_MNC - ))))))))); + ))), + PX_PROV_UU_MBMS_SUB_CALLBACK + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1533,8 +1576,8 @@ module AtsMec_V2XInformationServiceAPI_TestCases { mw_http_message_body_json( mw_body_json_prov_chg_uu_mbms_subscription( mw_prov_chg_uu_mbms_subscription( - PX_PROV_UU_MBMS_SUB_CALLBACK, -, + PX_PROV_UU_MBMS_SUB_CALLBACK, ? )))))) { tc_ac.stop; @@ -1584,17 +1627,18 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_http_message_body_json( m_body_json_prov_chg_pc5_subscription( m_prov_chg_pc5_subscription( - PX_PROV_PC5_SUB_CALLBACK, - m_filter_criteria( - PX_V2X_DST_LAYER_2_ID, - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.72, - 10.41 - ))))))))); + m_filter_criteria( + PX_V2X_DST_LAYER_2_ID, + m_location_info( + m_ecgi( + PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + ))), + PX_PROV_PC5_SUB_CALLBACK + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1606,8 +1650,8 @@ module AtsMec_V2XInformationServiceAPI_TestCases { mw_http_message_body_json( mw_body_json_prov_chg_pc5_subscription( mw_prov_chg_pc5_subscription( - PX_PROV_PC5_SUB_CALLBACK, -, + PX_PROV_PC5_SUB_CALLBACK, ? )))))) { tc_ac.stop; @@ -1657,8 +1701,8 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_http_message_body_json( m_body_json_v2x_msg_subscription( m_v2x_msg_subscription( - PX_PROV_V2X_SUB_CALLBACK, - m_v2x_msg_subscription_filter_criteria + m_v2x_msg_subscription_filter_criteria, + PX_PROV_V2X_SUB_CALLBACK )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -1671,8 +1715,8 @@ module AtsMec_V2XInformationServiceAPI_TestCases { mw_http_message_body_json( mw_body_json_v2x_msg_subscription( mw_v2x_msg_subscription( - PX_PROV_V2X_SUB_CALLBACK, -, + PX_PROV_V2X_SUB_CALLBACK, ? )))))) { tc_ac.stop; @@ -1722,20 +1766,21 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_http_message_body_json( m_body_json_prov_chg_uu_uni_subscription( m_prov_chg_uu_uni_subscription_invalid( - PX_PROV_UU_UNI_SUB_CALLBACK, - m_prov_chg_uu_uni_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.72, - 10.41 - )), - m_v2x_application_server( - oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), - oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) - )))))))); + m_prov_chg_uu_uni_filter_criteria( + m_location_info( + m_ecgi( + PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + )), + m_v2x_application_server( + oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), + oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) + )), + PX_PROV_UU_UNI_SUB_CALLBACK + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1789,7 +1834,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_uni_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_uni_subscription.links.self_.href, v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -1803,8 +1848,8 @@ module AtsMec_V2XInformationServiceAPI_TestCases { mw_http_message_body_json( mw_body_json_prov_chg_uu_uni_subscription( mw_prov_chg_uu_uni_subscription( - PX_PROV_UU_UNI_SUB_CALLBACK, -, + PX_PROV_UU_UNI_SUB_CALLBACK, ? )))))) { tc_ac.stop; @@ -1852,7 +1897,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_mbms_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_mbms_subscription.links.self_.href, v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -1866,8 +1911,8 @@ module AtsMec_V2XInformationServiceAPI_TestCases { mw_http_message_body_json( mw_body_json_prov_chg_uu_mbms_subscription( mw_prov_chg_uu_mbms_subscription( - PX_PROV_UU_MBMS_SUB_CALLBACK, -, + PX_PROV_UU_MBMS_SUB_CALLBACK, ? )))))) { tc_ac.stop; @@ -1915,7 +1960,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_pc5_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_pc5_subscription.links.self_.href, v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -1928,11 +1973,11 @@ module AtsMec_V2XInformationServiceAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_prov_chg_pc5_subscription( - mw_prov_chg_pc5_subscription( - PX_PROV_PC5_SUB_CALLBACK, - -, - ? - )))))) { + mw_prov_chg_pc5_subscription( + -, + PX_PROV_PC5_SUB_CALLBACK, + ? + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); @@ -1978,7 +2023,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_v2x_msg_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_v2x_msg_subscription.links.self_.href, v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -1992,8 +2037,8 @@ module AtsMec_V2XInformationServiceAPI_TestCases { mw_http_message_body_json( mw_body_json_v2x_msg_subscription( mw_v2x_msg_subscription( - PX_PROV_V2X_SUB_CALLBACK, -, + PX_PROV_V2X_SUB_CALLBACK, ? )))))) { tc_ac.stop; @@ -2041,7 +2086,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_v2x_msg_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_v2x_msg_subscription.links.self_.href, v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2152,12 +2197,11 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_uni_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_uni_subscription.links.self_.href, v_headers, m_http_message_body_json( m_body_json_prov_chg_uu_uni_subscription( m_prov_chg_uu_uni_subscription( - PX_PROV_UU_UNI_SUB_CALLBACK, m_prov_chg_uu_uni_filter_criteria( m_location_info( m_ecgi( @@ -2170,7 +2214,8 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_v2x_application_server( oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) - )), + )), + PX_PROV_UU_UNI_SUB_CALLBACK, v_prov_chg_uu_uni_subscription.links )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2184,8 +2229,8 @@ module AtsMec_V2XInformationServiceAPI_TestCases { mw_http_message_body_json( mw_body_json_prov_chg_uu_uni_subscription( mw_prov_chg_uu_uni_subscription( - PX_PROV_UU_UNI_SUB_CALLBACK, -, + PX_PROV_UU_UNI_SUB_CALLBACK, v_prov_chg_uu_uni_subscription.links )))))) { tc_ac.stop; @@ -2233,12 +2278,11 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_mbms_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_mbms_subscription.links.self_.href, v_headers, m_http_message_body_json( m_body_json_prov_chg_uu_mbms_subscription( m_prov_chg_uu_mbms_subscription( - PX_PROV_UU_MBMS_SUB_CALLBACK, m_prov_chg_uu_mbms_filter_criteria( m_location_info( m_ecgi( @@ -2259,6 +2303,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { PX_MCC, PX_MNC ))), + PX_PROV_UU_MBMS_SUB_CALLBACK, v_prov_chg_uu_mbms_subscription.links )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2272,8 +2317,8 @@ module AtsMec_V2XInformationServiceAPI_TestCases { mw_http_message_body_json( mw_body_json_prov_chg_uu_mbms_subscription( mw_prov_chg_uu_mbms_subscription( - PX_PROV_UU_MBMS_SUB_CALLBACK, -, + PX_PROV_UU_MBMS_SUB_CALLBACK, v_prov_chg_uu_mbms_subscription.links )))))) { tc_ac.stop; @@ -2321,23 +2366,23 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_pc5_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_pc5_subscription.links.self_.href, v_headers, m_http_message_body_json( m_body_json_prov_chg_pc5_subscription( m_prov_chg_pc5_subscription( - PX_PROV_PC5_SUB_CALLBACK, - m_filter_criteria( - PX_V2X_DST_LAYER_2_ID, - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.77, - 10.46 - ))), - v_prov_chg_pc5_subscription.links + m_filter_criteria( + PX_V2X_DST_LAYER_2_ID, + m_location_info( + m_ecgi( + PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.77, + 10.46 + ))), + PX_PROV_PC5_SUB_CALLBACK, + v_prov_chg_pc5_subscription.links )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2349,11 +2394,11 @@ module AtsMec_V2XInformationServiceAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_prov_chg_pc5_subscription( - mw_prov_chg_pc5_subscription( - PX_PROV_PC5_SUB_CALLBACK, - -, - v_prov_chg_pc5_subscription.links - )))))) { + mw_prov_chg_pc5_subscription( + -, + PX_PROV_PC5_SUB_CALLBACK, + v_prov_chg_pc5_subscription.links + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); @@ -2399,13 +2444,13 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_v2x_msg_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_v2x_msg_subscription.links.self_.href, v_headers, m_http_message_body_json( m_body_json_v2x_msg_subscription( m_v2x_msg_subscription( - PX_PROV_V2X_SUB_CALLBACK, m_v2x_msg_subscription_filter_criteria, + PX_PROV_V2X_SUB_CALLBACK, v_v2x_msg_subscription.links )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2419,8 +2464,8 @@ module AtsMec_V2XInformationServiceAPI_TestCases { mw_http_message_body_json( mw_body_json_v2x_msg_subscription( mw_v2x_msg_subscription( - PX_PROV_V2X_SUB_CALLBACK, -, + PX_PROV_V2X_SUB_CALLBACK, v_v2x_msg_subscription.links )))))) { tc_ac.stop; @@ -2467,26 +2512,26 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_uni_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_uni_subscription.links.self_.href, v_headers, m_http_message_body_json( m_body_json_prov_chg_uu_uni_subscription( m_prov_chg_uu_uni_subscription_invalid( - PX_PROV_UU_UNI_SUB_CALLBACK, - m_prov_chg_uu_uni_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.72, - 10.41 - )), - m_v2x_application_server( - oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), - oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) - )), - v_prov_chg_uu_uni_subscription.links + m_prov_chg_uu_uni_filter_criteria( + m_location_info( + m_ecgi( + PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + )), + m_v2x_application_server( + oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), + oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) + )), + PX_PROV_UU_UNI_SUB_CALLBACK, + v_prov_chg_uu_uni_subscription.links )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2546,7 +2591,6 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_http_message_body_json( m_body_json_prov_chg_uu_uni_subscription( m_prov_chg_uu_uni_subscription_invalid( - PX_PROV_UU_UNI_SUB_CALLBACK, m_prov_chg_uu_uni_filter_criteria( m_location_info( m_ecgi( @@ -2560,6 +2604,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) )), + PX_PROV_UU_UNI_SUB_CALLBACK, v_prov_chg_uu_uni_subscription.links )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2616,7 +2661,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_uni_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_uni_subscription.links.self_.href, v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2672,7 +2717,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_mbms_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_mbms_subscription.links.self_.href, v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2728,7 +2773,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_pc5_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_pc5_subscription.links.self_.href, v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2784,7 +2829,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_v2x_msg_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_v2x_msg_subscription.links.self_.href, v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn index 69f6243..5365b30 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn @@ -69,7 +69,7 @@ module V2XInformationServiceAPI_Templates { } // End of template mw_pc5_provisioning_info template (omit) PredictedQos m_predicted_qos( - in template (value) PredictionTarget p_predictionTarget, + in template (value) PredictionTarget p_predictionTarget := E2E_APPLICATION_INSTANCE_PREDICTION, in template (value) Json.String p_locationGranularity, in template (value) Qos p_qos, in template (omit) TimeStamp p_noticePeriod := omit, @@ -104,9 +104,53 @@ module V2XInformationServiceAPI_Templates { qos := p_qos } // End of template mw_predicted_qos + template (value) Qos m_qos( + in template (value) StreamList p_stream + ) := { + stream := p_stream + } // End of template m_qos + + template (present) Qos mw_qos( + template (present) StreamList p_stream := ? + ) := { + stream := p_stream + } // End of template mw_qos + + template (value) Stream m_stream( + in template (value) QosKpiList p_qos_kpi + ) := { + qosKpi := p_qos_kpi + } // End of template m_stream + + template (present) Stream mw_stream( + template (present) QosKpiList p_qos_kpi := ? + ) := { + qosKpi := p_qos_kpi + } // End of template mw_stream + + template (omit) QosKpi m_qos_kpi( + in Json.String p_kpi_name, + in Json.String p_kpi_value, + in template (omit) Json.String p_confidence := omit + ) := { + kpiName := p_kpi_name, + kpiValue := p_kpi_value, + confidence := p_confidence + } // End of template m_qos_kpi + + template (present) QosKpi mw_qos_kpi( + template (present) Json.String p_kpi_name := ?, + template (present) Json.String p_kpi_value := ?, + template Json.String p_confidence := * + ) := { + kpiName := p_kpi_name, + kpiValue := p_kpi_value, + confidence := p_confidence + } // End of template mw_qos_kpi + template (omit) RouteInfo m_route_info( - in template (value) LocationInfo p_location, - in template (omit) TimeStamp p_time := omit + in template (value) LocationInfo p_location, + in template (omit) TimeStamp p_time := omit ) := { location := p_location, time := p_time @@ -208,6 +252,30 @@ module V2XInformationServiceAPI_Templates { msgContent := p_msgContent } // End of template mw_v2x_message + template (value) V2xMsgPropertiesValues m_v2x_msg_properties_values( + in StdOrganization p_std_organization := ETSI, + in MsgType p_msg_type := cam, + in Json.Integer p_msg_protocol_version := 1, + in template (value) LocationInfo p_location_info + ) := { + stdOrganization := p_std_organization, + msgType := p_msg_type, + msgProtocolVersion := p_msg_protocol_version, + locationInfo := p_location_info + } // End of template m_v2x_msg_properties_values + + template (present) V2xMsgPropertiesValues mw_v2x_msg_properties_values( + template (present) StdOrganization p_std_organization := ?, + template (present) MsgType p_msg_type := ?, + template (present) Json.Integer p_msg_protocol_version := ?, + template (present) LocationInfo p_location_info := ? + ) := { + stdOrganization := p_std_organization, + msgType := p_msg_type, + msgProtocolVersion := p_msg_protocol_version, + locationInfo := p_location_info + } // End of template mw_v2x_msg_properties_values + template (omit) ProvChgUuUniSubscription m_prov_chg_uu_uni_subscription( in template (value) ProvChgUuUniSubscriptionFilterCriteria p_filterCriteria, in template (omit) Json.AnyURI p_callbackReference := omit, -- GitLab From 1bb177ed7a07dfea3acbb189dfe029abe1ec0ece Mon Sep 17 00:00:00 2001 From: garciay Date: Tue, 31 Oct 2023 10:58:27 +0100 Subject: [PATCH 28/58] Rebuild AtsMec_EdgePlatformApplicationEnablement --- ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk b/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk index ec2ed73..25ab67b 100644 --- a/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk +++ b/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk @@ -15,7 +15,6 @@ modules := ../LibCommon \ ../LibMec/EdgePlatformApplicationEnablementAPI \ ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ ../LibMec/TrafficManagementAPI \ - ../LibMec/RnisAPI \ ../LibMec/UEAppInterfaceAPI \ ../LibMec/UEidentityAPI \ ../LibMec/V2XInformationServiceAPI \ -- GitLab From 71c6bbad37edd89f61c18ee2dd4b5f7780612a98 Mon Sep 17 00:00:00 2001 From: garciay Date: Tue, 31 Oct 2023 11:02:28 +0100 Subject: [PATCH 29/58] Rebuild AtsMec_UEidentity --- ttcn/AtsMec_UEidentity/module.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/ttcn/AtsMec_UEidentity/module.mk b/ttcn/AtsMec_UEidentity/module.mk index d351d3b..9fc9bb4 100644 --- a/ttcn/AtsMec_UEidentity/module.mk +++ b/ttcn/AtsMec_UEidentity/module.mk @@ -28,6 +28,7 @@ modules := ../LibCommon \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ ../../titan-test-system-framework/ccsrc/Helpers \ ../../ccsrc/Ports/LibHttp \ ../../ccsrc/EncDec/LibMec \ -- GitLab From ec0413371f2bddf8ce2c869f8f3890cb4352ca29 Mon Sep 17 00:00:00 2001 From: garciay Date: Tue, 31 Oct 2023 16:35:49 +0100 Subject: [PATCH 30/58] Rebuild LibMec/ApplicationMobilityServiceAPI --- .../AtsMec_Ams/AtsMec_Ams_TestCases.ttcn | 1733 ----------------- .../AtsMec_Ams/AtsMec_Ams_TestControl.ttcn | 103 - ttcn/AtsMec/AtsMec_Ams/module.mk | 48 - .../ApplicationMobilityServiceAPI_Pics.ttcn | 5 + .../ApplicationMobilityServiceAPI_Pixits.ttcn | 18 + ...plicationMobilityServiceAPI_Templates.ttcn | 172 ++ ...tionMobilityServiceAPI_TypesAndValues.ttcn | 4 +- .../ttcn/LibHttp_JsonMessageBodyTypes.ttcn | 12 +- .../ttcn/LibHttp_JsonTemplates.ttcn | 129 +- 9 files changed, 269 insertions(+), 1955 deletions(-) delete mode 100644 ttcn/AtsMec/AtsMec_Ams/AtsMec_Ams_TestCases.ttcn delete mode 100644 ttcn/AtsMec/AtsMec_Ams/AtsMec_Ams_TestControl.ttcn delete mode 100644 ttcn/AtsMec/AtsMec_Ams/module.mk diff --git a/ttcn/AtsMec/AtsMec_Ams/AtsMec_Ams_TestCases.ttcn b/ttcn/AtsMec/AtsMec_Ams/AtsMec_Ams_TestCases.ttcn deleted file mode 100644 index 7044065..0000000 --- a/ttcn/AtsMec/AtsMec_Ams/AtsMec_Ams_TestCases.ttcn +++ /dev/null @@ -1,1733 +0,0 @@ -/** -* @author ETSI / STF569 -* @version $URL:$ -* $ID:$ -* @desc This module provides the MEC test cases. -* @copyright ETSI Copyright Notification -* No part may be reproduced except as authorized by written permission. -* The copyright and the foregoing restriction extend to reproduction in all media. -* All rights reserved. -* @see ETSI GS MEC 003, Draft ETSI GS MEC 021 V2.1.1 -*/ - module AtsMec_Ams_TestCases { - - // Libcommon - import from LibCommon_BasicTypesAndValues all; - import from LibCommon_Sync all; - - // LibHttp - import from LibHttp_TypesAndValues all; - import from LibHttp_Functions all; - import from LibHttp_Templates all; - import from LibHttp_JsonTemplates all; - import from LibHttp_TestSystem all; - - // LibMec_LocationAPI - import from Ams_Templates all; - import from Ams_Pics all; - import from Ams_Pixits all; - - // LibMec - import from LibMec_TypesAndValues all; - import from LibMec_Templates all; - import from LibMec_Functions all; - import from LibMec_Pics all; - import from LibMec_Pixits all; - - group appMobilityServices { - - /** - * @desc Check that the AMS service returns information about the registered application mobility services when requested - * @see ETSI GS MEC 021 2.1.1, clause 8.3.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_app_mobility_service_info( - mw_app_mobility_service_info( - { - mw_app_mobility_registration_info( - mw_service_consumer_id( - PX_APP_INS_ID, - PX_MEP_ID - ) - ) - } - )))))) -> value v_response { - tc_ac.stop; - - if (f_check_headers(valueof(v_response.response.header)) == true) { - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppTerminationNotificationSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } else { - log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_001_OK - - /** - * @desc Check that the AMS service returns an error when receives a query about a registered application mobility service with wrong parameters - * @see ETSI GS MEC 021 2.1.1, clause 8.3.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "?appMobilityService=" & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, - -, - 400 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC012_SRV_AMS_001_BR - - - /** - * @desc Check that the AMS service creates a new application mobility services when requested - * @see ETSI GS MEC 021 2.1.1, clause 8.3.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_002_OK() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI, - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_request( - m_registration_request( - m_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_app_mobility_service_info( - mw_app_mobility_service_info( - mw_registration_info( - mw_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ), - PX_APP_MOBILITY_SERVICE_ID - ) - ) - ) - ) - ) - ) - - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo and status code set to 201 Created ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_002_OK - - /** - * @desc Check that the AMS service sends an error when it receives a malformed request to create a new application mobility service - * @see ETSI GS MEC 021 2.1.1, clause 8.3.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_002_BR() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI, - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_request( - m_registration_request_error( - m_service_consumer_error( - PX_APP_INS_ID, - - - ) - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a Problem Details when bad request is performed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC012_SRV_AMS_002_BR - } // End of group appMobilityServices - - - group individualAppMobilityService{ - - /** - * @desc Check that the AMS service returns information about this individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_011_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_app_mobility_service_info( - mw_app_mobility_service_info( - -, - PX_APP_MOBILITY_SERVICE_ID - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_011_OK - - /** - * @desc Check that the AMS service sends an error when receives a query about a not existing individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_011_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - ))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC012_SRV_AMS_011_NF - - - - /** - * @desc Check that the AMS service modifies the individual application mobility service when requested - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_012_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_request( - m_registration_request( - m_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ) - ) - ) - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_app_mobility_service_info( - mw_app_mobility_service_info({ - *, - mw_app_mobility_registration_info( - mw_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ), - *}, - - - ) - ) - ) - ))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_012_OK - - /** - * @desc Check that the AMS service sends an error when receives a request to modify a not existing individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_012_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_request( - m_registration_request( - m_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ) - ) - ) - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - ))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC012_SRV_AMS_012_NF - - /** - * @desc Check that the AMS service sends an error when receives a request to modify a individual application mobility service using bad parameters - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_012_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_request_with_error( - m_registration_request_with_error( - m_service_consumer_id_with_error( - PX_APP_INS_ID, - - - ), - -, - - - ) - ) - ) - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - ))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC012_SRV_AMS_012_BR - - - /** - * @desc Check that the AMS service de-register the individual application mobility service and delete the resource - * that represents the individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.5 - */ - testcase TC_MEC_MEC012_SRV_AMS_013_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content( - ))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 204 No Content ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_013_OK - - /** - * @desc Check that the AMS service sends an error when is requested to delete the resource - * that represents the individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.5 - */ - testcase TC_MEC_MEC012_SRV_AMS_013_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - ))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC012_SRV_AMS_013_NF - - } - - group appMobilityServiceDeregisterTask { - - /** - * @desc Check that the AMS service deregister an individual application mobility service on expiry of the timer associated with the service - * @see ETSI GS MEC 021 2.0.10, clause 8.5.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_014_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")) & "/deregisterTask", - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_app_mobility_service_info( - mw_app_mobility_service_info({ - *, - mw_app_mobility_registration_info( - mw_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ), - *}, - - - ) - ) - ) - ))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_014_OK - - /** - * @desc Check that the AMS service send an error when is requested to deregister a not existent individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.5.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_014_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")) & "/deregisterTask", - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - ))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_012_OK - - - } - - group appMobilityServicesSubscriptions { - - /** - * @desc Check that the AMS service returns information about the available subscriptions when requested. - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.6.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_003_OK() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - //@TODO: How can we convert enums in strings? - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionType=" & int2str(enum2int(PX_SUBSCRIPTION_TYPE)), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_ams_subscriptions( - mw_ams_subscription( - PX_SUBSCRIPTION_TYPE, - -, - -, - -, - - - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of subscriptions type MobilityProcedureSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // END TC_MEC_MEC012_SRV_AMS_003_OK - - /** - * @desc Check that the AMS service sends an error when it receives a malformed query about the available subscriptions - * @see ETSI GS MEC 021 2.1.1, clause 8.6.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_003_BR() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionTyp=" & int2str(enum2int(PX_SUBSCRIPTION_TYPE)), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // END of TC_MEC_MEC012_SRV_AMS_003_BR - - /** - * @desc Check that the AMS service creates a notification subscriptions when requested. - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.6.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_004_OK() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS, - v_headers, - m_http_message_body_json( - m_body_json_ams_subscriptions( - m_ams_subscription( - PX_SUBSCRIPTION_TYPE, - PX_CALLBACK_REFERENCE, - -, - -, - - - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_ams_subscriptions( - mw_ams_subscription( - PX_SUBSCRIPTION_TYPE, - PX_CALLBACK_REFERENCE, - -, - -, - - - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AMS Subscription and 201 Created status code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_004_OK - - /** - * @desc Check that the AMS service sends an error when it receives a malformed request to create a notification subscription - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.6.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_004_BR() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS, - v_headers, - m_http_message_body_json( - m_body_json_ams_subscriptions( - m_ams_subscription_error( - PX_SUBSCRIPTION_TYPE, - PX_CALLBACK_REFERENCE, - -, - -, - - - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a Problem Details and 400 Bad request status code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_004_BR - - /** - * @desc Check that the AMS service returns information about a given subscription when requested. - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_005_OK() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_ams_subscriptions( - mw_ams_subscription(PX_SUBSCRIPTION_TYPE, -, -, -, -) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of subscriptions type MobilityProcedureSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_005_OK - - /** - * @desc Check that the AMS service returns an error when receives a query about a not existing subscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_005_NF() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 404 - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_005_NF - - /** - * @desc Check that the AMS service deletes a given subscription when requested - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.5 - */ - testcase TC_MEC_MEC012_SRV_AMS_006_OK() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 No Content on deletion request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_006_OK - - /** - * @desc Check that the AMS service sends an error when it receives a delete request for a not existing subscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.5 - */ - testcase TC_MEC_MEC012_SRV_AMS_006_NF() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - mw_http_message_body_json( - mw_body_json_problem_details( - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_006_NF - - /** - * @desc Check that the AMS service modifies a given subscription when requested. - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_007_OK() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_subscriptions( - m_ams_subscription( - PX_SUBSCRIPTION_TYPE, PX_CALLBACK_REFERENCE, -, -, - - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_ams_subscriptions( - mw_ams_subscription(PX_SUBSCRIPTION_TYPE, -, -, -, -) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_007_OK - - /** - * @desc Check that the AMS service sends an error when it receives a malformed modify request for a given subscription. - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_007_BR() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_request( - m_registration_request( - m_service_consumer_error(PX_APP_INS_ID, -), - -, - - - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_007_BR - - /** - * @desc Check that the AMS service sends an error when it receives a modify request for a not existing subscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_007_NF() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_subscriptions( - m_ams_subscription( - PX_SUBSCRIPTION_TYPE, PX_CALLBACK_REFERENCE, -, -, - - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - mw_http_message_body_json( - mw_body_json_problem_details( - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_007_NF - - - } // End of group appMobilityServicesSubscriptions - - group ams_notifications { - - /** - * @desc Check that the AMS service sends an AMS notification about a mobility procedure if the AMS service has an associated subscription and the event is generated - * @see ETSI GS MEC 021 2.1.1, clause 7.4.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_008_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_NOTIFICATIONS)) { - log("*** " & testcasename() & ": PICS_AMS and PICS_AMS_NOTIFICATIONS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_notif_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - action("Trigger a mobility procedure event"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] httpPort_notif.receive( - mw_http_request( - mw_http_request_post( - PX_CALLBACK_URI, - -, - mw_http_message_body_json( - mw_body_json_mobility_procedure_notification( - mw_mobility_procedure_notification( - -, - PX_CALLBACK_REFERENCE, - -, - -, - - - ) - ) - ) - ) - ) - ) { - tc_wait.stop; - log("*** " & testcasename() & ": INFO: IUT successfully sends mobility procedure notification ***"); - - // Send 204 No Content - httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); - - log("*** " & testcasename() & ": PASS: IUT successfully sends mobility procedure notification ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_notif_down(); - } // End of TC_MEC_MEC012_SRV_AMS_008_OK - - /** - * @desc Check that the AMS service sends an AMS notification about adjacent application instances if the AMS service has an associated subscription and the event is generated - * @see ETSI GS MEC 021 2.1.1, clause 7.4.3 - */ - testcase TC_MEC_MEC012_SRV_AMS_009_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_NOTIFICATIONS)) { - log("*** " & testcasename() & ": PICS_AMS and PICS_AMS_NOTIFICATIONS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_notif_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - action("Trigger a adjacent application info event"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] httpPort_notif.receive( - mw_http_request( - mw_http_request_post( - PX_CALLBACK_URI, - -, - mw_http_message_body_json( - mw_body_json_adjacent_application_info_notification( - mw_adjacent_application_info_notification( - -, - PX_CALLBACK_REFERENCE, - -, - -, - - - ) - ) - ) - ) - ) - ) { - tc_wait.stop; - log("*** " & testcasename() & ": INFO: IUT successfully sends adjacent application info notification ***"); - - // Send 204 No Content - httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); - - log("*** " & testcasename() & ": PASS: IUT successfully sends adjacent application info notification ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_notif_down(); - } - - - /** - * @desc Check that the AMS service sends an AMS notification on subscription expiration if the AMS service has an associated subscription and the event is generated - * @see ETSI GS MEC 021 2.1.1, clause 7.4.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_010_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var UInt64 v_timestamp; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_NOTIFICATIONS)) { - log("*** " & testcasename() & ": PICS_AMS and PICS_AMS_NOTIFICATIONS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_notif_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - action("Trigger a expire notification event"); - v_timestamp := f_get_current_timestamp_utc(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] httpPort_notif.receive( - mw_http_request( - mw_http_request_post( - PX_CALLBACK_URI, - -, - mw_http_message_body_json( - mw_body_json_expire_notification( - mw_expire_notification( - -, - -, - { seconds := v_timestamp / 1000, nanoSeconds := 1000 * v_timestamp mod 1000 } - ) - ) - ) - ) - ) - ) { - tc_wait.stop; - log("*** " & testcasename() & ": INFO: IUT successfully sends adjacent application info notification ***"); - - // Send 204 No Content - httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); - - log("*** " & testcasename() & ": PASS: IUT successfully sends adjacent applicationinfo notification ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_notif_down(); - } - - - - } // End of group ams_notifications - -} // End of module AtsMec_Ams_TestCases - - - - - - - diff --git a/ttcn/AtsMec/AtsMec_Ams/AtsMec_Ams_TestControl.ttcn b/ttcn/AtsMec/AtsMec_Ams/AtsMec_Ams_TestControl.ttcn deleted file mode 100644 index 9aace58..0000000 --- a/ttcn/AtsMec/AtsMec_Ams/AtsMec_Ams_TestControl.ttcn +++ /dev/null @@ -1,103 +0,0 @@ -module AtsMec_TestControl { - - // LibMec/LocationAPI - import from LocationAPI_Pics all; - // LibMec/UEidentityAPI - import from UEidentityAPI_Pics all; - // LibMec/RnisAPI - import from RnisAPI_Pics all; - // LibMec/TrafficManagementAPI - import from TrafficManagementAPI_Pics all; - // LibMec/AppEnablementAPI - import from EdgePlatformApplicationEnablementAPI_Pics all; - // LibMec/UEAppInterfaceAPI - import from UEAppInterfaceAPI_Pics all; - - // LibMec - import from LibMec_Pics all; - - // AtsMec - import from AtsMec_UEidentityAPI_TestCases all; -// import from AtsMec_RadioNodeLocationAPI_TestCases all; - import from AtsMec_RnisAPI_TestCases all; - import from AtsMec_TrafficManagementAPI_TestCases all; - import from AtsMec_EdgePlatformApplicationEnablementAPI_TestCases all; - import from AtsMec_UEAppInterfaceAPI_TestCases all; - - control { - - if (PICS_MEC_PLAT and PICS_SERVICES) { - if (PICS_UE_IDENTITY_API_SUPPORTED) { - execute(TC_MEC_MEC014_SRV_UETAG_001_OK()); - execute(TC_MEC_MEC014_SRV_UETAG_001_BR()); - execute(TC_MEC_MEC014_SRV_UETAG_001_NF()); - execute(TC_MEC_MEC014_SRV_UETAG_002_OK()); - execute(TC_MEC_MEC014_SRV_UETAG_002_BR()); - execute(TC_MEC_MEC014_SRV_UETAG_002_PF()); - } - if (PICS_LOCATION_API_SUPPORTED) { - -// execute(TC_MEC_PLAT_RLOC_001_OK()); -// execute(TC_MEC_PLAT_RLOC_001_NF()); - } - - if (PICS_APP_ENABLEMENT_API_SUPPORTED) { - /*execute(TC_MEC_SRV_TRANS_001_OK()); - execute(TC_MEC_SRV_TRAF_001_OK()); - execute(TC_MEC_SRV_TRAF_002_OK()); - execute(TC_MEC_SRV_TRAF_003_OK()); - execute(TC_MEC_SRV_TRAF_001_NF());*/ - } - - if (PICS_ENABLE_UE_APP_CTX) { - execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_NF()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_NF()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_NF()); - } - } - - /*if (PICS_RNIS) { - if (PICS_RNIS_NOTIFICATIONS) { - execute(TC_MEC_MEC012_SRV_RNIS_001_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_002_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_003_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_004_OK()); - } - if (PICS_RNIS_ALL_SUBSCRIPTIONS) { - execute(TC_MEC_MEC012_SRV_RNIS_011_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_012_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_011_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_012_BR()); - } - if (PICS_RNIS_QUERY) { - execute(TC_MEC_MEC012_SRV_RNIS_016_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_016_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_016_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_017_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_017_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_017_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_018_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_018_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_018_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_019_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_019_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_019_NF()); - } - }*/ - - if (PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED) { - execute(TC_MEC_MEC015_SRV_TM_001_OK()); - execute(TC_MEC_MEC015_SRV_TM_002_OK()); - execute(TC_MEC_MEC015_SRV_TM_002_BR()); - execute(TC_MEC_MEC015_SRV_TM_002_NF()); - } - } // End of 'control' statement - -} // End of module AtsMec_TestControl diff --git a/ttcn/AtsMec/AtsMec_Ams/module.mk b/ttcn/AtsMec/AtsMec_Ams/module.mk deleted file mode 100644 index 449db40..0000000 --- a/ttcn/AtsMec/AtsMec_Ams/module.mk +++ /dev/null @@ -1,48 +0,0 @@ -suite := AtsMec - -sources := \ - AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn \ - AtsMec_TrafficManagementAPI_TestCases.ttcn \ - AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn \ - AtsMec_LocationAPI_TestCases.ttcn \ - AtsMec_RnisAPI_TestCases.ttcn \ - AtsMec_TestControl.ttcn \ - AtsMec_UEAppInterfaceAPI_TestCases.ttcn \ - AtsMec_UEidentityAPI_TestCases.ttcn \ - AtsMec_V2XInformationServiceAPI_TestCases.ttcn \ - AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn \ - AtsMec_WlanInformationAPI_TestCases.ttcn \ - AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn \ -# AtsMec_Ams_TestCases.ttcn \ -# AtsMec_FixedAccessInfoAPI_TestCases.ttcn \ -# AtsMec_RadioNodeLocationAPI_TestCases.ttcn \ - -modules := ../LibCommon \ - ../LibIts \ - ../LibIts/ttcn/Http \ - ../LibMec \ - ../LibMec/EdgePlatformApplicationEnablementAPI \ - ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ - ../LibMec/TrafficManagementAPI \ - ../LibMec/LocationAPI \ - ../LibMec/RnisAPI \ - ../LibMec/UEAppInterfaceAPI \ - ../LibMec/UEidentityAPI \ - ../LibMec/V2XInformationServiceAPI \ - ../LibMec/DeviceApplicationInterfaceAPI \ - ../LibMec/WlanInformationAPI \ - ../LibMec/ApplicationMobilityServiceAPI \ - ../LibMec/FixedAccessInformationAPI \ - ../../ccsrc/Ports/LibHttp \ - ../../ccsrc/EncDec/LibHttp \ - ../../ccsrc/EncDec/LibMec \ - ../../ccsrc/Framework \ - ../../ccsrc/externals \ - ../../ccsrc/loggers \ - ../../ccsrc/Protocols/ETH \ - ../../ccsrc/Protocols/Http \ - ../../ccsrc/Protocols/Json \ - ../../ccsrc/Protocols/Pcap \ - ../../ccsrc/Protocols/Tcp \ - ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ - diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pics.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pics.ttcn index 0499a19..89a128a 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pics.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pics.ttcn @@ -3,4 +3,9 @@ module ApplicationMobilityServiceAPI_Pics { // JSON import from Json all; + /** + * @desc Does the IUT support LocationAPI? + */ + modulepar boolean PICS_AMS_API_SUPPORTED := true; + } // End of module ApplicationMobilityServiceAPI_Pics diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pixits.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pixits.ttcn index f07ed63..e4d5979 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pixits.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pixits.ttcn @@ -3,4 +3,22 @@ module ApplicationMobilityServiceAPI_Pixits { // JSON import from Json all; + // LibMec/ApplicationMobilityServiceAPI + import from ApplicationMobilityServiceAPI_TypesAndValues all; + + modulepar Json.String PX_APP_MOBILITY_SERVICE_ID := "KtRGymNQ84dG3mQfRepa"; + + modulepar Json.String PX_APP_INS_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f"; + + modulepar Json.String PX_SUBSCRIPTION_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3"; + + modulepar Json.String PX_NON_EXISTENT_SUBSCRIPTION_ID := "NON_EXISTENT_SUBSCRIPTION_ID"; + + modulepar Json.String PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID := "PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID"; + + modulepar Json.String PX_CALLBACK_REFERENCE := "http://127.0.0.1/callback"; + + modulepar charstring PX_CALLBACK_URI := "http://127.0.0.1/callback"; + + modulepar Json.String PX_MEP_ID := ""; } // End of module ApplicationMobilityServiceAPI_Pixits diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn index e63aa9a..7ea2bb1 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn @@ -3,7 +3,179 @@ module ApplicationMobilityServiceAPI_Templates { // JSON import from Json all; + // MEC 012 + import from RnisAPI_TypesAndValues all; + // LibMec/ApplicationMobilityServiceAPI import from ApplicationMobilityServiceAPI_TypesAndValues all; + import from ApplicationMobilityServiceAPI_Pixits all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // template (omit) AppMobilityServiceInfo m_app_mobility_service_info( + // in String p_app_mobility_service_id := PX_APP_MOBILITY_SERVICE_ID, + // in template (omit) RegistrationInfos p_registration_info := omit + // ) := { + // registeredAppMobilityService := p_registration_info, + // appMobilityServiceId := p_app_mobility_service_id + // } // End of template m_app_mobility_service_info + + + // template (present) AppMobilityServiceInfo mw_app_mobility_service_info( + // template (present) RegistrationInfos p_registration_info := ?, + // template (present) String p_app_mobility_service_id := ? + // ) := { + // registeredAppMobilityService := p_registration_info, + // appMobilityServiceId := p_app_mobility_service_id + // } + + template (omit) RegistrationInfo m_registration_info( + in Json.String p_app_mobility_service_id, + in template (value) ServiceConsumerId p_serviceConsumerId, + in template (omit) DeviceInformation p_deviceInformation := omit, + in template (omit) UInt32 p_expiryTime := omit + ) := { + appMobilityServiceId := p_app_mobility_service_id, + serviceConsumerId := p_serviceConsumerId, + deviceInformation := p_deviceInformation, + expiryTime := p_expiryTime + } // End of template m_registration_info + + template RegistrationInfo mw_registration_info( + template (present) Json.String p_app_mobility_service_id := ?, + template (present) ServiceConsumerId p_serviceConsumerId := ?, + template DeviceInformation p_deviceInformation := *, + template UInt32 p_expiryTime := * + ) := { + appMobilityServiceId := p_app_mobility_service_id, + serviceConsumerId := p_serviceConsumerId, + deviceInformation := p_deviceInformation, + expiryTime := p_expiryTime + } // End of template m_registration_info + + template (omit) ServiceConsumerId m_service_consumer_id( + in template (omit) String p_appInstanceId := omit, + in template (omit) String p_mepId := omit + ) := { + appInstanceId := p_appInstanceId, + mepId := p_mepId + } // End of template m_service_consumer_id + + template ServiceConsumerId mw_service_consumer_id( + template String p_appInstanceId := *, + template String p_mepId := * + ) := { + appInstanceId := p_appInstanceId, + mepId := p_mepId + } // End of template mw_service_consumer_id + + template (omit) DeviceInformation_ m_device_info( + in String p_associate_id, + in template (omit) AppMobilityServiceLevel p_appMobilityServiceLevel := omit, + in template (omit) ContextTransferState p_contextTransferState := omit + ) := { + associateId := p_associate_id, + appMobilityServiceLevel := p_appMobilityServiceLevel, + contextTransferState := p_contextTransferState + } // End of template m_device_info + + template (present) DeviceInformation_ mw_device_info( + template (present) String p_associate_id := ?, + template AppMobilityServiceLevel p_appMobilityServiceLevel := *, + template ContextTransferState p_contextTransferState := * + ) := { + associateId := p_associate_id, + appMobilityServiceLevel := p_appMobilityServiceLevel, + contextTransferState := p_contextTransferState + } // End of template mw_device_info + + template (value) AdjacentAppInfoSubscription m_adjacent_app_info_subscription( + in Json.String p_subscriptionType, + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := omit, + in template (omit) AdjacentFilterCriteria p_filterCriteria := omit, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.TimeStamp p_expiryDeadline := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := omit + ) := { + subscriptionType := p_subscriptionType , + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline + } // End of template m_adjacent_app_info_subscription + + template (present) AdjacentAppInfoSubscription mw_adjacent_app_info_subscription( + template (present) Json.String p_subscriptionType := ?, + template Json.AnyURI p_callbackReference := *, + template ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := *, + template AdjacentFilterCriteria p_filterCriteria := *, + template ApplicationMobilityServiceAPI_TypesAndValues.TimeStamp p_expiryDeadline := *, + template Json.Bool p_requestTestNotification := *, + template ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := * + ) := { + subscriptionType := p_subscriptionType , + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline + } // End of template mw_adjacent_app_info_subscription + + template (value) MobilityProcedureNotification m_mobility_procedure_notification( + in Json.String p_notificationType, + in template (value) Links_Notification p_links, + in template (value) AssociateId p_associateId, + in template (value) MobilityStatus p_mobilityStatus, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.TimeStamp p_timeStamp := omit, + in template (omit) TargetAppInfo p_targetAppInfo := omit + ) := { + notificationType := p_notificationType, + timeStamp := p_timeStamp, + associateId := p_associateId, + mobilityStatus := p_mobilityStatus, + targetAppInfo := p_targetAppInfo, + links := p_links + } // End of template m_mobility_procedure_notification + + template (present) MobilityProcedureNotification mw_mobility_procedure_notification( + template (present) Json.String p_notificationType := ?, + template (present) Links_Notification p_links := ?, + template (present) AssociateId p_associateId := ?, + template (present) MobilityStatus p_mobilityStatus := ?, + template ApplicationMobilityServiceAPI_TypesAndValues.TimeStamp p_timeStamp := *, + template TargetAppInfo p_targetAppInfo := * + ) := { + notificationType := p_notificationType, + timeStamp := p_timeStamp, + associateId := p_associateId, + mobilityStatus := p_mobilityStatus, + targetAppInfo := p_targetAppInfo, + links := p_links + } // End of template mw_mobility_procedure_notification + + template (omit) ApplicationMobilityServiceAPI_TypesAndValues.ExpiryNotification m_expire_notification( + in Json.String p_notificationType, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.TimeStamp p_timestamp := omit, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := omit + ) := { + notificationType := p_notificationType, + timeStamp := p_timestamp, + links := p_links + } // End of template m_expire_notification + + template (present) ApplicationMobilityServiceAPI_TypesAndValues.ExpiryNotification mw_expire_notification( + template (present) Json.String p_notificationType := ?, + template ApplicationMobilityServiceAPI_TypesAndValues.TimeStamp p_timestamp := *, + template ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := * + ) := { + notificationType := p_notificationType, + timeStamp := p_timestamp, + links := p_links + } // End of template mw_expire_notification } // End of module ApplicationMobilityServiceAPI_Templates diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn index f2410a9..16bdcfd 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn @@ -191,7 +191,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @desc This type represents a notification from AMS with regards to mobility procedure * @member notificationType Shall be set to "MobilityProcedureNotification" * @member timeStamp Date and time of the generation of the notification - * @member associateId 1 to N identifiers to associate the information for specific UE(s) and flow(s) + * @member associateId Identifiers to associate the information for specific UE(s) and flow(s) * @member mobilityStatus Indicate the status of the UE mobility * @member targetAppInfo Identifiers to associate the information of target application instance * @member links Object containing hyperlinks related to the resource @@ -200,7 +200,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { type record MobilityProcedureNotification { Json.String notificationType, TimeStamp timeStamp optional, - AssociateId_ associateId, + AssociateId associateId, MobilityStatus mobilityStatus, TargetAppInfo targetAppInfo optional, Links_Notification links diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index 124821a..c1d811b 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -22,6 +22,8 @@ module LibHttp_JsonMessageBodyTypes { import from WlanInformationAPI_TypesAndValues all; // LibMec/FixedAccessInformationServiceAPI import from FixedAccessInformationServiceAPI_TypesAndValues all; + // LibMec/ApplicationMobilityServiceAPI_TypesAndValues + import from ApplicationMobilityServiceAPI_TypesAndValues all; // LibMec/V2XInformationServiceAPI import from V2XInformationServiceAPI_TypesAndValues all; // LibMec/IoT @@ -73,11 +75,11 @@ module LibHttp_JsonMessageBodyTypes { TrafficRuleList trafficRuleList, TrafficRule trafficRule, /*AppMobilityServiceInfo appMobilityServiceInfo,*/ - /* Ams_TypesAndValues.RegistrationRequest registrationRequest_ams, */ - /* Ams_TypesAndValues.MobilityProcedureSubscription subscriptionLinkList_ams, */ - /* Ams_TypesAndValues.AdjacentAppInfoSubscription adjacentAppInfoSubscription_ams, */ - /* Ams_TypesAndValues.ExpiryNotification expireNotification_ams, */ - /* Ams_TypesAndValues.RegistrationRequestWithError registrationRequestWithError_ams, */ + RegistrationInfo registrationInfo, + ApplicationMobilityServiceAPI_TypesAndValues.MobilityProcedureSubscription subscriptionLinkList_ams, + ApplicationMobilityServiceAPI_TypesAndValues.AdjacentAppInfoSubscription adjacentAppInfoSubscription_ams, + ApplicationMobilityServiceAPI_TypesAndValues.ExpiryNotification expireNotification_ams, + /* ApplicationMobilityServiceAPI_TypesAndValues.RegistrationRequestWithError registrationRequestWithError_ams, */ GrantRequest grantRequest, Grant grantResponse, CreateAppPkg createAppPkg, diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn index d6fa9dd..52126d5 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -37,6 +37,9 @@ module LibHttp_JsonTemplates { // LibMec/module FixedAccessInformationServiceAPI import from FixedAccessInformationServiceAPI_TypesAndValues all; + // LibMec/module ApplicationMobilityServiceAPI + import from ApplicationMobilityServiceAPI_TypesAndValues all; + // LibMec/DeviceApplicationInterfaceAPI import from DeviceApplicationInterfaceAPI_TypesAndValues all; @@ -64,8 +67,14 @@ module LibHttp_JsonTemplates { raw := p_raw } // End of template mw_json_body_raw + template (value) JsonBody m_body_json_problem_details( + in template (value) LibMec_TypesAndValues.ProblemDetails p_problemDetails + ) := { + problemDetails := p_problemDetails + } // End of template m_body_json_problem_details + template (present) JsonBody mw_body_json_problem_details( - template (present) LibMec_TypesAndValues.ProblemDetails p_problemDetails := ? + template (present) LibMec_TypesAndValues.ProblemDetails p_problemDetails := ? ) := { problemDetails := p_problemDetails } // End of template mw_body_json_problem_details @@ -286,80 +295,72 @@ module LibHttp_JsonTemplates { */ } // End of group mex_lifcyclemgt -group ams_api { - /* - template (value) JsonBody m_body_json_app_mobility_service_info( - in template (value) AppMobilityServiceInfo p_app_mobility_service_info - ) := { - appMobilityServiceInfo := p_app_mobility_service_info - } // End of template mw_body_json_app_mobility_service_info - - template (present) JsonBody mw_body_json_app_mobility_service_info( - template (present) AppMobilityServiceInfo p_app_mobility_service_info := ? - ) := { - appMobilityServiceInfo := p_app_mobility_service_info - } // End of template mw_body_json_app_mobility_service_info - - - template (value) JsonBody m_body_json_problem_details( - in template (value) LibMec_TypesAndValues.ProblemDetails p_problemDetails - ) := { - problemDetails := p_problemDetails - } // End of template m_body_json_problem_details + group application_mobilty_service_api { + // template (value) JsonBody m_body_json_app_mobility_service_info( + // in template (value) AppMobilityServiceInfo p_app_mobility_service_info + // ) := { + // appMobilityServiceInfo := p_app_mobility_service_info + // } // End of template mw_body_json_app_mobility_service_info + // template (present) JsonBody mw_body_json_app_mobility_service_info( + // template (present) AppMobilityServiceInfo p_app_mobility_service_info := ? + // ) := { + // appMobilityServiceInfo := p_app_mobility_service_info + // } // End of template mw_body_json_app_mobility_service_info - template (present) JsonBody mw_body_json_ams_registration_request( - template (present) Ams_TypesAndValues.RegistrationRequest p_registrationRequest := ? - ) := { - registrationRequest_ams := p_registrationRequest - } // End of template mw_body_json_ue_identity_problem_details - template (value) JsonBody m_body_json_ams_registration_request( - in template (value) Ams_TypesAndValues.RegistrationRequest p_registrationRequest - ) := { - registrationRequest_ams := p_registrationRequest - } // End of template m_body_json_ue_identity_problem_details - - template (value) JsonBody m_body_json_ams_registration_request_with_error( - in template (value) Ams_TypesAndValues.RegistrationRequestWithError p_registrationRequestWithError - ) := { - registrationRequestWithError_ams := p_registrationRequestWithError - } // End of template m_body_json_ue_identity_problem_details + template (value) JsonBody m_body_json_ams_registration_info( + in template (value) RegistrationInfo p_registrationInfo + ) := { + registrationInfo := p_registrationInfo + } // End of template m_body_json_ams_registration_info - template (present) JsonBody mw_body_json_ams_subscriptions( - template (present) Ams_TypesAndValues.MobilityProcedureSubscription_ p_amsSubscriptionLinkList := ? - ) := { - subscriptionLinkList_ams := p_amsSubscriptionLinkList - } // End of template mw_body_json_ue_identity_problem_details + template (present) JsonBody mw_body_json_ams_registration_request( + template (present) RegistrationInfo p_registrationInfo := ? + ) := { + registrationInfo := p_registrationInfo + } // End of template mw_body_json_ams_registration_request + + // template (value) JsonBody m_body_json_ams_registration_request_with_error( + // in template (value) ApplicationMobilityServiceAPI_TypesAndValues.RegistrationRequestWithError p_registrationRequestWithError + // ) := { + // registrationRequestWithError_ams := p_registrationRequestWithError + // } // End of template m_body_json_ue_identity_problem_details + + // template (present) JsonBody mw_body_json_ams_subscriptions( + // template (present) ApplicationMobilityServiceAPI_TypesAndValues.MobilityProcedureSubscription p_amsSubscriptionLinkList := ? + // ) := { + // subscriptionLinkList_ams := p_amsSubscriptionLinkList + // } // End of template mw_body_json_ue_identity_problem_details + + template (present) JsonBody m_body_json_ams_subscriptions( + template (present) ApplicationMobilityServiceAPI_TypesAndValues.MobilityProcedureSubscription p_amsSubscriptionLinkList := ? + ) := { + subscriptionLinkList_ams := p_amsSubscriptionLinkList + } // End of template mw_body_json_ue_identity_problem_details - template (present) JsonBody m_body_json_ams_subscriptions( - template (present) Ams_TypesAndValues.MobilityProcedureSubscription_ p_amsSubscriptionLinkList := ? - ) := { - subscriptionLinkList_ams := p_amsSubscriptionLinkList - } // End of template mw_body_json_ue_identity_problem_details + template (present) JsonBody mw_body_json_mobility_procedure_notification( + template (present) ApplicationMobilityServiceAPI_TypesAndValues.MobilityProcedureSubscription p_amsSubscriptionLinkList := ? + ) := { + subscriptionLinkList_ams := p_amsSubscriptionLinkList + } // End of template mw_body_json_mobility_procedure_notification - template (present) JsonBody mw_body_json_mobility_procedure_notification( - template (present) Ams_TypesAndValues.MobilityProcedureSubscription_ p_amsSubscriptionLinkList := ? - ) := { - subscriptionLinkList_ams := p_amsSubscriptionLinkList - } // End of template mw_body_json_mobility_procedure_notification + template (present) JsonBody mw_body_json_adjacent_application_info_notification( + template (present) ApplicationMobilityServiceAPI_TypesAndValues.AdjacentAppInfoSubscription p_adjacentAppInfoSubscription := ? + ) := { + adjacentAppInfoSubscription_ams := p_adjacentAppInfoSubscription + } // End of template mw_body_json_mobility_procedure_notification - template (present) JsonBody mw_body_json_adjacent_application_info_notification( - template (present) Ams_TypesAndValues.AdjacentAppInfoSubscription_ p_adjacentAppInfoSubscription := ? - ) := { - adjacentAppInfoSubscription_ams := p_adjacentAppInfoSubscription - } // End of template mw_body_json_mobility_procedure_notification + template (present) JsonBody mw_body_json_expire_notification( + template (present) ApplicationMobilityServiceAPI_TypesAndValues.ExpiryNotification p_expire_notification := ? + ) := { + expireNotification_ams := p_expire_notification + } // End of template mw_body_json_mobility_procedure_notification - template (present) JsonBody mw_body_json_expire_notification( - template (present) Ams_TypesAndValues.ExpiryNotification p_expire_notification := ? - ) := { - expireNotification_ams := p_expire_notification - } // End of template mw_body_json_mobility_procedure_notification - */ -} // end of group ams api + } // end of group application_mobilty_service_api group location_api { -- GitLab From 0dc7c2bfdac70baa510cfed935843d0e3f75e059 Mon Sep 17 00:00:00 2001 From: garciay Date: Tue, 31 Oct 2023 16:36:31 +0100 Subject: [PATCH 31/58] Reorganize AtsMec_ApplicationMobiltyService --- ...pplicationMobiltyServiceAPI_TestCases.ttcn | 1739 +++++++++++++++++ ...licationMobiltyServiceAPI_TestControl.ttcn | 20 + .../module.mk | 39 + 3 files changed, 1798 insertions(+) create mode 100644 ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestCases.ttcn create mode 100644 ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestControl.ttcn create mode 100644 ttcn/AtsMec_ApplicationMobiltyService/module.mk diff --git a/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestCases.ttcn b/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestCases.ttcn new file mode 100644 index 0000000..485c9ac --- /dev/null +++ b/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestCases.ttcn @@ -0,0 +1,1739 @@ +/** +* @author ETSI / STF569 +* @version $URL:$ +* $ID:$ +* @desc This module provides the MEC test cases. +* @copyright ETSI Copyright Notification +* No part may be reproduced except as authorized by written permission. +* The copyright and the foregoing restriction extend to reproduction in all media. +* All rights reserved. +* @see ETSI GS MEC 003, Draft ETSI GS MEC 021 V2.1.1 +*/ + module AtsMec_ApplicationMobiltyServiceAPI_TestCases { + + // Libcommon + import from LibCommon_BasicTypesAndValues all; + import from LibCommon_Sync all; + + // LibHttp + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec_ApplicationMobiltyServiceAPI + import from ApplicationMobilityServiceAPI_Templates all; + import from ApplicationMobilityServiceAPI_Pics all; + import from ApplicationMobilityServiceAPI_Pixits all; + + // LibMec + import from LibMec_TypesAndValues all; + import from LibMec_Templates all; + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + group appMobilityServices { + + /** + * @desc Check that the AMS service returns information about the registered application mobility services when requested + * @see ETSI GS MEC 021 2.1.1, clause 8.3.3.1 + */ + // testcase TC_MEC_MEC012_SRV_AMS_001_OK() runs on HttpComponent system HttpTestAdapter { + // // Local variables + // var Headers v_headers; + // var HttpMessage v_response; + + // // Test control + // if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + // log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + // setverdict(inconc); + // stop; + // } + + // // Test component configuration + // f_cf_01_http_up(); + + // // Preamble + // f_init_default_headers_list(-, -, v_headers); + // httpPort.send( + // m_http_request( + // m_http_request_get( + // "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI, + // v_headers + // ))); + // f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // // Test Body + // tc_ac.start; + // alt { + // [] httpPort.receive( + // mw_http_response( + // mw_http_response_ok( + // mw_http_message_body_json( + // mw_body_json_app_mobility_service_info( + // mw_app_mobility_service_info( + // { + // mw_app_mobility_registration_info( + // mw_service_consumer_id( + // PX_APP_INS_ID, + // PX_MEP_ID + // ) + // ) + // } + // )))))) -> value v_response { + // tc_ac.stop; + + // if (f_check_headers(valueof(v_response.response.header)) == true) { + // log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppTerminationNotificationSubscription ***"); + // f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + // } else { + // log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); + // f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + // } + // } + // [] tc_ac.timeout { + // log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + // f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + // } + // } // End of 'alt' statement + // } // End of testcase TC_MEC_MEC012_SRV_AMS_001_OK + + /** + * @desc Check that the AMS service returns an error when receives a query about a registered application mobility service with wrong parameters + * @see ETSI GS MEC 021 2.1.1, clause 8.3.3.1 + */ + testcase TC_MEC_MEC012_SRV_AMS_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "?appMobilityService=" & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_problem_details( + mw_problem_details( + -, + -, + 400 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // End of testcase TC_MEC_MEC012_SRV_AMS_001_BR + + + /** + * @desc Check that the AMS service creates a new application mobility services when requested + * @see ETSI GS MEC 021 2.1.1, clause 8.3.3.4 + */ + testcase TC_MEC_MEC012_SRV_AMS_002_OK() runs on HttpComponent system HttpTestAdapter { + var Headers v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI, + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + m_registration_info( + PX_APP_MOBILITY_SERVICE_ID, + m_service_consumer_id( + PX_APP_INS_ID, + - + ), + -, + - + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_mobility_service_info( + mw_app_mobility_service_info( + mw_registration_info( + mw_service_consumer_id( + PX_APP_INS_ID, + - + ), + -, + - + ), + PX_APP_MOBILITY_SERVICE_ID + ) + ) + ) + ) + ) + ) + + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo and status code set to 201 Created ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + } // End of testcase TC_MEC_MEC012_SRV_AMS_002_OK + + /** + * @desc Check that the AMS service sends an error when it receives a malformed request to create a new application mobility service + * @see ETSI GS MEC 021 2.1.1, clause 8.3.3.4 + */ + testcase TC_MEC_MEC012_SRV_AMS_002_BR() runs on HttpComponent system HttpTestAdapter { + var Headers v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI, + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + m_registration_info( + PX_APP_MOBILITY_SERVICE_ID, + m_service_consumer_error( + PX_APP_INS_ID, + - + ) + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_problem_details( + mw_problem_details( + -, -, 400 + ) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Problem Details when bad request is performed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // End of testcase TC_MEC_MEC012_SRV_AMS_002_BR + } // End of group appMobilityServices + + + group individualAppMobilityService{ + + /** + * @desc Check that the AMS service returns information about this individual application mobility service + * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.1 + */ + testcase TC_MEC_MEC012_SRV_AMS_011_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_mobility_service_info( + mw_app_mobility_service_info( + -, + PX_APP_MOBILITY_SERVICE_ID + )))))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + } // End of testcase TC_MEC_MEC012_SRV_AMS_011_OK + + /** + * @desc Check that the AMS service sends an error when receives a query about a not existing individual application mobility service + * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.1 + */ + testcase TC_MEC_MEC012_SRV_AMS_011_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found( + ))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // End of testcase TC_MEC_MEC012_SRV_AMS_011_NF + + + + /** + * @desc Check that the AMS service modifies the individual application mobility service when requested + * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.2 + */ + testcase TC_MEC_MEC012_SRV_AMS_012_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + m_registration_info( + PX_APP_MOBILITY_SERVICE_ID, + m_service_consumer_id( + PX_APP_INS_ID, + - + ), + -, + - + ) + ) + ) + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_mobility_service_info( + mw_app_mobility_service_info({ + *, + mw_app_mobility_registration_info( + mw_service_consumer_id( + PX_APP_INS_ID, + - + ), + -, + - + ), + *}, + - + ) + ) + ) + ))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + } // End of testcase TC_MEC_MEC012_SRV_AMS_012_OK + + /** + * @desc Check that the AMS service sends an error when receives a request to modify a not existing individual application mobility service + * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.2 + */ + testcase TC_MEC_MEC012_SRV_AMS_012_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + m_registration_info( + PX_APP_MOBILITY_SERVICE_ID, + m_service_consumer_id( + PX_APP_INS_ID, + - + ), + -, + - + ) + ) + ) + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found( + ))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // End of testcase TC_MEC_MEC012_SRV_AMS_012_NF + + /** + * @desc Check that the AMS service sends an error when receives a request to modify a individual application mobility service using bad parameters + * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.2 + */ + testcase TC_MEC_MEC012_SRV_AMS_012_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_request( + m_registration_info( + PX_APP_MOBILITY_SERVICE_ID, + m_service_consumer_id_with_error( + PX_APP_INS_ID, + - + ), + -, + - + ) + ) + ) + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + ))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // End of testcase TC_MEC_MEC012_SRV_AMS_012_BR + + + /** + * @desc Check that the AMS service de-register the individual application mobility service and delete the resource + * that represents the individual application mobility service + * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.5 + */ + testcase TC_MEC_MEC012_SRV_AMS_013_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content( + ))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 204 No Content ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + } // End of testcase TC_MEC_MEC012_SRV_AMS_013_OK + + /** + * @desc Check that the AMS service sends an error when is requested to delete the resource + * that represents the individual application mobility service + * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.5 + */ + testcase TC_MEC_MEC012_SRV_AMS_013_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found( + ))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // End of testcase TC_MEC_MEC012_SRV_AMS_013_NF + + } + + group appMobilityServiceDeregisterTask { + + /** + * @desc Check that the AMS service deregister an individual application mobility service on expiry of the timer associated with the service + * @see ETSI GS MEC 021 2.0.10, clause 8.5.3.4 + */ + testcase TC_MEC_MEC012_SRV_AMS_014_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")) & "/deregisterTask", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_mobility_service_info( + mw_app_mobility_service_info({ + *, + mw_app_mobility_registration_info( + mw_service_consumer_id( + PX_APP_INS_ID, + - + ), + -, + - + ), + *}, + - + ) + ) + ) + ))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + } // End of testcase TC_MEC_MEC012_SRV_AMS_014_OK + + /** + * @desc Check that the AMS service send an error when is requested to deregister a not existent individual application mobility service + * @see ETSI GS MEC 021 2.0.10, clause 8.5.3.4 + */ + testcase TC_MEC_MEC012_SRV_AMS_014_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")) & "/deregisterTask", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found( + ))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + } // End of testcase TC_MEC_MEC012_SRV_AMS_012_OK + + + } + + group appMobilityServicesSubscriptions { + + /** + * @desc Check that the AMS service returns information about the available subscriptions when requested. + * Permitted SUBSCRIPTION_TYPE are: + * - MobilityProcedureSubscription + * - AdjacentAppInfoSubscription + * @see ETSI GS MEC 021 2.1.1, clause 8.6.3.1 + */ + testcase TC_MEC_MEC012_SRV_AMS_003_OK() runs on HttpComponent system HttpTestAdapter { + var Headers v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + //@TODO: How can we convert enums in strings? + "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionType=" & int2str(enum2int(PX_SUBSCRIPTION_TYPE)), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_subscriptions( + mw_ams_subscription( + PX_SUBSCRIPTION_TYPE, + -, + -, + -, + - + ) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of subscriptions type MobilityProcedureSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // END TC_MEC_MEC012_SRV_AMS_003_OK + + /** + * @desc Check that the AMS service sends an error when it receives a malformed query about the available subscriptions + * @see ETSI GS MEC 021 2.1.1, clause 8.6.3.1 + */ + testcase TC_MEC_MEC012_SRV_AMS_003_BR() runs on HttpComponent system HttpTestAdapter { + var Headers v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionTyp=" & int2str(enum2int(PX_SUBSCRIPTION_TYPE)), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_problem_details( + mw_problem_details( + -, -, 400 + ) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // END of TC_MEC_MEC012_SRV_AMS_003_BR + + /** + * @desc Check that the AMS service creates a notification subscriptions when requested. + * Permitted SUBSCRIPTION_TYPE are: + * - MobilityProcedureSubscription + * - AdjacentAppInfoSubscription + * @see ETSI GS MEC 021 2.1.1, clause 8.6.3.4 + */ + testcase TC_MEC_MEC012_SRV_AMS_004_OK() runs on HttpComponent system HttpTestAdapter { + var Headers v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_ams_subscriptions( + m_ams_subscription( + PX_SUBSCRIPTION_TYPE, + PX_CALLBACK_REFERENCE, + -, + -, + - + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_ams_subscriptions( + mw_ams_subscription( + PX_SUBSCRIPTION_TYPE, + PX_CALLBACK_REFERENCE, + -, + -, + - + ) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AMS Subscription and 201 Created status code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // End of TC_MEC_MEC012_SRV_AMS_004_OK + + /** + * @desc Check that the AMS service sends an error when it receives a malformed request to create a notification subscription + * Permitted SUBSCRIPTION_TYPE are: + * - MobilityProcedureSubscription + * - AdjacentAppInfoSubscription + * @see ETSI GS MEC 021 2.1.1, clause 8.6.3.4 + */ + testcase TC_MEC_MEC012_SRV_AMS_004_BR() runs on HttpComponent system HttpTestAdapter { + var Headers v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_ams_subscriptions( + m_ams_subscription_error( + PX_SUBSCRIPTION_TYPE, + PX_CALLBACK_REFERENCE, + -, + -, + - + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_problem_details( + mw_problem_details( + -, -, 400 + ) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Problem Details and 400 Bad request status code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // End of TC_MEC_MEC012_SRV_AMS_004_BR + + /** + * @desc Check that the AMS service returns information about a given subscription when requested. + * Permitted SUBSCRIPTION_TYPE are: + * - MobilityProcedureSubscription + * - AdjacentAppInfoSubscription + * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.1 + */ + testcase TC_MEC_MEC012_SRV_AMS_005_OK() runs on HttpComponent system HttpTestAdapter { + var Headers v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_subscriptions( + mw_ams_subscription(PX_SUBSCRIPTION_TYPE, -, -, -, -) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of subscriptions type MobilityProcedureSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // End of TC_MEC_MEC012_SRV_AMS_005_OK + + /** + * @desc Check that the AMS service returns an error when receives a query about a not existing subscription + * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.1 + */ + testcase TC_MEC_MEC012_SRV_AMS_005_NF() runs on HttpComponent system HttpTestAdapter { + var Headers v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found( + mw_http_message_body_json( + mw_body_json_problem_details( + mw_problem_details( + -, -, 404 + ) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // End of TC_MEC_MEC012_SRV_AMS_005_NF + + /** + * @desc Check that the AMS service deletes a given subscription when requested + * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.5 + */ + testcase TC_MEC_MEC012_SRV_AMS_006_OK() runs on HttpComponent system HttpTestAdapter { + var Headers v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 No Content on deletion request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // End of TC_MEC_MEC012_SRV_AMS_006_OK + + /** + * @desc Check that the AMS service sends an error when it receives a delete request for a not existing subscription + * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.5 + */ + testcase TC_MEC_MEC012_SRV_AMS_006_NF() runs on HttpComponent system HttpTestAdapter { + var Headers v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found( + mw_http_message_body_json( + mw_body_json_problem_details( + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // End of TC_MEC_MEC012_SRV_AMS_006_NF + + /** + * @desc Check that the AMS service modifies a given subscription when requested. + * Permitted SUBSCRIPTION_TYPE are: + * - MobilityProcedureSubscription + * - AdjacentAppInfoSubscription + * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.2 + */ + testcase TC_MEC_MEC012_SRV_AMS_007_OK() runs on HttpComponent system HttpTestAdapter { + var Headers v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_ams_subscriptions( + m_ams_subscription( + PX_SUBSCRIPTION_TYPE, PX_CALLBACK_REFERENCE, -, -, - + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_subscriptions( + mw_ams_subscription(PX_SUBSCRIPTION_TYPE, -, -, -, -) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // End of TC_MEC_MEC012_SRV_AMS_007_OK + + /** + * @desc Check that the AMS service sends an error when it receives a malformed modify request for a given subscription. + * Permitted SUBSCRIPTION_TYPE are: + * - MobilityProcedureSubscription + * - AdjacentAppInfoSubscription + * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.2 + */ + testcase TC_MEC_MEC012_SRV_AMS_007_BR() runs on HttpComponent system HttpTestAdapter { + var Headers v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + m_registration_info( + PX_APP_MOBILITY_SERVICE_ID, + m_service_consumer_error(PX_APP_INS_ID, -), + -, + - + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_problem_details( + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // End of TC_MEC_MEC012_SRV_AMS_007_BR + + /** + * @desc Check that the AMS service sends an error when it receives a modify request for a not existing subscription + * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.2 + */ + testcase TC_MEC_MEC012_SRV_AMS_007_NF() runs on HttpComponent system HttpTestAdapter { + var Headers v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_ams_subscriptions( + m_ams_subscription( + PX_SUBSCRIPTION_TYPE, PX_CALLBACK_REFERENCE, -, -, - + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found( + mw_http_message_body_json( + mw_body_json_problem_details( + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // End of TC_MEC_MEC012_SRV_AMS_007_NF + + + } // End of group appMobilityServicesSubscriptions + + group ams_notifications { + + /** + * @desc Check that the AMS service sends an AMS notification about a mobility procedure if the AMS service has an associated subscription and the event is generated + * @see ETSI GS MEC 021 2.1.1, clause 7.4.2 + */ + testcase TC_MEC_MEC012_SRV_AMS_008_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_NOTIFICATIONS)) { + log("*** " & testcasename() & ": PICS_AMS and PICS_AMS_NOTIFICATIONS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + action("Trigger a mobility procedure event"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PX_CALLBACK_URI, + -, + mw_http_message_body_json( + mw_body_json_mobility_procedure_notification( + mw_mobility_procedure_notification( + -, + PX_CALLBACK_REFERENCE, + -, + -, + - + ) + ) + ) + ) + ) + ) { + tc_wait.stop; + log("*** " & testcasename() & ": INFO: IUT successfully sends mobility procedure notification ***"); + + // Send 204 No Content + httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully sends mobility procedure notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_wait.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_notif_down(); + } // End of TC_MEC_MEC012_SRV_AMS_008_OK + + /** + * @desc Check that the AMS service sends an AMS notification about adjacent application instances if the AMS service has an associated subscription and the event is generated + * @see ETSI GS MEC 021 2.1.1, clause 7.4.3 + */ + testcase TC_MEC_MEC012_SRV_AMS_009_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_NOTIFICATIONS)) { + log("*** " & testcasename() & ": PICS_AMS and PICS_AMS_NOTIFICATIONS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + action("Trigger a adjacent application info event"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PX_CALLBACK_URI, + -, + mw_http_message_body_json( + mw_body_json_adjacent_application_info_notification( + mw_adjacent_application_info_notification( + -, + PX_CALLBACK_REFERENCE, + -, + -, + - + ) + ) + ) + ) + ) + ) { + tc_wait.stop; + log("*** " & testcasename() & ": INFO: IUT successfully sends adjacent application info notification ***"); + + // Send 204 No Content + httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully sends adjacent application info notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_wait.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_notif_down(); + } + + + /** + * @desc Check that the AMS service sends an AMS notification on subscription expiration if the AMS service has an associated subscription and the event is generated + * @see ETSI GS MEC 021 2.1.1, clause 7.4.4 + */ + testcase TC_MEC_MEC012_SRV_AMS_010_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UInt64 v_timestamp; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_NOTIFICATIONS)) { + log("*** " & testcasename() & ": PICS_AMS and PICS_AMS_NOTIFICATIONS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + action("Trigger a expire notification event"); + v_timestamp := f_get_current_timestamp_utc(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PX_CALLBACK_URI, + -, + mw_http_message_body_json( + mw_body_json_expire_notification( + mw_expire_notification( + -, + -, + { seconds := v_timestamp / 1000, nanoSeconds := 1000 * v_timestamp mod 1000 } + ) + ) + ) + ) + ) + ) { + tc_wait.stop; + log("*** " & testcasename() & ": INFO: IUT successfully sends adjacent application info notification ***"); + + // Send 204 No Content + httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully sends adjacent applicationinfo notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_wait.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_notif_down(); + } + + + + } // End of group ams_notifications + +} // End of module AtsMec_ApplicationMobiltyServiceAPI_TestCases + + + + + + + diff --git a/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestControl.ttcn b/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestControl.ttcn new file mode 100644 index 0000000..ca476c0 --- /dev/null +++ b/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestControl.ttcn @@ -0,0 +1,20 @@ +module AtsMec_ApplicationMobiltyServiceAPI_TestControl { + + // LibMec_ApplicationMobiltyServiceAPI + import from ApplicationMobilityServiceAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec + import from AtsMec_ApplicationMobiltyServiceAPI_TestCases all; + + + control { + + if (PICS_MEC_PLAT and PICS_SERVICES) { + } + + } // End of 'control' statement + +} // End of module AtsMec_ApplicationMobiltyServiceAPI_TestControl diff --git a/ttcn/AtsMec_ApplicationMobiltyService/module.mk b/ttcn/AtsMec_ApplicationMobiltyService/module.mk new file mode 100644 index 0000000..3f0d273 --- /dev/null +++ b/ttcn/AtsMec_ApplicationMobiltyService/module.mk @@ -0,0 +1,39 @@ +suite := AtsMec_ApplicationMobiltyService + +sources := \ + AtsMec_ApplicationMobiltyServiceAPI_TestCases.ttcn \ + AtsMec_ApplicationMobiltyServiceAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/LocationAPI \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/IoTAPI \ + ../LibMec/FederationEnablementAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ + -- GitLab From fa4c21fa98506f97d52f76085fa7d074cb7efd55 Mon Sep 17 00:00:00 2001 From: garciay Date: Mon, 6 Nov 2023 14:56:30 +0100 Subject: [PATCH 32/58] TTF T027: Review MEC 010-2/MEO/Grant --- ...ycleAndOperationGrantingAPI_TestCases.ttcn | 165 +++++++++++++----- ...ycleAndOperationGrantingAPI_Functions.ttcn | 113 ++++++++++++ ...fecycleAndOperationGrantingAPI_Pixits.ttcn | 6 +- ...ycleAndOperationGrantingAPI_Templates.ttcn | 97 ++++++++-- 4 files changed, 322 insertions(+), 59 deletions(-) diff --git a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn index 4d9627b..dbd6084 100644 --- a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn @@ -25,7 +25,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { import from LibHttp_TestSystem all; // LibMec_ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; import from ApplicationPackageLifecycleAndOperationGrantingAPI_Templates all; + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Functions all; import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pics all; import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits all; @@ -69,9 +71,23 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PX_APP_ID, INSTANTIATE, m_grant_request_link( - m_link_type(""), // TODO - m_link_type("") // TODO - ))))))); + m_link_type(PX_APP_LCM_OP_OCC_ID_URI), + m_link_type(PX_APP_INSTANCE_ID_URI) + ), + { + m_resource_definition( + "", // TODO + -, + { "" }, // TODO + m_resource_definition_resource( + m_vim_connection_info( + "", // TODO + "" // TODO + ), + "" // TODO + )) + } + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -99,6 +115,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_001_OK /** @@ -131,11 +150,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PX_APP_INSTANCE_ID, PX_APP_LCM_OP_OCC_ID, PX_APP_ID, - -, + INSTANTIATE, m_grant_request_link( - m_link_type(""), // TODO - m_link_type("") // TODO - ))))))); + m_link_type(PX_APP_LCM_OP_OCC_ID_URI), + m_link_type(PX_APP_INSTANCE_ID_URI) + ) + // addResources not set + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -155,6 +176,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_001_BR /** @@ -190,8 +214,8 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PX_APP_ID, PX_APP_OPERATION, m_grant_request_link( - m_link_type(""), // TODO - m_link_type("") // TODO + m_link_type(PX_APP_LCM_OP_OCC_ID_URI), + m_link_type(PX_APP_INSTANCE_ID_URI) ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -220,6 +244,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_002_OK /** @@ -256,8 +283,8 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PX_APP_ID, PX_APP_OPERATION, m_grant_request_link( - m_link_type(""), // TODO - m_link_type("") // TODO + m_link_type(PX_APP_LCM_OP_OCC_ID_URI), + m_link_type(PX_APP_INSTANCE_ID_URI) ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -299,10 +326,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_003_OK /** - * @desc Check that MEO sends the status of a grant request when a query on a granting ID is performed + * @desc Check that MEO sends a asynchronous grant response when a grant request is requested */ testcase TC_MEC_MEC010p2_MEO_GRANT_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -323,33 +353,64 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_MEO_GRANT_URI & oct2char(unichar2oct(PX_GRANTING_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + m_http_request_post( + PICS_ROOT_API & PX_MEO_GRANT_URI, + v_headers, + m_http_message_body_json( + m_body_json_grant_request( + m_grant_request( + PX_APP_INSTANCE_ID, + PX_APP_LCM_OP_OCC_ID, + PX_APP_ID, + INSTANTIATE, + m_grant_request_link( + m_link_type(PX_APP_LCM_OP_OCC_ID_URI), + m_link_type(PX_APP_INSTANCE_ID_URI) + ), + { + m_resource_definition( + "", // TODO + -, + { "" }, // TODO + m_resource_definition_resource( + m_vim_connection_info( + "", // TODO + "" // TODO + ), + "" // TODO + )) + } + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_grant_response( - mw_grant( - PX_APP_INSTANCE_ID - )))))) -> value v_response { + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_grant_response( + mw_grant + ))))) -> value v_response { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 202 accepted status code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + if (f_check_headers(valueof(v_response.response.header), -, PX_MEO_GRANT_URI & "/" & oct2char(unichar2oct(v_response.response.body.json_body.grantResponse.id))) == false) { + log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Grant Response and cirrect Location header ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_004_OK /** @@ -359,6 +420,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var Grant v_grant; // Test control if (not(PICS_GRANTS_MANAGEMENT)) { @@ -371,11 +433,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_grant_request(v_grant); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_GRANT_URI & oct2char(unichar2oct(PX_GRANTING_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_GRANT_URI & oct2char(unichar2oct(v_grant.id, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -383,36 +446,29 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Test Body tc_ac.start; alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_202_accepted - )) -> value v_response { - repeat; - } [] httpPort.receive( mw_http_response( mw_http_response_ok( mw_http_message_body_json( mw_body_json_grant_response( mw_grant( + v_grant.id, PX_APP_INSTANCE_ID - ) - ))))) { + )))))) -> value v_response { tc_ac.stop; - if (isbound(v_response)) { - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 202 accepted status code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } else { - log("*** " & testcasename() & ": FAIL: IUT successfully didn't respond with a 202 accepted status code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 202 accepted status code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_delete_grant_request(v_grant.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_005_OK /** @@ -422,6 +478,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var Grant v_grant; // Test control if (not(PICS_GRANTS_MANAGEMENT)) { @@ -434,11 +491,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_grant_request(v_grant); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_GRANT_URI & oct2char(unichar2oct(PX_GRANTING_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_GRANT_URI & oct2char(unichar2oct(v_grant.id, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -446,12 +504,19 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Test Body tc_ac.start; alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted + )) -> value v_response { + repeat; + } [] httpPort.receive( mw_http_response( mw_http_response_ok( mw_http_message_body_json( mw_body_json_grant_response( mw_grant( + v_grant.id, PX_APP_INSTANCE_ID )))))) { tc_ac.stop; @@ -469,6 +534,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_delete_grant_request(v_grant.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_006_OK /** diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn index ba95c97..8e53403 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn @@ -1,3 +1,116 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Functions { + // JSON + import from Json all; + + // Libcommon + import from LibCommon_Sync all; + + // LibHttp + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec_ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Templates all; + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pics all; + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits all; + + // LibMec + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + function f_create_grant_request( + out Grant p_grant + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEO_GRANT_URI, + v_headers, + m_http_message_body_json( + m_body_json_grant_request( + m_grant_request( + PX_APP_INSTANCE_ID, + PX_APP_LCM_OP_OCC_ID, + PX_APP_ID, + INSTANTIATE, + m_grant_request_link( + m_link_type(PX_APP_LCM_OP_OCC_ID_URI), + m_link_type(PX_APP_INSTANCE_ID_URI) + ), + { + m_resource_definition( + "", // TODO + -, + { "" }, // TODO + m_resource_definition_resource( + m_vim_connection_info( + "", // TODO + "" // TODO + ), + "" // TODO + )) + } + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_grant_response( + mw_grant + ))))) -> value v_response { + tc_ac.stop; + p_grant := v_response.response.body.json_body.grantResponse; + log("f_create_grant_request: INFO: IUT successfully responds to the GrantRequest: ", p_grant); + } + [] tc_ac.timeout { + log("f_create_grant_request: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_grant_request + + function f_delete_grant_request( + out Json.String p_grant_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_MEO_GRANT_URI & oct2char(unichar2oct(p_grant_id)), + v_headers + ))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) -> value v_response { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_grant_request: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_grant_request + } // End of ApplicationPackageLifecycleAndOperationGrantingAPI_Functions diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn index fbceab5..748e276 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn @@ -12,12 +12,16 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits { modulepar Json.String PX_APP_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1c"; - modulepar OperationType PX_APP_OPERATION := INSTANTIATE; + modulepar OperationType PX_APP_OPERATION := OPERATE; modulepar OperationType PX_APP_OPERATION_ERROR := INSTANTIATE; modulepar Json.String PX_APP_LCM_OP_OCC_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1c" + modulepar Json.AnyURI PX_APP_LCM_OP_OCC_ID_URI := ""; + + modulepar Json.AnyURI PX_APP_INSTANCE_ID_URI := ""; + modulepar Json.String PX_GRANTING_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3"; modulepar Json.String PX_NON_EXISTANT_GRANTING_ID := "PX_NON_EXISTANT_GRANTING_ID"; diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn index 66ac297..2d2310e 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn @@ -15,18 +15,19 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { group granting { - template (value) GrantRequest m_grant_request( - in String p_app_instance_id := PX_APP_INSTANCE_ID, - in String p_appLcmOpOccId := PX_APP_LCM_OP_OCC_ID, - in String p_appDId := PX_APP_ID, - in OperationType p_operation := PX_APP_OPERATION, - in template (value) GrantRequest_Link p_links - ) := { + template (omit) GrantRequest m_grant_request( + in String p_app_instance_id := PX_APP_INSTANCE_ID, + in String p_appLcmOpOccId := PX_APP_LCM_OP_OCC_ID, + in String p_appDId := PX_APP_ID, + in OperationType p_operation := PX_APP_OPERATION, + in template (value) GrantRequest_Link p_links, + in template (omit) ResourceDefinitions p_addResources := omit + ) := { appInstanceId := p_app_instance_id, appLcmOpOccId := p_appLcmOpOccId, appDId := p_appDId, operation := p_operation, - addResources := omit, + addResources := p_addResources, tempResources := omit, updateResources := omit, additionalParams := omit, @@ -54,7 +55,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { template (present) Grant mw_grant( template (present) String p_id := ?, template (present) String p_app_instance_id := PX_APP_INSTANCE_ID, - template (present) String p_appLcmOpOccId := ?, + template (present) String p_appLcmOpOccId := PX_APP_LCM_OP_OCC_ID, template (present) Grant_Link p_links := ? ) := { id := p_id, @@ -100,7 +101,83 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { ) := { href := p_href } // End of template mw_link_type - + + template (omit) ResourceDefinition m_resource_definition( + in Json.String p_id, + in ResourceDefinition_Type p_type_ := OSCONTAINER, + in template (value) ResourceTemplateId p_resourceTemplateId, + in template (value) ResourceDefinition_Resource p_resource, + in template (omit) Json.String p_vduId := omit + ) := { + id := p_id, + type_ := p_type_, + vduId := p_vduId, + resourceTemplateId := p_resourceTemplateId, + resource := p_resource + } // End of template m_resource_definition + + template (present) ResourceDefinition mw_resource_definition( + template (present) Json.String p_id := ?, + template (present) ResourceDefinition_Type p_type_ := ?, + template (present) ResourceTemplateId p_resourceTemplateId := ?, + template (present) ResourceDefinition_Resource p_resource := ?, + template Json.String p_vduId := * + ) := { + id := p_id, + type_ := p_type_, + vduId := p_vduId, + resourceTemplateId := p_resourceTemplateId, + resource := p_resource + } // End of template mw_resource_definition + + template (value) ResourceDefinition_Resource m_resource_definition_resource( + in template (value) VimConnectionInfo p_vimConnectionInfo, + in Json.String p_resourceId + ) := { + vimConnectionInfo := p_vimConnectionInfo, + resourceId := p_resourceId + } // End of template m_resource_definition_resource + + template (present) ResourceDefinition_Resource mw_resource_definition_resource( + template (present) VimConnectionInfo p_vimConnectionInfo := ?, + template (present) Json.String p_resourceId := ? + ) := { + vimConnectionInfo := p_vimConnectionInfo, + resourceId := p_resourceId + } // End of template mw_resource_definition_resource + + template (omit) VimConnectionInfo m_vim_connection_info( + in Json.String p_id, + in Json.String p_vimType, + in template (omit) Json.String p_vimId := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_interfaceInfo := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_accessInfo := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_extra := omit + ) := { + id := p_id, + vimId := p_vimId, + vimType := p_vimType, + interfaceInfo := p_interfaceInfo, + accessInfo := p_accessInfo, + extra := p_extra + } // End of template m_vim_connection_info + + template (present) VimConnectionInfo mw_vim_connection_info( + template (present) Json.String p_id := ?, + template (present) Json.String p_vimType := ?, + template Json.String p_vimId := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_interfaceInfo := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_accessInfo := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_extra := * + ) := { + id := p_id, + vimId := p_vimId, + vimType := p_vimType, + interfaceInfo := p_interfaceInfo, + accessInfo := p_accessInfo, + extra := p_extra + } // End of template mw_vim_connection_info + } // End of group granting group pkgmgt { -- GitLab From 3fb4fb9c393ac90170c2d3c2fc5e70fc4acbcfce Mon Sep 17 00:00:00 2001 From: garciay Date: Thu, 9 Nov 2023 10:19:40 +0100 Subject: [PATCH 33/58] TTF T027: Review MEC 010-2/MEO/Pkgm --- ...ycleAndOperationGrantingAPI_TestCases.ttcn | 294 +++++++++++++----- ...leAndOperationGrantingAPI_TestControl.ttcn | 49 ++- ...ycleAndOperationGrantingAPI_Functions.ttcn | 151 ++++++++- ...ycleAndOperationGrantingAPI_Templates.ttcn | 46 ++- ...ndOperationGrantingAPI_TypesAndValues.ttcn | 5 +- 5 files changed, 469 insertions(+), 76 deletions(-) diff --git a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn index dbd6084..18617bd 100644 --- a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn @@ -584,6 +584,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_006_NF } // End of group granting @@ -618,12 +621,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_http_message_body_json( m_body_json_create_package_management( m_create_package_management( - "appPkgName", + PX_APP_PKG_NAME, PX_APP_PKG_VERSION, m_checksum(-, PX_CHECKSUM), PX_APP_PKG_PATH )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -634,19 +636,15 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response_201_created( mw_http_message_body_json( mw_body_json_app_pkg_info( - mw_app_pkg_info/*( - -, - PX_APP_PKG_NAME, - PX_APP_PKG_VERSION, - mw_checksum, - PX_OPERATIONAL_STATE, - PX_USAGE_STATE - )*/ - ))))) -> value v_response { + mw_app_pkg_info( + -, -, + PX_APP_PKG_NAME, + PX_APP_PKG_VERSION, + -, + mw_checksum + )))))) -> value v_response { tc_ac.stop; - // TODO Chek Location header - log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -655,11 +653,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_001_OK /** - * @desc Check that MEO creates a new App Package when requested + * @desc Check that MEO responds with an error when it receives a malformed request for creating a new App Package */ testcase TC_MEC_MEC010p2_MEO_PKGM_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -690,7 +690,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_checksum(-, PX_CHECKSUM), PX_APP_PKG_PATH )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -710,7 +709,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_001_BR /** @@ -720,6 +721,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -732,6 +734,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -739,7 +742,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEO_PKGM_URI, v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -749,8 +751,19 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_app_pkg_info_list - )))) -> value v_response { + mw_body_json_app_pkg_info_list( + { + *, + mw_app_pkg_info( + -, -, + PX_APP_PKG_NAME, + PX_APP_PKG_VERSION, + -, + mw_checksum + ), + * + } + ))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package list ***"); @@ -761,16 +774,20 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_002_01_OK /** - * @desc Check that MEO returns the list of App Packages when requested - Note 3 + * @desc Check that MEO returns the list of on-boarded packages when requested - Note 3 */ testcase TC_MEC_MEC010p2_MEO_PKGM_002_02_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -783,6 +800,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info, true); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -800,8 +818,19 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_app_pkg_info_list - )))) -> value v_response { + mw_body_json_app_pkg_info_list( + { + *, + mw_app_pkg_info( + -, -, + PX_APP_PKG_NAME, + PX_APP_PKG_VERSION, + -, + mw_checksum + ), + * + } + ))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package list ***"); @@ -813,11 +842,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } } // End of 'alt' statement + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_002_02_OK /** - * @desc Check that MEO responds with an error when it receives - * a malformed request for retrieving the list of existing App Packages + * @desc Check that MEO responds with an error when it receives a malformed request for retrieving the list of existing App Packages */ testcase TC_MEC_MEC010p2_MEO_PKGM_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -862,6 +893,8 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } } // End of 'alt' statement + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_002_BR /** @@ -871,6 +904,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -883,11 +917,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")), v_headers ))); @@ -902,7 +937,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_message_body_json( mw_body_json_app_pkg_info( mw_app_pkg_info( - PX_APP_PKG_ID + v_app_pkg_info.id )))))) -> value v_response { tc_ac.stop; @@ -915,6 +950,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } } // End of 'alt' statement + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_003_01_OK /** @@ -924,6 +962,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -936,11 +975,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info, true); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")), v_headers ))); @@ -968,11 +1008,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } } // End of 'alt' statement + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_003_02_OK /** - * @desc Check that MEO responds with an error when it receives - * a request for retrieving a App Package referred with a wrong ID + * @desc Check that MEO responds with an error when it receives a request for retrieving a App Package referred with a wrong ID */ testcase TC_MEC_MEC010p2_MEO_PKGM_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -994,7 +1036,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_PKG_ID, "UTF-8")), v_headers ))); @@ -1018,6 +1060,8 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } } // End of 'alt' statement + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_003_NF /** @@ -1027,6 +1071,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -1039,11 +1084,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")), v_headers ))); @@ -1067,6 +1113,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } } // End of 'alt' statement + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_004_OK /** @@ -1093,7 +1142,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_PKG_ID, "UTF-8")), v_headers ))); @@ -1117,6 +1166,8 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } } // End of 'alt' statement + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_004_NF /** @@ -1126,6 +1177,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -1138,18 +1190,18 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_patch( - PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_app_pkg_info_modification( m_app_pkg_info_modification( DISABLED )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1161,7 +1213,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_message_body_json( mw_body_json_app_pkg_info_modification( mw_app_pkg_info_modification( - DISABLED + DISABLED )))))) -> value v_response { tc_ac.stop; @@ -1174,11 +1226,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } } // End of 'alt' statement + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_005_OK /** - * @desc Check that MEO sends an error when it receives a malformed request to modify - * the operational state of an application package + * @desc Check that MEO sends an error when it receives a malformed request to modify the operational state of an application package */ testcase TC_MEC_MEC010p2_MEO_PKGM_005_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1205,9 +1259,8 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_http_message_body_json( m_body_json_app_pkg_info_modification( m_app_pkg_info_modification( - DISABLED + ERROR_BAD_REQUEST // Should be DISABLED )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1228,6 +1281,8 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } } // End of 'alt' statement + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_005_BR /** @@ -1282,6 +1337,8 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } } // End of 'alt' statement + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_005_NF /** @@ -1314,7 +1371,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_app_pkg_info_subscription( PX_CALLBACK_URI )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1341,11 +1397,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } } // End of 'alt' statement + // Postamble + f_delete_app_pkg_subscription(v_response.response.body.json_body.appPkgSubscriptionInfo.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_006_OK /** - * @desc Check that MEO service sends an error when it receives a - * malformed request for creating a new subscription on AppPackages + * @desc Check that MEO service sends an error when it receives a malformed request for creating a new subscription on AppPackages */ testcase TC_MEC_MEC010p2_MEO_PKGM_006_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1375,7 +1433,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PX_CALLBACK_URI, "Invalid_field" )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1396,15 +1453,18 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } } // End of 'alt' statement + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_006_BR /** * @desc Check that MEO service returns the list of Application Package Subscriptions when requested */ - testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -1417,6 +1477,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_app_pkg_subscription(v_app_pkg_subscription_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -1424,7 +1485,67 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEO_PKGM_SUBS, v_headers ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_pkgm_subscription_link_list( + mw_app_pkg_ubscription_link_list( + mw_app_pkg_subscription_link_list_link( + -, + { + *, + mw_app_pkg_subscription_link_list_link_subscription(v_app_pkg_subscription_info.links.self_.href) , + * + } + ))))))) -> value v_response { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info list ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK_01 + + /** + * @desc Check that MEO service returns an empty list of Application Package Subscriptions when requested + */ + testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEO_PKGM_SUBS, + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1434,8 +1555,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_pkgm_subscription_link_list // TODO - )))) -> value v_response { + mw_body_json_pkgm_subscription_link_list( + mw_app_pkg_ubscription_link_list( + mw_app_pkg_subscription_link_list_link( + -, + omit + ))))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info list ***"); @@ -1446,8 +1571,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK_02 /** * @desc Check that MEO service returns an Application Package Subscription when requested @@ -1456,6 +1583,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -1468,14 +1596,14 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_app_pkg_subscription(v_app_pkg_subscription_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(v_app_pkg_subscription_info.id, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1502,7 +1630,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_008_OK /** @@ -1531,7 +1662,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1551,7 +1681,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_008_NF /** @@ -1561,6 +1693,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -1573,14 +1706,14 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_app_pkg_subscription(v_app_pkg_subscription_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(v_app_pkg_subscription_info.id, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1600,7 +1733,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_009_OK /** @@ -1630,7 +1765,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1650,7 +1784,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_009_NF /** @@ -1661,10 +1797,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)) { - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + if (not(PICS_APP_PACKAGE_NOTIFICATIONS)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_NOTIFICATIONS required for executing the TC ***"); setverdict(inconc); stop; } @@ -1673,7 +1810,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_app_pkg_subscription(v_app_pkg_subscription_info); f_init_default_headers_list(-, -, v_headers); + action("Trigger application package notification"); // TODO To be reviewed f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1682,7 +1821,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_request( mw_http_request_post( - PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), // TODO To be changed + PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(v_app_pkg_subscription_info.id, "UTF-8")), // TODO To be changed v_headers, mw_http_message_body_json( mw_body_json_app_package_notification( @@ -1698,7 +1837,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_010_OK /** @@ -1749,7 +1891,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_011_OK /** @@ -1799,7 +1943,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_011_NF /** @@ -1850,7 +1996,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_01_OK /** @@ -1901,7 +2049,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_02_OK /** @@ -1950,7 +2100,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_01_NG /** @@ -1999,7 +2151,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_02_NG } // End of group meo_pkgmgt diff --git a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn index bb58ede..fc89480 100644 --- a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn @@ -11,7 +11,54 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl { control { - if (PICS_MEC_PLAT and PICS_SERVICES) { + if (PICS_MEC_PLAT) { + if (PICS_APP_PACKAGE_MANAGEMENT) { + if (PICS_GRANTS_MANAGEMENT) { + execute(TC_MEC_MEC010p2_MEO_GRANT_001_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_001_BR()); + execute(TC_MEC_MEC010p2_MEO_GRANT_002_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_003_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_004_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_005_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_006_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_006_NF()); + } + + if (PICS_APP_PACKAGE_MANAGEMENT) { + execute(TC_MEC_MEC010p2_MEO_PKGM_001_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_001_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_002_01_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_002_02_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_002_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_003_01_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_003_02_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_003_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_004_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_004_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_005_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_005_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_005_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_006_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_006_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_007_OK_01()); + execute(TC_MEC_MEC010p2_MEO_PKGM_007_OK_02()); + execute(TC_MEC_MEC010p2_MEO_PKGM_008_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_008_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_009_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_009_NF()); + + execute(TC_MEC_MEC010p2_MEO_PKGM_011_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_011_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_01_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_02_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_01_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_02_NF()); + } + + if (PICS_APP_PACKAGE_NOTIFICATIONS) { + execute(TC_MEC_MEC010p2_MEO_PKGM_010_OK()); + } + } } } // End of 'control' statement diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn index 8e53403..506cc44 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn @@ -88,7 +88,6 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Functions { ) runs on HttpComponent { // Local variables var Headers v_headers; - var HttpMessage v_response; f_init_default_headers_list(-, -, v_headers); httpPort.send( @@ -103,7 +102,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Functions { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) -> value v_response { + )) { tc_ac.stop; } [] tc_ac.timeout { @@ -113,4 +112,152 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Functions { } // End of function f_delete_grant_request + function f_create_package_management( + out AppPkgInfo p_app_pkg_info, + in boolean p_onboarded := false + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEO_PKGM_URI, + v_headers, + m_http_message_body_json( + m_body_json_create_package_management( + m_create_package_management( + PX_APP_PKG_NAME, + PX_APP_PKG_VERSION, + m_checksum(-, PX_CHECKSUM), + PX_APP_PKG_PATH + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_pkg_info( + mw_app_pkg_info( + -, -, + PX_APP_PKG_NAME, + PX_APP_PKG_VERSION, + -, + mw_checksum + )))))) -> value v_response { + tc_ac.stop; + + p_app_pkg_info := v_response.response.body.json_body.appPkgInfo; + log("f_create_package_management: INFO: IUT successfully responds to the CreateAppPkg: ", p_app_pkg_info); + } + [] tc_ac.timeout { + log("f_create_package_management: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_package_management + + function f_delete_package_management( + in Json.String p_pkg_info_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_MEO_PKGM_URI & oct2char(unichar2oct(p_pkg_info_id)), + v_headers + ))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_package_management: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_delete_package_management + + function f_create_app_pkg_subscription( + out AppPkgSubscriptionInfo p_app_pkg_subscription_info + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEO_PKGM_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_pkgm_subscription( + m_app_pkg_info_subscription( + PX_CALLBACK_URI + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_pkgm_subscription_info( + mw_app_pkg_subscription_info( + -, + -, + PX_CALLBACK_URI + )))))) -> value v_response { + tc_ac.stop; + p_app_pkg_subscription_info := v_response.response.body.json_body.appPkgSubscriptionInfo; + log("f_create_app_pkg_subscription: INFO: IUT responds to the AppPkgSubscriptionInfo: ", p_app_pkg_subscription_info); + } + [] tc_ac.timeout { + log("f_create_app_pkg_subscription: INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_create_app_pkg_subscription + + function f_delete_app_pkg_subscription( + in Json.String p_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_MEO_PKGM_SUBS & oct2char(unichar2oct(p_id)), + v_headers + ))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) -> value v_response { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_app_pkg_subscription: INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_delete_app_pkg_subscription + } // End of ApplicationPackageLifecycleAndOperationGrantingAPI_Functions diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn index 2d2310e..d5c1efc 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn @@ -336,7 +336,51 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { ) := { self_ := { href := p_href } } // End of template mw_app_pkg_link - + + template (value) AppPkgSubscriptionLinkList m_app_pkg_ubscription_link_list( + in template (value) AppPkgSubscriptionLinkList_Link p_links + ) := { + links := p_links + } // End of template m_app_pkg_ubscription_link_list + + template (present) AppPkgSubscriptionLinkList mw_app_pkg_ubscription_link_list( + template (present) AppPkgSubscriptionLinkList_Link p_links := ? + ) := { + links := p_links + } // End of template mw_app_pkg_ubscription_link_list + + template (omit) AppPkgSubscriptionLinkList_Link m_app_pkg_subscription_link_list_link( + in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_self_, + in template (omit) AppPkgSubscriptionLinkList_Link_Subscriptions p_subscriptions := omit + ) := { + self_ := p_self_, + subscriptions := p_subscriptions + } // End of template m_app_pkg_subscription_link_list_link + + template (present) AppPkgSubscriptionLinkList_Link mw_app_pkg_subscription_link_list_link( + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_self_ := ?, + template AppPkgSubscriptionLinkList_Link_Subscriptions p_subscriptions := * + ) := { + self_ := p_self_, + subscriptions := p_subscriptions + } // End of template mw_app_pkg_subscription_link_list_link + + template (value) AppPkgSubscriptionLinkList_Link_Subscription m_app_pkg_subscription_link_list_link_subscription( + in Json.AnyURI p_href, + in AppPkgSubscriptionType p_subscriptionType + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template m_app_pkg_subscription_link_list_link_subscription + + template (present) AppPkgSubscriptionLinkList_Link_Subscription mw_app_pkg_subscription_link_list_link_subscription( + template (present) Json.AnyURI p_href := ?, + template (present) AppPkgSubscriptionType p_subscriptionType := ? + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template mw_app_pkg_subscription_link_list_link_subscription + } // End of group pkgmgt group mepm_lifcyclemgt { diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn index d89f785..1bb202a 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn @@ -1384,8 +1384,9 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { } type enumerated AppPkgInfo_OperationalState { - ENABLED (0), - DISABLED (1) + ENABLED (0), + DISABLED (1), + ERROR_BAD_REQUEST (2) } type enumerated UsageState { -- GitLab From 67e4737e27362341cde0eb0d6e5894b0c4940430 Mon Sep 17 00:00:00 2001 From: garciay Date: Mon, 13 Nov 2023 09:24:01 +0100 Subject: [PATCH 34/58] TTF T027: Review MEC 010-2/MEPM/Pkgm --- ...ycleAndOperationGrantingAPI_TestCases.ttcn | 620 +++++++++++++++--- ...leAndOperationGrantingAPI_TestControl.ttcn | 143 ++-- ...ycleAndOperationGrantingAPI_Functions.ttcn | 8 +- ...LifecycleAndOperationGrantingAPI_Pics.ttcn | 4 + ...ycleAndOperationGrantingAPI_Templates.ttcn | 56 +- 5 files changed, 683 insertions(+), 148 deletions(-) diff --git a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn index 18617bd..c5e1092 100644 --- a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn @@ -1790,8 +1790,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_009_NF /** - * @desc Check that the MEO service sends a application package notification - * if the MEO service has an associated subscription and the event is generated + * @desc Check that the MEO service sends a application package notification if the MEO service has an associated subscription and the event is generated */ testcase TC_MEC_MEC010p2_MEO_PKGM_010_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1807,7 +1806,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // Test component configuration - f_cf_01_http_up(); + f_cf_01_http_notif_up(); // Preamble f_create_app_pkg_subscription(v_app_pkg_subscription_info); @@ -1840,7 +1839,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); - f_cf_01_http_down(); + f_cf_01_http_notif_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_010_OK /** @@ -2166,7 +2165,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { testcase TC_MEC_MEC010p2_MEPM_PKGM_001_01_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -2179,6 +2178,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -2186,7 +2186,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEPM_PKGM_URI, v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2196,8 +2195,17 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_app_pkg_info_list - )))) -> value v_response { + mw_body_json_app_pkg_info_list( + { + *, + mw_app_pkg_info( + v_app_pkg_info.id, + v_app_pkg_info.appDId + ) + , + * + } + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package list ***"); @@ -2208,7 +2216,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_001_01_OK /** @@ -2217,7 +2228,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { testcase TC_MEC_MEC010p2_MEPM_PKGM_001_02_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -2230,6 +2241,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info, true); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -2237,7 +2249,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED, // FIXME Rename into PX_PKGM_URI_ONBOARDED v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2247,8 +2258,19 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_app_pkg_info_list - )))) -> value v_response { + mw_body_json_app_pkg_info_list( + { + *, + mw_app_pkg_info( + v_app_pkg_info.id, + v_app_pkg_info.appDId, + -, -, -, -, -, + ONBOARDED + ) + , + * + } + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package list ***"); @@ -2259,12 +2281,14 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_001_02_OK /** - * @desc Check that MEPM responds with an error when it receives - * a malformed request for retrieving the list of existing App Packages + * @desc Check that MEPM responds with an error when it receives a malformed request for retrieving the list of existing App Packages */ testcase TC_MEC_MEC010p2_MEPM_PKGM_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2288,7 +2312,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEPM_PKGM_URI & "?filter()", v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2308,7 +2331,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_001_BR /** @@ -2317,7 +2342,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { testcase TC_MEC_MEC010p2_MEPM_PKGM_002_01_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -2330,14 +2355,14 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2349,8 +2374,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_message_body_json( mw_body_json_app_pkg_info( mw_app_pkg_info( - PX_APP_PKG_ID - )))))) -> value v_response { + v_app_pkg_info.id, + v_app_pkg_info.appDId + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package ***"); @@ -2361,7 +2387,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_002_01_OK /** @@ -2370,7 +2399,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { testcase TC_MEC_MEC010p2_MEPM_PKGM_002_02_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -2383,14 +2412,14 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info, true); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2402,8 +2431,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_message_body_json( mw_body_json_app_pkg_info( mw_app_pkg_info( - PX_APP_PKG_ID - )))))) -> value v_response { + v_app_pkg_info.id, + v_app_pkg_info.appDId, + -, -, -, -, -, + ONBOARDED + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package ***"); @@ -2414,17 +2446,18 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_002_02_OK /** - * @desc Check that MEPM responds with an error when it receives - * a request for retrieving a App Package referred with a wrong ID + * @desc Check that MEPM responds with an error when it receives a request for retrieving a App Package referred with a wrong ID */ testcase TC_MEC_MEC010p2_MEPM_PKGM_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -2441,10 +2474,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_PKG_ID, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2453,7 +2485,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) -> value v_response { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); @@ -2464,7 +2496,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_002_NF /** @@ -2497,7 +2531,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_app_pkg_info_subscription( PX_CALLBACK_URI )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2523,17 +2556,18 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_app_pkg_subscription(v_response.response.body.json_body.appPkgSubscriptionInfo.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_003_OK /** - * @desc Check that MEPM service sends an error when it receives a - * malformed request for creating a new subscription on AppPackages + * @desc Check that MEPM service sends an error when it receives a malformed request for creating a new subscription on AppPackages */ testcase TC_MEC_MEC010p2_MEPM_PKGM_003_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -2558,7 +2592,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PX_CALLBACK_URI, "Invalid_field" )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2567,7 +2600,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) -> value v_response { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); @@ -2578,7 +2611,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_003_BR /** @@ -2587,7 +2622,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { testcase TC_MEC_MEC010p2_MEPM_PKGM_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -2600,6 +2635,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_app_pkg_subscription(v_app_pkg_subscription_info, PX_MEPM_PKGM_SUBS); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -2607,7 +2643,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEPM_PKGM_SUBS, v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2617,8 +2652,16 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_pkgm_subscription_link_list // TODO - )))) -> value v_response { + mw_body_json_pkgm_subscription_link_list( + mw_app_pkg_ubscription_link_list( + mw_app_pkg_subscription_link_list_link( + -, + { + *, + mw_app_pkg_subscription_link_list_link_subscription(v_app_pkg_subscription_info.links.self_.href) , + * + } + ))))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info list ***"); @@ -2629,7 +2672,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_004_OK /** @@ -2638,7 +2684,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { testcase TC_MEC_MEC010p2_MEPM_PKGM_005_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -2651,11 +2697,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_app_pkg_subscription(v_app_pkg_subscription_info, PX_MEPM_PKGM_SUBS); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(v_app_pkg_subscription_info.id, "UTF-8")), v_headers ))); @@ -2670,11 +2717,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_message_body_json( mw_body_json_pkgm_subscription_info( mw_app_pkg_subscription_info( - PX_APP_PKG_ID, + v_app_pkg_subscription_info.id, -, PX_CALLBACK_URI, m_app_pkg_link("") // TODO - )))))) -> value v_response { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info ***"); @@ -2685,16 +2732,18 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_005_OK /** - * @desc Check that MEPM service returns an Application Package Subscription when requested + * @desc Check that MEPM service sends an error when it receives a query for a subscription on AppPackages with a wrong identifier */ testcase TC_MEC_MEC010p2_MEPM_PKGM_005_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -2723,7 +2772,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) -> value v_response { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); @@ -2734,7 +2783,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_005_NF /** @@ -2743,7 +2794,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { testcase TC_MEC_MEC010p2_MEPM_PKGM_006_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -2756,6 +2807,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_app_pkg_subscription(v_app_pkg_subscription_info, PX_MEPM_PKGM_SUBS); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -2763,7 +2815,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2772,7 +2823,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) -> value v_response { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info ***"); @@ -2783,17 +2834,17 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_006_OK /** - * @desc Check that MEPM service sends an error when it receives a deletion request for a subscription on AppPackages - * with a wrong identifier + * @desc Check that MEPM service sends an error when it receives a deletion request for a subscription on AppPackages with a wrong identifier */ testcase TC_MEC_MEC010p2_MEPM_PKGM_006_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -2813,7 +2864,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2822,7 +2872,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) -> value v_response { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); @@ -2833,17 +2883,18 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_006_NF /** - * @desc Check that the MEPM service sends a application package notification - * if the MEPM service has an associated subscription and the event is generated + * @desc Check that the MEPM service sends a application package notification if the MEPM service has an associated subscription and the event is generated */ testcase TC_MEC_MEC007p2_MEPM_PKGM_007_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -2853,24 +2904,31 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // Test component configuration - f_cf_01_http_up(); + f_cf_01_http_notif_up(); // Preamble - f_init_default_headers_list(-, -, v_headers); + f_create_app_pkg_subscription(v_app_pkg_subscription_info); + f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")) & "/appd", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { - [] httpPort.receive( - mw_http_request( - mw_http_request_post( - PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), // TODO To be changed - v_headers, - mw_http_message_body_json( - mw_body_json_app_package_notification( - mw_app_pkg_notification // TODO To be refined - ))))) -> value v_response { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), // TODO To be changed + v_headers, + mw_http_message_body_json( + mw_body_json_app_package_notification( + mw_app_pkg_notification // TODO To be refined + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully sends notification info ***"); @@ -2881,16 +2939,19 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); + f_cf_01_http_notif_down(); } // End of testcase TC_MEC_MEC007p2_MEPM_PKGM_007_OK /** * @desc Check that MEPM reads the content of the AppD of on-boarded individual application package resources when requested */ - testcase TC_MEC_MEC010p2_MEPM_PKGM_009_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEPM_PKGM_008_NA() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -2903,12 +2964,66 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info, true); f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")) & "/appd", + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")) & "/appd", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_405_not_applicable + )) { + tc_ac.stop; + + // TODO Check HTTP message body + log("*** " & testcasename() & ": PASS: IUT successfully responds with AppId content ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_008_NA + + /** + * @desc Check that MEPM reads the content of the AppD of on-boarded individual application package resources when requested + */ + testcase TC_MEC_MEC010p2_MEPM_PKGM_009_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + + // Test control + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_package_management(v_app_pkg_info, true); + f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")) & "/appd", v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2920,7 +3035,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( ? // TODO To be refined - ))) -> value v_response { + ))) { tc_ac.stop; // TODO Check HTTP message body @@ -2932,7 +3047,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_009_OK /** @@ -2941,7 +3059,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { testcase TC_MEC_MEC010p2_MEPM_PKGM_009_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -2959,7 +3076,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")) & "/appd", + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_PKG_ID, "UTF-8")) & "/appd", v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2970,7 +3087,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) -> value v_response { + )) { tc_ac.stop; // TODO Check HTTP message body @@ -2982,9 +3099,326 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_009_NF + /** + * @desc Check that MEPM responds with an error when it receives a PUT request referring an application descriptor AppD + */ + testcase TC_MEC_MEC010p2_MEPM_PKGM_010_FO() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + + // Test control + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_package_management(v_app_pkg_info, true); + f_init_default_headers_list(-, -, v_headers); + // TODO Set accept filed to application/zip... + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")) & "/appd", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_403_forbidden + )) { + tc_ac.stop; + + // TODO Check HTTP message body + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_010_FO + + /** + * @desc Check that MEPM responds with an error when it receives a DELETE request referring an application descriptor AppD + */ + testcase TC_MEC_MEC010p2_MEPM_PKGM_011_NA() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + + // Test control + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_package_management(v_app_pkg_info, true); + f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")) & "/appd", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_405_not_applicable + )) { + tc_ac.stop; + + // TODO Check HTTP message body + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_011_NA + + /** + * @desc Check that MEPM fetches the on-boarded application package content identified by appPkgId when requested + */ + testcase TC_MEC_MEC010p2_MEPM_PKGM_012_01_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + + // Test control + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_package_management(v_app_pkg_info, true); + f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")) & "/package_content", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + ? // TODO To be refined + ))) { + tc_ac.stop; + + // TODO Check HTTP message body + log("*** " & testcasename() & ": PASS: IUT successfully responds with AppId content ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_012_01_OK + + /** + * @desc Check that MEPM fetches the on-boarded application package content identified by appDId when requested + */ + testcase TC_MEC_MEC010p2_MEPM_PKGM_012_02_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + + // Test control + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_package_management(v_app_pkg_info, true); + f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")) & "/package_content", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + ? // TODO To be refined + ))) { + tc_ac.stop; + + // TODO Check HTTP message body + log("*** " & testcasename() & ": PASS: IUT successfully responds with AppId content ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_012_02_OK + + /** + * @desc Check that MEPM fetches the on-boarded application package content identified by appPkgId when requested + */ + testcase TC_MEC_MEC010p2_MEPM_PKGM_012_01_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_PKG_ID, "UTF-8")) & "/package_content", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + // TODO Check HTTP message body + log("*** " & testcasename() & ": PASS: IUT successfully responds with AppId content ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_012_01_NF + + /** + * @desc Check that MEPM service sends an error when it receives a query with an application package with a wrong identifier + */ + testcase TC_MEC_MEC010p2_MEPM_PKGM_012_02_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_ON_BOARDED_APP_PKG_ID, "UTF-8")) & "/package_content", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + // TODO Check HTTP message body + log("*** " & testcasename() & ": PASS: IUT successfully responds with AppId content ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_012_02_NF + } // End of group mepm_pkgmgt group mepm_lifcyclemgt { diff --git a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn index fc89480..3f788e3 100644 --- a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn @@ -13,50 +13,111 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl { if (PICS_MEC_PLAT) { if (PICS_APP_PACKAGE_MANAGEMENT) { - if (PICS_GRANTS_MANAGEMENT) { - execute(TC_MEC_MEC010p2_MEO_GRANT_001_OK()); - execute(TC_MEC_MEC010p2_MEO_GRANT_001_BR()); - execute(TC_MEC_MEC010p2_MEO_GRANT_002_OK()); - execute(TC_MEC_MEC010p2_MEO_GRANT_003_OK()); - execute(TC_MEC_MEC010p2_MEO_GRANT_004_OK()); - execute(TC_MEC_MEC010p2_MEO_GRANT_005_OK()); - execute(TC_MEC_MEC010p2_MEO_GRANT_006_OK()); - execute(TC_MEC_MEC010p2_MEO_GRANT_006_NF()); - } - - if (PICS_APP_PACKAGE_MANAGEMENT) { - execute(TC_MEC_MEC010p2_MEO_PKGM_001_OK()); - execute(TC_MEC_MEC010p2_MEO_PKGM_001_BR()); - execute(TC_MEC_MEC010p2_MEO_PKGM_002_01_OK()); - execute(TC_MEC_MEC010p2_MEO_PKGM_002_02_OK()); - execute(TC_MEC_MEC010p2_MEO_PKGM_002_BR()); - execute(TC_MEC_MEC010p2_MEO_PKGM_003_01_OK()); - execute(TC_MEC_MEC010p2_MEO_PKGM_003_02_OK()); - execute(TC_MEC_MEC010p2_MEO_PKGM_003_NF()); - execute(TC_MEC_MEC010p2_MEO_PKGM_004_OK()); - execute(TC_MEC_MEC010p2_MEO_PKGM_004_NF()); - execute(TC_MEC_MEC010p2_MEO_PKGM_005_OK()); - execute(TC_MEC_MEC010p2_MEO_PKGM_005_BR()); - execute(TC_MEC_MEC010p2_MEO_PKGM_005_NF()); - execute(TC_MEC_MEC010p2_MEO_PKGM_006_OK()); - execute(TC_MEC_MEC010p2_MEO_PKGM_006_BR()); - execute(TC_MEC_MEC010p2_MEO_PKGM_007_OK_01()); - execute(TC_MEC_MEC010p2_MEO_PKGM_007_OK_02()); - execute(TC_MEC_MEC010p2_MEO_PKGM_008_OK()); - execute(TC_MEC_MEC010p2_MEO_PKGM_008_NF()); - execute(TC_MEC_MEC010p2_MEO_PKGM_009_OK()); - execute(TC_MEC_MEC010p2_MEO_PKGM_009_NF()); - execute(TC_MEC_MEC010p2_MEO_PKGM_011_OK()); - execute(TC_MEC_MEC010p2_MEO_PKGM_011_NF()); - execute(TC_MEC_MEC010p2_MEO_PKGM_012_01_OK()); - execute(TC_MEC_MEC010p2_MEO_PKGM_012_02_OK()); - execute(TC_MEC_MEC010p2_MEO_PKGM_012_01_NF()); - execute(TC_MEC_MEC010p2_MEO_PKGM_012_02_NF()); + if (PICS_IUT_MEO) { + if (PICS_GRANTS_MANAGEMENT) { + execute(TC_MEC_MEC010p2_MEO_GRANT_001_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_001_BR()); + execute(TC_MEC_MEC010p2_MEO_GRANT_002_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_003_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_004_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_005_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_006_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_006_NF()); + } + + if (PICS_APP_PACKAGE_MANAGEMENT) { + execute(TC_MEC_MEC010p2_MEO_PKGM_001_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_001_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_002_01_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_002_02_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_002_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_003_01_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_003_02_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_003_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_004_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_004_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_005_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_005_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_005_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_006_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_006_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_007_OK_01()); + execute(TC_MEC_MEC010p2_MEO_PKGM_007_OK_02()); + execute(TC_MEC_MEC010p2_MEO_PKGM_008_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_008_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_009_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_009_NF()); + + execute(TC_MEC_MEC010p2_MEO_PKGM_011_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_011_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_01_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_02_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_01_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_02_NF()); + } + + if (PICS_APP_PACKAGE_NOTIFICATIONS) { + execute(TC_MEC_MEC010p2_MEO_PKGM_010_OK()); + } } - if (PICS_APP_PACKAGE_NOTIFICATIONS) { - execute(TC_MEC_MEC010p2_MEO_PKGM_010_OK()); + if (PICS_IUT_MEPM) { + if (PICS_APP_PACKAGE_MANAGEMENT) { + execute(TC_MEC_MEC010p2_MEO_PKGM_001_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_001_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_002_01_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_002_02_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_002_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_003_01_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_003_02_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_003_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_004_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_004_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_005_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_005_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_005_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_006_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_006_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_007_OK_01()); + execute(TC_MEC_MEC010p2_MEO_PKGM_007_OK_02()); + execute(TC_MEC_MEC010p2_MEO_PKGM_008_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_008_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_009_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_009_NF()); + + execute(TC_MEC_MEC010p2_MEO_PKGM_011_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_011_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_01_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_02_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_01_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_02_NF()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_001_01_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_001_02_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_001_BR()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_002_01_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_002_02_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_002_NF()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_003_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_003_BR()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_004_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_005_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_006_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_006_NF()); + execute(TC_MEC_MEC007p2_MEPM_PKGM_007_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_008_NA()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_011_NA()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_012_01_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_012_02_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_012_01_NF()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_012_02_NF()); + + if (PICS_APP_PACKAGE_NOTIFICATIONS) { + execute(TC_MEC_MEC010p2_MEPM_PKGM_009_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_009_NF()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_010_FO()); + } + } } } } diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn index 506cc44..498bdb7 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn @@ -189,7 +189,9 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Functions { } // End of function f_delete_package_management function f_create_app_pkg_subscription( - out AppPkgSubscriptionInfo p_app_pkg_subscription_info + out AppPkgSubscriptionInfo p_app_pkg_subscription_info, + in charstring p_uri := PX_MEO_PKGM_SUBS, + in Json.AnyURI p_callback_uri := PX_CALLBACK_URI ) runs on HttpComponent { // Local variables var Headers v_headers; @@ -199,12 +201,12 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEO_PKGM_SUBS, + PICS_ROOT_API & p_uri, v_headers, m_http_message_body_json( m_body_json_pkgm_subscription( m_app_pkg_info_subscription( - PX_CALLBACK_URI + p_callback_uri )))))); tc_ac.start; diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pics.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pics.ttcn index 6ca4b50..807f5dc 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pics.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pics.ttcn @@ -1,5 +1,9 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Pics { + modulepar boolean PICS_IUT_MEO := true; + + modulepar boolean PICS_IUT_MEPM := false; + /** * @desc Does the IUT support GRANT? */ diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn index d5c1efc..850db51 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn @@ -210,18 +210,52 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { appPkgPath := p_appPkgPath } // End of template mw_create_package_management + template (omit) AppPkgInfo m_app_pkg_info( + in template (value) Json.String p_id, + in template (value) Json.String p_appDId, + in template (value) Json.String p_appName, + in template (value) Json.String p_appSoftwareVersion, + in template (value) Json.String p_appDVersion, + in template (value) Checksum p_checksum, + in template (value) AppPkgSWImageInfo p_softwareImages, + in template (value) OnboardingState p_onboardingState, + in template (value) AppPkgInfo_OperationalState p_operationalState, + in template (value) UsageState p_usageState, + in template (value) AppPkgInfo_MecInfo p_mecInfo, + in template (value) AppPkgInfo_Links p_links, + in template (omit) Json.String p_appProvider := omit + ) := { + id := p_id, + appDId := p_appDId, + appProvider := p_appProvider, + appName := p_appName, + appSoftwareVersion := p_appSoftwareVersion, + appDVersion := p_appDVersion, + checksum := p_checksum, + signingCertificate := omit, + softwareImages := p_softwareImages, + additionalArtifacts := omit, + onboardingState := p_onboardingState, + operationalState := p_operationalState, + usageState := p_usageState, + mecInfo := p_mecInfo, + userDefinedData := omit, + onboardingFailureDetails := omit, + links := p_links + } // End of template m_app_pkg_info + template (present) AppPkgInfo mw_app_pkg_info( - template (present) Json.String p_id:= ?, - template (present) Json.String p_appDId:= ?, - template (present) Json.String p_appName:= ?, - template (present) Json.String p_appSoftwareVersion:= ?, - template (present) Json.String p_appDVersion:= ?, - template (present) Checksum p_checksum:= ?, - template (present) AppPkgSWImageInfo p_softwareImages:= ?, - template (present) OnboardingState p_onboardingState:= ?, - template (present) AppPkgInfo_OperationalState p_operationalState:= ?, - template (present) UsageState p_usageState:= ?, - template (present) AppPkgInfo_MecInfo p_mecInfo:= ?, + template (present) Json.String p_id := ?, + template (present) Json.String p_appDId := ?, + template (present) Json.String p_appName := ?, + template (present) Json.String p_appSoftwareVersion := ?, + template (present) Json.String p_appDVersion := ?, + template (present) Checksum p_checksum := ?, + template (present) AppPkgSWImageInfo p_softwareImages := ?, + template (present) OnboardingState p_onboardingState := ?, + template (present) AppPkgInfo_OperationalState p_operationalState := ?, + template (present) UsageState p_usageState := ?, + template (present) AppPkgInfo_MecInfo p_mecInfo := ?, template (present) AppPkgInfo_Links p_links := ? ) := { id := p_id, -- GitLab From fb21ff14f44e2ece9c570c713ce29c1bb98a66ca Mon Sep 17 00:00:00 2001 From: garciay Date: Mon, 13 Nov 2023 09:40:40 +0100 Subject: [PATCH 35/58] TTF T027: Review MEC 010-2/MEPM/LCM --- ...ycleAndOperationGrantingAPI_TestCases.ttcn | 27 ++++++++++--------- ...leAndOperationGrantingAPI_TestControl.ttcn | 4 ++- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn index c5e1092..5f92583 100644 --- a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn @@ -3429,7 +3429,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { testcase TC_MEC_MEC010p2_MEPM_LCM_01_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -3466,7 +3465,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_202_accepted - )) -> value v_response { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); @@ -3476,17 +3475,17 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_LCM_01_OK /** - * @desc Check that MEC API provider sends an error when it receives a malformed request - * for the configuration information in AppD to the MEPM-V + * @desc Check that MEC API provider sends an error when it receives a malformed request for the configuration information in AppD to the MEPM-V */ testcase TC_MEC_MEC010p2_MEPM_LCM_01_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -3523,7 +3522,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) -> value v_response { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); @@ -3533,17 +3532,17 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_LCM_01_BR /** - * @desc Check that MEC API provider sends an error when it receives a request - * for the configuration information in AppD to the MEPM-V with not valid app instance ID + * @desc Check that MEC API provider sends an error when it receives a request for the configuration information in AppD to the MEPM-V with not valid app instance ID */ testcase TC_MEC_MEC010p2_MEPM_LCM_01_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -3580,7 +3579,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) -> value v_response { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); @@ -3590,7 +3589,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_LCM_01_NF } // End of group mepm_lifcyclemgt diff --git a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn index 3f788e3..6808dfd 100644 --- a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn @@ -111,7 +111,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl { execute(TC_MEC_MEC010p2_MEPM_PKGM_012_02_OK()); execute(TC_MEC_MEC010p2_MEPM_PKGM_012_01_NF()); execute(TC_MEC_MEC010p2_MEPM_PKGM_012_02_NF()); - + execute(TC_MEC_MEC010p2_MEPM_LCM_01_OK()); + execute(TC_MEC_MEC010p2_MEPM_LCM_01_BR()); + if (PICS_APP_PACKAGE_NOTIFICATIONS) { execute(TC_MEC_MEC010p2_MEPM_PKGM_009_OK()); execute(TC_MEC_MEC010p2_MEPM_PKGM_009_NF()); -- GitLab From 0b7b85fac647799545fde5e58c7fd5ce6bf851a7 Mon Sep 17 00:00:00 2001 From: garciay Date: Mon, 13 Nov 2023 15:22:49 +0100 Subject: [PATCH 36/58] TTF T027: Review MEC 010-2/MEX/LCM - Step1 --- ...ycleAndOperationGrantingAPI_TestCases.ttcn | 1000 ++++++++++++++++- ...leAndOperationGrantingAPI_TestControl.ttcn | 21 + ...ycleAndOperationGrantingAPI_Functions.ttcn | 174 ++- ...LifecycleAndOperationGrantingAPI_Pics.ttcn | 2 + ...fecycleAndOperationGrantingAPI_Pixits.ttcn | 6 +- ...ycleAndOperationGrantingAPI_Templates.ttcn | 96 +- ...ndOperationGrantingAPI_TypesAndValues.ttcn | 5 +- ttcn/LibMec/ttcn/LibMec_Pics.ttcn | 4 +- ttcn/LibMec/ttcn/LibMec_Pixits.ttcn | 4 +- .../ttcn/LibHttp_JsonMessageBodyTypes.ttcn | 6 +- .../ttcn/LibHttp_JsonTemplates.ttcn | 77 +- 11 files changed, 1333 insertions(+), 62 deletions(-) diff --git a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn index 5f92583..181ddf7 100644 --- a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn @@ -3595,7 +3595,953 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // End of testcase TC_MEC_MEC010p2_MEPM_LCM_01_NF } // End of group mepm_lifcyclemgt - + + group mex_app_instance_mgt { + + /** + * @desc Check that MEC API provider creates a new App Package when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_package_management(v_app_pkg_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI, + v_headers, + m_http_message_body_json( + m_body_json_create_app_instance_request( + m_create_app_instance_request( + v_app_pkg_info.appDId, + v_app_pkg_info.appName & "_1" + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_instance_info( + mw_app_instance_info( + -, + v_app_pkg_info.appDId + )))))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance(v_app_pkg_info.id, v_response.response.body.json_body.appInstanceInfo.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_001_OK + + /** + * @desc Check that MEC API provider sends an error when it receives a malformed request for the creation of a new App Instance + */ + testcase TC_MEC_MEC010p2_MEX_LCM_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI, + v_headers, + m_http_message_body_json( + m_body_json_create_app_instance_request( + m_create_app_instance_request( + PX_NON_EXISTENT_APP_PKG_ID, + "PX_NON_EXISTENT_APP_PKG_ID_1" + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an error cocde ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_001_BR + + /** + * @desc Check that MEC API provider retrieves the list of App instances when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instanceInfo; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_app_instance(v_app_pkg_info, v_app_instanceInfo); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_APP_LCM_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_instance_info_list( + { + *, + mw_app_instance_info( + v_app_instanceInfo.id, + v_app_instanceInfo.appDId, + v_app_instanceInfo.appProvider + ), + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of app instance ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_002_OK + + /** + * @desc Check that MEC API provider retrieves an App Package when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instanceInfo; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_app_instance(v_app_pkg_info, v_app_instanceInfo); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instanceInfo.id)), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_instance_info( + mw_app_instance_info( + v_app_instanceInfo.id, + v_app_instanceInfo.appDId, + v_app_instanceInfo.appProvider + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct app instance ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_003_OK + + /** + * @desc Check that MEC API provider fails on retrieving an App Instance when requested using wrong appInstanceId + */ + testcase TC_MEC_MEC010p2_MEX_LCM_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID)), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_003_NF + + /** + * @desc Check that MEC API provider service deletes an App Instance when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instanceInfo; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_app_instance(v_app_pkg_info, v_app_instanceInfo); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instanceInfo.id)), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_004_OK + + /** + * @desc Check that MEC API provider fails on deletion of an App Instance when requested using wrong appInstanceId + */ + testcase TC_MEC_MEC010p2_MEX_LCM_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID)), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_004_NF + + /** + * @desc Check that MEC API provider service instantiates an App Instance when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instanceInfo; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_app_instance(v_app_pkg_info, v_app_instanceInfo); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instanceInfo.id)) & "instantiate", + v_headers, + m_http_message_body_json( + m_body_json_instantiate_app_request( + m_instantiate_app_request( + m_selected_mec_host_info( + { + { key_name := PX_ONBOARD_HOSTID_NAME, key_value := { universal charstring := PX_ONBOARD_HOSTID_VALUE } } + } + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted + )) -> value v_response { + tc_ac.stop; + + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": PASS: FAIL successfully responds with the correct app instance ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_value; + f_get_header(v_response.response.header, "Location", v_header_value); + var charstring v_app_lcm_op_occ_id := regexp( + v_header_value[0], + PX_MEX_LCM_OP_OCC_URI & "/(?*)", + 0 + ); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct header Location ", v_app_lcm_op_occ_id, " ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_005_OK + + /** + * @desc Check that MEC API provider service fails to instantiate an App Instance when it receives a malformed request + */ + testcase TC_MEC_MEC010p2_MEX_LCM_005_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instanceInfo; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_app_instance(v_app_pkg_info, v_app_instanceInfo); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instanceInfo.id)) & "instantiate", + v_headers, + m_http_message_body_json( + m_body_json_instantiate_app_request( + m_instantiate_app_request( + m_selected_mec_host_info( + { + { key_name := "", key_value := { universal charstring := PX_ONBOARD_HOSTID_VALUE } } + } + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_005_BR + + /** + * @desc Check that MEC API provider service fails to instantiate an App Instance when it receives a request related to a not existing App Instance + */ + testcase TC_MEC_MEC010p2_MEX_LCM_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instanceInfo; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_app_instance(v_app_pkg_info, v_app_instanceInfo); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID)) & "instantiate", + v_headers, + m_http_message_body_json( + m_body_json_instantiate_app_request( + m_instantiate_app_request( + m_selected_mec_host_info( + { + { key_name := "", key_value := { universal charstring := PX_ONBOARD_HOSTID_VALUE } } + } + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_005_NF + + /** + * @desc Check that MEC API provider service terminates an App Instance when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_006_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instanceInfo; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instanceInfo, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instanceInfo.id)) & "terminate", + v_headers, + m_http_message_body_json( + m_body_json_terminate_app_request( + m_terminate_app_request + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted + )) -> value v_response { + tc_ac.stop; + + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": PASS: FAIL does not respond with the correct app instance ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_value; + f_get_header(v_response.response.header, "Location", v_header_value); + var charstring v_retrived_app_lcm_op_occ_id := regexp( + v_header_value[0], + PX_MEX_LCM_OP_OCC_URI & "/(?*)", + 0 + ); + if (not(match(v_retrived_app_lcm_op_occ_id, v_app_lcm_op_occ_id))) { + log("*** " & testcasename() & ": PASS: FAIL APP_LCM_OP_OCC_ID mismatched ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct header Location", v_response.response.header, " ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_006_OK + + /** + * @desc Check that MEC API provider service fails to terminate an App Instance when it receives a malformed request + */ + testcase TC_MEC_MEC010p2_MEX_LCM_006_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instanceInfo; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instanceInfo, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instanceInfo.id)) & "instanicate", // Worng URL + v_headers, + m_http_message_body_json( + m_body_json_terminate_app_request( + m_terminate_app_request + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_terminate_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_006_BR + + /** + * @desc Check that MEC API provider service fails to terminate an App Instance when it receives a request related to a not existing App Instance + */ + testcase TC_MEC_MEC010p2_MEX_LCM_006_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instanceInfo; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID)) & "terminate", + v_headers, + m_http_message_body_json( + m_body_json_terminate_app_request( + m_terminate_app_request + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_006_NF + + /** + * @desc Check that MEC API provider service changes the status of an App Instance + */ + testcase TC_MEC_MEC010p2_MEX_LCM_007_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instanceInfo; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instanceInfo, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instanceInfo.id)) & "operate", + v_headers, + m_http_message_body_json( + m_body_json_operate_app_request( + m_operate_app_request + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted( + mw_http_message_body_json( + mw_body_json_operate_app_request( + mw_operate_app_request + + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_terminate_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_007_OK + + /** + * @desc Check that MEC API provider service fails to operate on an App Instance when it receives a malformed request + */ + testcase TC_MEC_MEC010p2_MEX_LCM_007_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instanceInfo; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instanceInfo, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instanceInfo.id)) & "operated", // Wrong URL + v_headers, + m_http_message_body_json( + m_body_json_operate_app_request( + m_operate_app_request + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_terminate_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_007_BR + + /** + * @desc Check that MEC API provider service fails to change the status of an App Instance when it receives a request related to a not existing App Instance + */ + testcase TC_MEC_MEC010p2_MEX_LCM_007_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID)) & "operate", + v_headers, + m_http_message_body_json( + m_body_json_operate_app_request( + m_operate_app_request + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_007_NF + + } // End of group mex_app_instance_mgt + group mex_lifcyclemgt { /** @@ -3604,7 +4550,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { testcase TC_MEC_MEC010p2_MEX_LCM_01_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -3641,7 +4586,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_app_instance_info( -, PX_APP_ID - )))))) -> value v_response { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); @@ -3651,17 +4596,17 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_01_OK /** - * @desc Check that MEC API provider sends an error when it receives a malformed request - * for the creation of a new App Instance + * @desc Check that MEC API provider sends an error when it receives a malformed request for the creation of a new App Instance */ testcase TC_MEC_MEC010p2_MEX_LCM_01_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -3693,7 +4638,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) -> value v_response { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); @@ -3703,7 +4648,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_01_OK /** @@ -3712,7 +4659,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { testcase TC_MEC_MEC010p2_MEX_LCM_02_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -3744,7 +4690,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_body_json_app_instance_info_list/*( (*, mw_app_instance_info(-, PX_APP_ID), *) */ - )))) -> value v_response { + )))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); @@ -3754,7 +4700,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_02_OK /** @@ -3763,7 +4711,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { testcase TC_MEC_MEC010p2_MEX_LCM_03_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -3800,7 +4747,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_link( mw_link_type( PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8"))) - ))))))) -> value v_response { + ))))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); @@ -3810,7 +4757,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_03_OK /** @@ -3819,7 +4768,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { testcase TC_MEC_MEC010p2_MEX_LCM_03_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -3847,7 +4795,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) -> value v_response { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); @@ -3857,7 +4805,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_03_NF /** @@ -3866,7 +4816,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { testcase TC_MEC_MEC010p2_MEX_LCM_04_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -3894,7 +4843,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) -> value v_response { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); @@ -3904,7 +4853,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_04_OK /** @@ -3913,7 +4864,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { testcase TC_MEC_MEC010p2_MEX_LCM_04_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control if (not(PICS_APP_PACKAGE_MANAGEMENT)) { @@ -3941,7 +4891,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) -> value v_response { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); @@ -3951,7 +4901,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_04_NF } // End of group mex_lifcyclemgt diff --git a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn index 6808dfd..314d555 100644 --- a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn @@ -121,6 +121,27 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl { } } } + + if (PICS_IUT_MEX) { + if (PIC_APP_LCM_MANAGEMENT) { + execute(TC_MEC_MEC010p2_MEX_LCM_001_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_001_BR()); + execute(TC_MEC_MEC010p2_MEX_LCM_002_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_003_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_003_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_004_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_004_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_005_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_005_BR()); + execute(TC_MEC_MEC010p2_MEX_LCM_005_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_006_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_006_BR()); + execute(TC_MEC_MEC010p2_MEX_LCM_006_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_007_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_007_BR()); + execute(TC_MEC_MEC010p2_MEX_LCM_007_NF()); + } + } } } } // End of 'control' statement diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn index 498bdb7..6d299b1 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn @@ -237,7 +237,6 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Functions { ) runs on HttpComponent { // Local variables var Headers v_headers; - var HttpMessage v_response; f_init_default_headers_list(-, -, v_headers); httpPort.send( @@ -252,7 +251,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Functions { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) -> value v_response { + )) { tc_ac.stop; } [] tc_ac.timeout { @@ -262,4 +261,175 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Functions { } // End of function f_delete_app_pkg_subscription + function f_create_app_instance( + out AppPkgInfo p_app_pkg_info, + out AppInstanceInfo p_app_instanceInfo + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + f_create_package_management(p_app_pkg_info); + if (not(isbound(p_app_pkg_info))) { + log("f_create_app_instance: Failed to create pkg"); + return; + } + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI, + v_headers, + m_http_message_body_json( + m_body_json_create_app_instance_request( + m_create_app_instance_request( + p_app_pkg_info.appDId, + p_app_pkg_info.appName & "_1" + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_instance_info( + mw_app_instance_info( + -, + p_app_pkg_info.appDId + )))))) -> value v_response { + tc_ac.stop; + p_app_instanceInfo := v_response.response.body.json_body.appInstanceInfo; + log("f_create_app_pkg_subscription: INFO: IUT responds to the AppInstanceInfo: ", p_app_instanceInfo); + } + [] tc_ac.timeout { + log("f_create_app_pkg_subscription: : INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_create_app_instance + + function f_delete_app_instance( + in Json.String p_app_pkg_info_id, + in Json.String p_app_instance_info_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(p_app_instance_info_id)), + v_headers + ))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_app_instance: : INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + + f_delete_package_management(p_app_pkg_info_id); + } // End of function f_delete_app_instance + + function f_instanciate_app_instance( + out AppPkgInfo p_app_pkg_info, + out AppInstanceInfo p_app_instanceInfo, + out charstring p_app_lcm_op_occ_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instanceInfo; + + f_create_app_instance(v_app_pkg_info, v_app_instanceInfo); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instanceInfo.id)) & "instantiate", + v_headers, + m_http_message_body_json( + m_body_json_instantiate_app_request( + m_instantiate_app_request( + m_selected_mec_host_info( + { + { key_name := PX_ONBOARD_HOSTID_NAME, key_value := { universal charstring := PX_ONBOARD_HOSTID_VALUE } } + } + ))))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted + )) -> value v_response { + tc_ac.stop; + + var charstring_list v_header_value; + if (f_check_headers(v_response.response.header)) { + f_get_header(v_response.response.header, "Location", v_header_value); + p_app_lcm_op_occ_id := regexp( + v_header_value[0], + PX_MEX_LCM_OP_OCC_URI & "/(?*)", + 0 + ); + log("f_instanciate_app_instance: IUT successfully responds with the correct header Location ", p_app_lcm_op_occ_id); + } + } + [] tc_ac.timeout { + log("f_instanciate_app_instance: INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_instanciate_app_instance + + function f_terminate_app_instance( + in Json.String p_app_pkg_info_id, + in Json.String p_app_instance_info_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instanceInfo; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instanceInfo.id)) & "instantiate", + v_headers, + m_http_message_body_json( + m_body_json_terminate_app_request( + m_terminate_app_request + ))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_terminate_app_instance: INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + + f_delete_app_instance(p_app_pkg_info_id, p_app_instance_info_id); + } // End of function f_terminate_app_instance + } // End of ApplicationPackageLifecycleAndOperationGrantingAPI_Functions diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pics.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pics.ttcn index 807f5dc..813a098 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pics.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pics.ttcn @@ -4,6 +4,8 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Pics { modulepar boolean PICS_IUT_MEPM := false; + modulepar boolean PICS_IUT_MEX := false; + /** * @desc Does the IUT support GRANT? */ diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn index 748e276..e380c94 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn @@ -71,5 +71,9 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits { modulepar Json.String PX_NON_EXISTENT_SUBSCRIPTION_ID := "NON_EXISTENT_SUBSCRIPTION_ID" modulepar Json.AnyURI PX_APP_PKG_HREF := ""; - + + modulepar Json.String PX_ONBOARD_HOSTID_NAME := ""; + + modulepar Json.String PX_ONBOARD_HOSTID_VALUE := ""; + } // End of module ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn index 850db51..4bf26f4 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn @@ -702,9 +702,9 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { template (omit) Link m_link( in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_self, in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_instantiate := omit, - in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_terminate := omit, - in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_operate := omit, - in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_configure_platform_for_app := omit + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_terminate := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_operate := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_configure_platform_for_app := omit ) := { self_ := p_self, instantiate := p_instantiate, @@ -726,7 +726,95 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { operate := p_operate, configure_platform_for_app := p_configure_platform_for_app } // End of template mw_link - + + template (omit) InstantiateAppRequest m_instantiate_app_request( + in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.MECHostInformation p_selectedMECHostInfo, + in template (omit) VirtualComputeDescriptor p_virtualComputeDescriptor := omit, + in template (omit) OsContainerDescriptors p_osContainerDescriptor := omit, + in template (omit) VirtualStorageDescriptor p_virtualStorageDescriptor := omit, + in template (omit) LocationConstraints p_locationConstraints := omit, + in template (omit) VimConnectionInfos p_vimConnectionInfo := omit, + in template (omit) AppTermCandsForCoord p_appTermCandsForCoord := omit + ) :={ + virtualComputeDescriptor := p_virtualComputeDescriptor, + osContainerDescriptor := p_osContainerDescriptor, + virtualStorageDescriptor := p_virtualStorageDescriptor, + selectedMECHostInfo := p_selectedMECHostInfo, + locationConstraints := p_locationConstraints, + vimConnectionInfo := p_vimConnectionInfo, + appTermCandsForCoord := p_appTermCandsForCoord + } // End of template m_instantiate_app_request + + template (present) InstantiateAppRequest mw_instantiate_app_request( + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.MECHostInformation p_selectedMECHostInfo := ?, + template VirtualComputeDescriptor p_virtualComputeDescriptor := *, + template OsContainerDescriptors p_osContainerDescriptor := *, + template VirtualStorageDescriptor p_virtualStorageDescriptor := *, + template LocationConstraints p_locationConstraints := *, + template VimConnectionInfos p_vimConnectionInfo := *, + template AppTermCandsForCoord p_appTermCandsForCoord := * + ) :={ + virtualComputeDescriptor := p_virtualComputeDescriptor, + osContainerDescriptor := p_osContainerDescriptor, + virtualStorageDescriptor := p_virtualStorageDescriptor, + selectedMECHostInfo := p_selectedMECHostInfo, + locationConstraints := p_locationConstraints, + vimConnectionInfo := p_vimConnectionInfo, + appTermCandsForCoord := p_appTermCandsForCoord + } // End of template mw_instantiate_app_request + + template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.MECHostInformation m_selected_mec_host_info( + in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_hostId, + in template (omit) Json.String p_hostName := omit + ) := { + hostName := p_hostName, + hostId := p_hostId + } // End of template m_selected_mec_host_info + + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.MECHostInformation mw_selected_mec_host_info( + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_hostId := ?, + template Json.String p_hostName := * + ) := { + hostName := p_hostName, + hostId := p_hostId + } // End of template mw_selected_mec_host_info + + template (omit) TerminateAppRequest m_terminate_app_request( + in TerminationType p_termination_type := GRACEFUL, + in template (omit) Json.UInteger p_graceful_termination_timeout := omit + ) := { + terminationType := p_termination_type, + gracefulTerminationTimeout := p_graceful_termination_timeout + } // End of template m_terminate_app_request + + template (present) TerminateAppRequest mw_terminate_app_request( + template (present) TerminationType p_termination_type := ?, + template Json.UInteger p_graceful_termination_timeout := * + ) := { + terminationType := p_termination_type, + gracefulTerminationTimeout := p_graceful_termination_timeout + } // End of template mw_terminate_app_request + + template (omit) OperateAppRequest m_operate_app_request( + in OperationalState p_change_state_to := STOPPED, + in template (omit) StopType p_stop_type := omit, + in template (omit) Json.UInteger p_graceful_stop_timeout := omit + ) := { + changeStateTo := p_change_state_to, + stopType := p_stop_type, + gracefulStopTimeout := p_graceful_stop_timeout + } // End of template m_operate_app_request + + template (present) OperateAppRequest mw_operate_app_request( + template (present) OperationalState p_change_state_to := STOPPED, + template StopType p_stop_type := *, + template Json.UInteger p_graceful_stop_timeout := * + ) := { + changeStateTo := p_change_state_to, + stopType := p_stop_type, + gracefulStopTimeout := p_graceful_stop_timeout + } // End of template mw_operate_app_request + } // End of group mex_lifcyclemgt } // End of module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn index 1bb202a..8971e22 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn @@ -1897,10 +1897,11 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { * @member * @see ETSI GS MEC 010-2 Clause 6.2.5.3 Type: KeyValuePairs */ - type record KeyValuePairs { + type record KeyValuePair { Json.String key_name, - anytype key_value // FIXME To be refined + anytype key_value } + type set of KeyValuePair KeyValuePairs; /** * @desc This data type represents the time stamp as Unix-time since January 1, 1970, 00:00:00 UTC diff --git a/ttcn/LibMec/ttcn/LibMec_Pics.ttcn b/ttcn/LibMec/ttcn/LibMec_Pics.ttcn index 3d77f14..f488964 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pics.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pics.ttcn @@ -36,8 +36,10 @@ module LibMec_Pics { modulepar boolean PICS_APP_PACKAGE_NOTIFICATIONS := true; - modulepar charstring PICS_ROOT_API := "/"; + modulepar boolean PIC_APP_LCM_MANAGEMENT := true; modulepar boolean PIC_APP_LCM_NOTIFICATIONS := true; + modulepar charstring PICS_ROOT_API := "/"; + } // End of module LibMec_Pics diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index 385e889..24b035c 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -56,9 +56,9 @@ module LibMec_Pixits { modulepar charstring PX_APP_LCM_URI := "/app_lcm/v1/app_instances" - modulepar charstring PX_MEX_LCM_SUBS := "/alcmi/v1/subscriptions"; + modulepar charstring PX_MEX_LCM_SUBS := "/app_lcm/v1/subscriptions"; - modulepar charstring PX_MEX_LCM_OP_OCC_URI := "/alcmi/v1/app_lcm_op_occs"; + modulepar charstring PX_MEX_LCM_OP_OCC_URI := "/app_lcm/v1/app_lcm_op_occs"; modulepar charstring PX_UE_APP_CTX_URI := "/mx2/v1/app_contexts"; diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index c1d811b..efde2f5 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -104,12 +104,12 @@ module LibHttp_JsonMessageBodyTypes { CreateAppInstanceRequest createAppInstanceRequest, AppInstanceInfo appInstanceInfo, AppInstanceInfoList appInstanceInfoList, + InstantiateAppRequest appInstanceInstantiate, + TerminateAppRequest terminateAppRequest, + OperateAppRequest changeStateTo, /* AppLCM_TypesAndValues.CreateAppInstanceRequestWithError createAppInstanceRequestWithError, */ - /* AppLCM_TypesAndValues.InstantiateAppRequest appInstanceInstantiate, */ /* AppLCM_TypesAndValues.InstantiateAppRequestWithError appInstanceInstantiateWithError, */ - /* AppLCM_TypesAndValues.TerminateAppRequest terminateType, */ /* AppLCM_TypesAndValues.TerminateAppRequestWithError terminateTypeWithError, */ - /* AppLCM_TypesAndValues.OperateAppRequest changeStateTo, */ /* AppLCM_TypesAndValues.OperateAppRequestWithError changeStateToWithError, */ /* AppLCM_TypesAndValues.AppInstanceLcmOpOcc appInstanceLcmOpOcc, */ /* AppLCM_TypesAndValues.AppInstanceLcmOpOccList appInstanceLcmOpOccList, */ diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn index 52126d5..1aa123e 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -177,30 +177,72 @@ module LibHttp_JsonTemplates { group mex_lifcyclemgt { - template (value) JsonBody m_body_json_create_app_instance_request ( - in template (value) CreateAppInstanceRequest p_create_app_instance_request - ) := { + template (value) JsonBody m_body_json_create_app_instance_request( + in template (value) CreateAppInstanceRequest p_create_app_instance_request + ) := { createAppInstanceRequest := p_create_app_instance_request } // End of template m_body_json_create_app_instance_request - template (value) JsonBody m_body_json_app_instance_info ( - in template (value) AppInstanceInfo p_app_instance_info - ) := { + template (value) JsonBody m_body_json_app_instance_info( + in template (value) AppInstanceInfo p_app_instance_info + ) := { appInstanceInfo := p_app_instance_info } // End of template m_body_json_app_instance_info - template (present) JsonBody mw_body_json_app_instance_info ( - template (present) AppInstanceInfo p_app_instance_info := ? - ) := { + template (present) JsonBody mw_body_json_app_instance_info( + template (present) AppInstanceInfo p_app_instance_info := ? + ) := { appInstanceInfo := p_app_instance_info } // End of template mw_body_json_app_instance_info - template (present) JsonBody mw_body_json_app_instance_info_list ( - template (present) AppInstanceInfoList p_app_instance_info_list := ? - ) := { + template (value) JsonBody m_body_json_app_instance_info_list( + in template (value) AppInstanceInfoList p_app_instance_info_list + ) := { + appInstanceInfoList := p_app_instance_info_list + } // End of template m_body_json_app_instance_info_list + + template (present) JsonBody mw_body_json_app_instance_info_list( + template (present) AppInstanceInfoList p_app_instance_info_list := ? + ) := { appInstanceInfoList := p_app_instance_info_list } // End of template mw_body_json_app_instance_info_list + template (value) JsonBody m_body_json_instantiate_app_request( + in template (value) InstantiateAppRequest p_instantiate_app_request + ) := { + appInstanceInstantiate := p_instantiate_app_request + } // End of template m_body_json_instantiate_app_request + + template (present) JsonBody mw_body_json_instantiate_app_request( + template (present) InstantiateAppRequest p_instantiate_app_request := ? + ) := { + appInstanceInstantiate := p_instantiate_app_request + } // End of template mw_body_json_instantiate_app_request + + template (value) JsonBody m_body_json_terminate_app_request( + in template (value) TerminateAppRequest p_terminate_app_request + ) := { + terminateAppRequest := p_terminate_app_request + } // End of template m_body_json_terminate_app_request + + template (present) JsonBody mw_body_json_terminate_app_request( + template (present) TerminateAppRequest p_terminate_app_request := ? + ) := { + terminateAppRequest := p_terminate_app_request + } // End of template mw_body_json_terminate_app_request + + template (value) JsonBody m_body_json_operate_app_request( + in template (value) OperateAppRequest p_operate_app_request + ) := { + changeStateTo := p_operate_app_request + } // End of template m_body_json_operate_app_request + + template (present) JsonBody mw_body_json_operate_app_request( + template (present) OperateAppRequest p_operate_app_request := ? + ) := { + changeStateTo := p_operate_app_request + } // End of template mw_body_json_operate_app_request + /*template (present) JsonBody mw_body_json_mex_lcm_instance_info_list ( in template (present) AppInstanceInfoList p_app_instance_info_list ) := { @@ -236,17 +278,6 @@ module LibHttp_JsonTemplates { - template (present) JsonBody m_body_json_lifecycle_management_operate ( - in template (present) OperateAppRequest p_app_instance_operate - ) := { - changeStateTo := p_app_instance_operate - } - - template (present) JsonBody m_body_json_lifecycle_management_operate_with_error ( - in template (present) OperateAppRequestWithError p_app_instance_operate_with_error - ) := { - changeStateToWithError := p_app_instance_operate_with_error - } template (present) JsonBody mw_body_json_lifecycle_op_occ_list ( -- GitLab From 9f9d954c9723857f1e7e24263cc762459cf73b79 Mon Sep 17 00:00:00 2001 From: garciay Date: Tue, 14 Nov 2023 10:34:58 +0100 Subject: [PATCH 37/58] TTF T027: Review MEC 010-2/MEX/LCM - Step2 --- ...ycleAndOperationGrantingAPI_TestCases.ttcn | 605 ++++++++++++------ ...leAndOperationGrantingAPI_TestControl.ttcn | 10 + ...ycleAndOperationGrantingAPI_Functions.ttcn | 75 +++ ...fecycleAndOperationGrantingAPI_Pixits.ttcn | 35 +- ...ycleAndOperationGrantingAPI_Templates.ttcn | 144 +++++ ...ndOperationGrantingAPI_TypesAndValues.ttcn | 20 +- .../ttcn/LibHttp_JsonMessageBodyTypes.ttcn | 9 +- .../ttcn/LibHttp_JsonTemplates.ttcn | 97 ++- 8 files changed, 753 insertions(+), 242 deletions(-) diff --git a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn index 181ddf7..0c493af 100644 --- a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn @@ -37,7 +37,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { import from LibMec_Pixits all; group granting { - + /** * @desc Check that MEO sends a synchronous grant response when a grant request is requested - INSTANTIATE */ @@ -101,7 +101,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_grant ))))) -> value v_response { tc_ac.stop; - + if (f_check_headers(valueof(v_response.response.header)) == false) { log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); @@ -167,7 +167,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response_400_bad_request( ))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Bad response ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -230,7 +230,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_grant ))))) -> value v_response { tc_ac.stop; - + if (f_check_headers(valueof(v_response.response.header)) == false) { log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); @@ -312,7 +312,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_grant ))))) -> value v_response_2 { tc_ac.stop; - + if (not(isbound(v_response_1)) or f_check_headers(valueof(v_response_2.response.header)) == false) { log("*** " & testcasename() & ": FAIL: Didn't receive 202 accepted or Header 'Location' was not present in the response headers ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); @@ -394,7 +394,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_grant ))))) -> value v_response { tc_ac.stop; - + if (f_check_headers(valueof(v_response.response.header), -, PX_MEO_GRANT_URI & "/" & oct2char(unichar2oct(v_response.response.body.json_body.grantResponse.id))) == false) { log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); @@ -592,7 +592,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // End of group granting group meo_pkgmgt { - + /** * @desc Check that MEO creates a new App Package when requested */ @@ -657,7 +657,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_001_OK - + /** * @desc Check that MEO responds with an error when it receives a malformed request for creating a new App Package */ @@ -713,7 +713,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_001_BR - + /** * @desc Check that MEO returns the list of App Packages when requested - Note 3 */ @@ -779,7 +779,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_package_management(v_app_pkg_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_002_01_OK - + /** * @desc Check that MEO returns the list of on-boarded packages when requested - Note 3 */ @@ -841,12 +841,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_delete_package_management(v_app_pkg_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_002_02_OK - + /** * @desc Check that MEO responds with an error when it receives a malformed request for retrieving the list of existing App Packages */ @@ -892,11 +892,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_002_BR - + /** * @desc Check that MEO returns the an App Package when requested - Note 3 */ @@ -949,12 +949,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_delete_package_management(v_app_pkg_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_003_01_OK - + /** * @desc Check that MEO returns the an App Package when requested - Note 3 */ @@ -1007,12 +1007,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_delete_package_management(v_app_pkg_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_003_02_OK - + /** * @desc Check that MEO responds with an error when it receives a request for retrieving a App Package referred with a wrong ID */ @@ -1059,11 +1059,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_003_NF - + /** * @desc Check that MEO deletes an App Package when requested */ @@ -1112,12 +1112,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_delete_package_management(v_app_pkg_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_004_OK - + /** * @desc Check that MEO responds with an error when it receives * a request for deleting an App Package referred with a wrong ID @@ -1165,11 +1165,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_004_NF - + /** * @desc Check that MEO updates the operational state of an individual application package resource */ @@ -1225,12 +1225,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_delete_package_management(v_app_pkg_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_005_OK - + /** * @desc Check that MEO sends an error when it receives a malformed request to modify the operational state of an application package */ @@ -1280,11 +1280,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_005_BR - + /** * @desc Check that MEO responds with an error when it receives * a request for updating an App Package referred with a wrong ID @@ -1336,11 +1336,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_005_NF - + /** * @desc Check that MEO service returns an application package subscription when requested */ @@ -1396,12 +1396,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_delete_app_pkg_subscription(v_response.response.body.json_body.appPkgSubscriptionInfo.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_006_OK - + /** * @desc Check that MEO service sends an error when it receives a malformed request for creating a new subscription on AppPackages */ @@ -1452,11 +1452,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_006_BR - + /** * @desc Check that MEO service returns the list of Application Package Subscriptions when requested */ @@ -1519,7 +1519,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK_01 - + /** * @desc Check that MEO service returns an empty list of Application Package Subscriptions when requested */ @@ -1575,7 +1575,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK_02 - + /** * @desc Check that MEO service returns an Application Package Subscription when requested */ @@ -1635,7 +1635,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_008_OK - + /** * @desc Check that MEO service returns an Application Package Subscription when requested */ @@ -1685,7 +1685,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_008_NF - + /** * @desc Check that MEO service deletes an Application Package Subscription when requested */ @@ -1737,7 +1737,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_009_OK - + /** * @desc Check that MEO service sends an error when it receives a deletion request for a subscription on AppPackages * with a wrong identifier @@ -1788,7 +1788,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_009_NF - + /** * @desc Check that the MEO service sends a application package notification if the MEO service has an associated subscription and the event is generated */ @@ -1841,7 +1841,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); f_cf_01_http_notif_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_010_OK - + /** * @desc Check that MEO reads the content of the AppD of on-boarded individual application package resources when requested */ @@ -1894,7 +1894,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_011_OK - + /** * @desc Check that MEO reads the content of the AppD of on-boarded individual application package resources when requested */ @@ -1946,7 +1946,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_011_NF - + /** * @desc Check that MEO fetches the on-boarded application package content identified by appPkgId when requested */ @@ -1999,7 +1999,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_01_OK - + /** * @desc Check that MEO fetches the on-boarded application package content identified by appDId when requested */ @@ -2052,7 +2052,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_02_OK - + /** * @desc Check that MEO fetches the on-boarded application package content identified by appPkgId when requested */ @@ -2103,7 +2103,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_01_NG - + /** * @desc Check that MEO service sends an error when it receives a request refering a wrong on-boarded appPkgId */ @@ -2154,11 +2154,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_02_NG - + } // End of group meo_pkgmgt - + group mepm_pkgmgt { - + /** * @desc Check that MEPM returns the list of App Packages when requested - Note 3 */ @@ -2221,7 +2221,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_package_management(v_app_pkg_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_001_01_OK - + /** * @desc Check that MEPM returns the list of App Packages when requested - Note 3 */ @@ -2286,7 +2286,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_package_management(v_app_pkg_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_001_02_OK - + /** * @desc Check that MEPM responds with an error when it receives a malformed request for retrieving the list of existing App Packages */ @@ -2335,7 +2335,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_001_BR - + /** * @desc Check that MEPM returns the an App Package when requested - Note 3 */ @@ -2392,7 +2392,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_package_management(v_app_pkg_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_002_01_OK - + /** * @desc Check that MEPM returns the an App Package when requested - Note 3 */ @@ -2451,7 +2451,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_package_management(v_app_pkg_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_002_02_OK - + /** * @desc Check that MEPM responds with an error when it receives a request for retrieving a App Package referred with a wrong ID */ @@ -2500,7 +2500,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_002_NF - + /** * @desc Check that MEPM service returns an application package subscription when requested */ @@ -2561,7 +2561,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_app_pkg_subscription(v_response.response.body.json_body.appPkgSubscriptionInfo.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_003_OK - + /** * @desc Check that MEPM service sends an error when it receives a malformed request for creating a new subscription on AppPackages */ @@ -2615,7 +2615,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_003_BR - + /** * @desc Check that MEPM service returns the list of Application Package Subscriptions when requested */ @@ -2677,7 +2677,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_004_OK - + /** * @desc Check that MEPM service returns an Application Package Subscription when requested */ @@ -2737,7 +2737,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_005_OK - + /** * @desc Check that MEPM service sends an error when it receives a query for a subscription on AppPackages with a wrong identifier */ @@ -2787,7 +2787,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_005_NF - + /** * @desc Check that MEPM service deletes an Application Package Subscription when requested */ @@ -2838,7 +2838,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_006_OK - + /** * @desc Check that MEPM service sends an error when it receives a deletion request for a subscription on AppPackages with a wrong identifier */ @@ -2887,7 +2887,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_006_NF - + /** * @desc Check that the MEPM service sends a application package notification if the MEPM service has an associated subscription and the event is generated */ @@ -2944,7 +2944,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); f_cf_01_http_notif_down(); } // End of testcase TC_MEC_MEC007p2_MEPM_PKGM_007_OK - + /** * @desc Check that MEPM reads the content of the AppD of on-boarded individual application package resources when requested */ @@ -2998,7 +2998,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_package_management(v_app_pkg_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_008_NA - + /** * @desc Check that MEPM reads the content of the AppD of on-boarded individual application package resources when requested */ @@ -3052,7 +3052,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_package_management(v_app_pkg_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_009_OK - + /** * @desc Check that MEPM reads the content of the AppD of on-boarded individual application package resources when requested */ @@ -3103,7 +3103,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_009_NF - + /** * @desc Check that MEPM responds with an error when it receives a PUT request referring an application descriptor AppD */ @@ -3157,7 +3157,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_package_management(v_app_pkg_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_010_FO - + /** * @desc Check that MEPM responds with an error when it receives a DELETE request referring an application descriptor AppD */ @@ -3210,7 +3210,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_package_management(v_app_pkg_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_011_NA - + /** * @desc Check that MEPM fetches the on-boarded application package content identified by appPkgId when requested */ @@ -3264,7 +3264,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_package_management(v_app_pkg_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_012_01_OK - + /** * @desc Check that MEPM fetches the on-boarded application package content identified by appDId when requested */ @@ -3318,7 +3318,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_package_management(v_app_pkg_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_012_02_OK - + /** * @desc Check that MEPM fetches the on-boarded application package content identified by appPkgId when requested */ @@ -3368,7 +3368,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_012_01_NF - + /** * @desc Check that MEPM service sends an error when it receives a query with an application package with a wrong identifier */ @@ -3418,11 +3418,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_012_02_NF - + } // End of group mepm_pkgmgt - + group mepm_lifcyclemgt { - + /** * @desc Check that MEC API provider has created the configuration information in AppD to the MEPM-V */ @@ -3479,7 +3479,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_LCM_01_OK - + /** * @desc Check that MEC API provider sends an error when it receives a malformed request for the configuration information in AppD to the MEPM-V */ @@ -3536,7 +3536,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_LCM_01_BR - + /** * @desc Check that MEC API provider sends an error when it receives a request for the configuration information in AppD to the MEPM-V with not valid app instance ID */ @@ -3593,7 +3593,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_LCM_01_NF - + } // End of group mepm_lifcyclemgt group mex_app_instance_mgt { @@ -3660,7 +3660,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_app_instance(v_app_pkg_info.id, v_response.response.body.json_body.appInstanceInfo.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_001_OK - + /** * @desc Check that MEC API provider sends an error when it receives a malformed request for the creation of a new App Instance */ @@ -3715,7 +3715,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_001_BR - + /** * @desc Check that MEC API provider retrieves the list of App instances when requested */ @@ -3779,7 +3779,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_002_OK - + /** * @desc Check that MEC API provider retrieves an App Package when requested */ @@ -3838,7 +3838,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_003_OK - + /** * @desc Check that MEC API provider fails on retrieving an App Instance when requested using wrong appInstanceId */ @@ -3887,7 +3887,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_003_NF - + /** * @desc Check that MEC API provider service deletes an App Instance when requested */ @@ -3940,7 +3940,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_package_management(v_app_pkg_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_004_OK - + /** * @desc Check that MEC API provider fails on deletion of an App Instance when requested using wrong appInstanceId */ @@ -3989,7 +3989,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_004_NF - + /** * @desc Check that MEC API provider service instantiates an App Instance when requested */ @@ -4062,7 +4062,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_005_OK - + /** * @desc Check that MEC API provider service fails to instantiate an App Instance when it receives a malformed request */ @@ -4122,7 +4122,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_005_BR - + /** * @desc Check that MEC API provider service fails to instantiate an App Instance when it receives a request related to a not existing App Instance */ @@ -4182,7 +4182,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_005_NF - + /** * @desc Check that MEC API provider service terminates an App Instance when requested */ @@ -4257,7 +4257,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_delete_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_006_OK - + /** * @desc Check that MEC API provider service fails to terminate an App Instance when it receives a malformed request */ @@ -4314,7 +4314,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_terminate_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_006_BR - + /** * @desc Check that MEC API provider service fails to terminate an App Instance when it receives a request related to a not existing App Instance */ @@ -4369,7 +4369,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_006_NF - + /** * @desc Check that MEC API provider service changes the status of an App Instance */ @@ -4413,7 +4413,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_message_body_json( mw_body_json_operate_app_request( mw_operate_app_request - + ))))) { tc_ac.stop; @@ -4430,7 +4430,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_terminate_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_007_OK - + /** * @desc Check that MEC API provider service fails to operate on an App Instance when it receives a malformed request */ @@ -4487,7 +4487,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_terminate_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_007_BR - + /** * @desc Check that MEC API provider service fails to change the status of an App Instance when it receives a request related to a not existing App Instance */ @@ -4539,40 +4539,220 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_007_NF - + } // End of group mex_app_instance_mgt group mex_lifcyclemgt { - + /** - * @desc Check that MEC API provider retrieves the list of App instances when requested + * @desc Check that MEC API provider service retrieves info about LCM Operation Occurrence on App Instances when requested */ - testcase TC_MEC_MEC010p2_MEX_LCM_01_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEX_LCM_008_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instanceInfo; + var charstring v_app_lcm_op_occ_id; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)) { - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration f_cf_01_http_up(); // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instanceInfo, v_app_lcm_op_occ_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_APP_LCM_URI, + PICS_ROOT_API & PX_MEX_LCM_OP_OCC_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_lcm_op_occ_list( + { + *, + mw_app_lcm_op_occ( + v_app_lcm_op_occ_id + ), + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of AppLcmOpOcc ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_terminate_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_008_OK + + /** + * @desc Check that MEC API provider service retrieves info about LCM Operation Occurrence on an App Instance when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_009_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instanceInfo; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instanceInfo, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_OP_OCC_URI & oct2char(unichar2oct(v_app_lcm_op_occ_id)), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_lcm_op_occ( + mw_app_lcm_op_occ( + v_app_lcm_op_occ_id, + -, -, -, -, + mw_app_lcm_op_occ_link( + PX_MEX_LCM_OP_OCC_URI & oct2char(unichar2oct(v_app_lcm_op_occ_id)) + ))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppLcmOpOcc ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_terminate_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_009_OK + + /** + * @desc Check that MEC API provider service retrieves info about LCM Operation Occurrence on an App Instance when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_009_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_OP_OCC_URI & oct2char(unichar2oct(PX_APP_NON_EXISTANT_LCM_OP_OCC_ID)), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_009_NF + + /** + * @desc Check that MEC API provider service creates a LCM Subscription when requested, where the subscription request can + * have SUBSCRIPTION_TYPE AppInstanceStateChangeSubscription or AppLcmOpOccStateChangeSubscription + */ + testcase TC_MEC_MEC010p2_MEX_LCM_010_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instanceInfo; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instanceInfo, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_SUBS, v_headers, m_http_message_body_json( - m_body_json_create_app_instance_request( - m_create_app_instance_request( - PX_APP_ID - )))))); + m_body_json_app_inst_subscription_request( + m_app_inst_subscription_request( + PX_APP_INST_SUBSCRIPTION_REQUEST, + PX_CALLBACK_URI + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -4580,15 +4760,17 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_app_instance_info( - mw_app_instance_info( - -, - PX_APP_ID - )))))) { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_inst_subscription_info( + mw_app_inst_subscription_info( + -, + PX_APP_INST_SUBSCRIPTION_REQUEST, + PX_CALLBACK_URI + )))))) -> value v_response { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppLcmOpOcc ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -4598,21 +4780,24 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_app_instance_subscription(v_response.response.body.json_body.appInstSubscriptionInfo.id); + f_terminate_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC010p2_MEX_LCM_01_OK - + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_010_OK + /** - * @desc Check that MEC API provider sends an error when it receives a malformed request for the creation of a new App Instance + * @desc Check that MEC API provider service creates a LCM Subscription when requested, where the subscription request can + * have SUBSCRIPTION_TYPE AppInstanceStateChangeSubscription or AppLcmOpOccStateChangeSubscription */ - testcase TC_MEC_MEC010p2_MEX_LCM_01_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEX_LCM_010_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)) { - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration @@ -4623,13 +4808,14 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_APP_LCM_URI, + PICS_ROOT_API & PX_MEX_LCM_SUBS, v_headers, m_http_message_body_json( - m_body_json_create_app_instance_request( - m_create_app_instance_request( - "" - )))))); + m_body_json_app_inst_subscription_request( + m_app_inst_subscription_request( + "PX_APP_INST_SUBSCRIPTION_REQUEST", // Wrong subscription request + PX_CALLBACK_URI + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -4640,7 +4826,8 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response_400_bad_request )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with orrect error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -4651,33 +4838,39 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC010p2_MEX_LCM_01_OK - + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_010_BR + /** - * @desc Check that MEC API provider retrieves the list of App instances when requested + * @desc Check that MEC API provider service sends the list of LCM Subscriptions when requested */ - testcase TC_MEC_MEC010p2_MEX_LCM_02_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEX_LCM_011_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instanceInfo; + var charstring v_app_lcm_op_occ_id; + var AppInstSubscriptionInfo v_app_inst_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)) { - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration f_cf_01_http_up(); // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instanceInfo, v_app_lcm_op_occ_id); + f_create_app_instance_subscription(v_app_inst_subscription_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_APP_LCM_URI, + PICS_ROOT_API & PX_MEX_LCM_SUBS, v_headers - ))); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -4687,12 +4880,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_app_instance_info_list/*( - (*, mw_app_instance_info(-, PX_APP_ID), *) -*/ - )))) { + mw_body_json_app_instance_subscription_link_list( + mw_app_instance_subscription_link_list + ))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppLcmOpOcc ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -4702,34 +4895,42 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_app_instance_subscription(v_app_inst_subscription_info.id); + f_terminate_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC010p2_MEX_LCM_02_OK - + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_011_OK + /** - * @desc Check that MEC API provider retrieves an App Package when requested + * @desc Check that MEC API provider service sends the information about an existing LCM subscription when requested */ - testcase TC_MEC_MEC010p2_MEX_LCM_03_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEX_LCM_012_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instanceInfo; + var charstring v_app_lcm_op_occ_id; + var AppInstSubscriptionInfo v_app_inst_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)) { - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration f_cf_01_http_up(); // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instanceInfo, v_app_lcm_op_occ_id); + f_create_app_instance_subscription(v_app_inst_subscription_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + PICS_ROOT_API & PX_MEX_LCM_SUBS & oct2char(unichar2oct(v_app_inst_subscription_info.id)), v_headers - ))); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -4739,17 +4940,15 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_app_instance_info( - mw_app_instance_info( - -, - PX_APP_ID, - -, -, -, -, -, -, - mw_link( - mw_link_type( - PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8"))) - ))))))) { + mw_body_json_app_inst_subscription_info( + mw_app_inst_subscription_info( + v_app_inst_subscription_info.id, + PX_APP_INST_SUBSCRIPTION_REQUEST, + PX_CALLBACK_URI + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct AppInstSubscriptionInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -4759,21 +4958,23 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_app_instance_subscription(v_app_inst_subscription_info.id); + f_terminate_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC010p2_MEX_LCM_03_OK - + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_012_OK + /** - * @desc Check that MEC API provider fails on retrieving an App Instance when requested using wrong appInstanceId + * @desc Check that MEC API provider service sends an error when it receives a query for a not existing LCM Subscription */ - testcase TC_MEC_MEC010p2_MEX_LCM_03_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEX_LCM_012_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)) { - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration @@ -4784,9 +4985,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID, "UTF-8")), + PICS_ROOT_API & PX_MEX_LCM_SUBS & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID)), v_headers - ))); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -4797,7 +4998,8 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response_404_not_found )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -4808,33 +5010,39 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC010p2_MEX_LCM_03_NF - + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_012_NF + /** - * @desc Check that MEC API provider service deletes an App Instance when requested + * @desc Check that MEC API provider service delete an existing LCM Subscription when requested */ - testcase TC_MEC_MEC010p2_MEX_LCM_04_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEX_LCM_013_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instanceInfo; + var charstring v_app_lcm_op_occ_id; + var AppInstSubscriptionInfo v_app_inst_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)) { - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration f_cf_01_http_up(); // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instanceInfo, v_app_lcm_op_occ_id); + f_create_app_instance_subscription(v_app_inst_subscription_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + PICS_ROOT_API & PX_MEX_LCM_SUBS & oct2char(unichar2oct(v_app_inst_subscription_info.id)), v_headers - ))); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -4845,6 +5053,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response_204_no_content )) { tc_ac.stop; + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -4855,21 +5064,22 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // End of 'alt' statement // Postamble + f_terminate_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC010p2_MEX_LCM_04_OK - + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_013_OK + /** - * @desc Check that MEC API provider fails on deletion of an App Instance when requested using wrong appInstanceId + * @desc Check that MEC API provider service sends an error when it receives a deletion request for a not existing LCM Subscription */ - testcase TC_MEC_MEC010p2_MEX_LCM_04_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEX_LCM_013_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)) { - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration @@ -4880,9 +5090,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID, "UTF-8")), + PICS_ROOT_API & PX_MEX_LCM_SUBS & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID)), v_headers - ))); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -4893,6 +5103,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response_404_not_found )) { tc_ac.stop; + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -4904,8 +5115,8 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC010p2_MEX_LCM_04_NF - + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_013_NF + } // End of group mex_lifcyclemgt - + } // End of module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases diff --git a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn index 314d555..3a67ba8 100644 --- a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn @@ -140,6 +140,16 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl { execute(TC_MEC_MEC010p2_MEX_LCM_007_OK()); execute(TC_MEC_MEC010p2_MEX_LCM_007_BR()); execute(TC_MEC_MEC010p2_MEX_LCM_007_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_008_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_009_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_009_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_010_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_010_BR()); + execute(TC_MEC_MEC010p2_MEX_LCM_011_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_012_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_012_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_013_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_013_NF()); } } } diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn index 6d299b1..61be897 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn @@ -432,4 +432,79 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Functions { f_delete_app_instance(p_app_pkg_info_id, p_app_instance_info_id); } // End of function f_terminate_app_instance + function f_create_app_instance_subscription( + out AppInstSubscriptionInfo p_app_inst_subscription_info + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_app_inst_subscription_request( + m_app_inst_subscription_request( + PX_APP_INST_SUBSCRIPTION_REQUEST, // Wrong subscription request + PX_CALLBACK_URI + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_inst_subscription_info( + mw_app_inst_subscription_info( + -, + PX_APP_INST_SUBSCRIPTION_REQUEST, + PX_CALLBACK_URI + )))))) -> value v_response { + tc_ac.stop; + + p_app_inst_subscription_info := v_response.response.body.json_body.appInstSubscriptionInfo; + log("f_create_app_pkg_subscription: IUT responds to the AppInstSubscriptionInfo: ", p_app_inst_subscription_info); + } + [] tc_ac.timeout { + log("f_create_app_pkg_subscription: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_create_app_instance_subscription + + function f_delete_app_instance_subscription( + in Json.String p_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_MEX_LCM_SUBS & oct2char(unichar2oct(p_id)), + v_headers + ))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + ))) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_create_app_pkg_subscription: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_delete_app_instance_subscription + } // End of ApplicationPackageLifecycleAndOperationGrantingAPI_Functions diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn index e380c94..027b5cc 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn @@ -18,7 +18,9 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits { modulepar Json.String PX_APP_LCM_OP_OCC_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1c" - modulepar Json.AnyURI PX_APP_LCM_OP_OCC_ID_URI := ""; + modulepar Json.String PX_APP_NON_EXISTANT_LCM_OP_OCC_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1c" + + modulepar Json.AnyURI PX_APP_LCM_OP_OCC_ID_URI := "/app_lcm/v1/app_lcm_op_occs/5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1c"; modulepar Json.AnyURI PX_APP_INSTANCE_ID_URI := ""; @@ -44,31 +46,36 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits { modulepar Json.String PX_TRAFFIC_FILTER_PROTOCOL := ""; - modulepar Json.String PX_APP_PKG_NAME := "APP_PKG_NAME" + modulepar Json.String PX_APP_PKG_NAME := "APP_PKG_NAME"; - modulepar Json.String PX_APP_PKG_VERSION := "APP_PKG_VERSION" + modulepar Json.String PX_APP_PKG_VERSION := "APP_PKG_VERSION"; - modulepar Json.String PX_CHECKSUM := "CHECKSUM" + modulepar Json.String PX_CHECKSUM := "CHECKSUM"; - modulepar Json.String PX_APP_PKG_PATH := "APP_PKG_PATH" + modulepar Json.String PX_APP_PKG_PATH := "APP_PKG_PATH"; - modulepar OperationalState PX_OPERATIONAL_STATE := STARTED + modulepar OperationalState PX_OPERATIONAL_STATE := STARTED; - modulepar UsageState PX_USAGE_STATE := NOT_IN_USE + modulepar UsageState PX_USAGE_STATE := NOT_IN_USE; - modulepar Json.String PX_APP_PKG_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f" + modulepar Json.String PX_APP_PKG_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f"; - modulepar Json.String PX_ON_BOARDED_APP_PKG_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f" + modulepar Json.String PX_ON_BOARDED_APP_PKG_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f"; - modulepar Json.String PX_NON_EXISTENT_APP_PKG_ID := "NON_EXISTENT_APP_PKG_ID" + modulepar Json.String PX_NON_EXISTENT_APP_PKG_ID := "NON_EXISTENT_APP_PKG_ID"; - modulepar Json.String PX_NON_EXISTENT_ON_BOARDED_APP_PKG_ID := "NON_ON_BOARDED_EXISTENT_APP_PKG_ID" + modulepar Json.String PX_NON_EXISTENT_ON_BOARDED_APP_PKG_ID := "NON_ON_BOARDED_EXISTENT_APP_PKG_ID"; - modulepar Json.AnyURI PX_CALLBACK_URI := "http://127.0.0.1/callback" + modulepar Json.AnyURI PX_CALLBACK_URI := "http://127.0.0.1/callback"; + + modulepar Json.String PX_APP_INST_SUBSCRIPTION_REQUEST := "AppInstSubscriptionRequest"; + // AppLcmOpOccSubscriptionRequest + // AppInstIdCreationSubscriptionRequest + // AppInstIdDeletionSubscriptionRequest - modulepar Json.String PX_SUBSCRIPTION_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3" + modulepar Json.String PX_SUBSCRIPTION_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3"; - modulepar Json.String PX_NON_EXISTENT_SUBSCRIPTION_ID := "NON_EXISTENT_SUBSCRIPTION_ID" + modulepar Json.String PX_NON_EXISTENT_SUBSCRIPTION_ID := "NON_EXISTENT_SUBSCRIPTION_ID"; modulepar Json.AnyURI PX_APP_PKG_HREF := ""; diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn index 4bf26f4..6a87a81 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn @@ -815,6 +815,150 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { gracefulStopTimeout := p_graceful_stop_timeout } // End of template mw_operate_app_request + template (omit) AppLcmOpOcc m_app_lcm_op_occ( + in Json.String p_id, + in OperationState p_operationState, + in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TimeStamp p_stateEnteredTime, + in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TimeStamp p_startTime, + in OperationType p_lcmOperation, + in template (value) AppLcmOpOcc_Link p_links, + in template (omit) OperationParams p_operationParams := omit, + in template (omit) Json.Bool p_isCancelPending := omit, + in template (omit) CancelMode p_cancelMode := omit + ) := { + id := p_id, + operationState := p_operationState, + stateEnteredTime := p_stateEnteredTime, + startTime := p_startTime, + lcmOperation := p_lcmOperation, + operationParams := p_operationParams, + isCancelPending := p_isCancelPending, + cancelMode := p_cancelMode, + links := p_links + } // End of template m_app_lcm_op_occ + + template (present) AppLcmOpOcc mw_app_lcm_op_occ( + template (present) Json.String p_id := ?, + template (present) OperationState p_operationState := ?, + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TimeStamp p_stateEnteredTime := ?, + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TimeStamp p_startTime := ?, + template (present) OperationType p_lcmOperation := ?, + template (present) AppLcmOpOcc_Link p_links := ?, + template OperationParams p_operationParams := *, + template Json.Bool p_isCancelPending := *, + template CancelMode p_cancelMode := * + ) := { + id := p_id, + operationState := p_operationState, + stateEnteredTime := p_stateEnteredTime, + startTime := p_startTime, + lcmOperation := p_lcmOperation, + operationParams := p_operationParams, + isCancelPending := p_isCancelPending, + cancelMode := p_cancelMode, + links := p_links + } // End of template mw_app_lcm_op_occ + + template (value) AppLcmOpOcc_Link m_app_lcm_op_occ_link( + in Json.AnyURI p_href, + in Json.AnyURI p_app_instance + ) := { + self_ := { href := p_href }, + appInstance := { href := p_app_instance } + } // End of template m_app_lcm_op_occ_link + + template (present) AppLcmOpOcc_Link mw_app_lcm_op_occ_link( + template (present) Json.AnyURI p_href := ?, + template (present) Json.AnyURI p_app_instance := ? + ) := { + self_ := { href := p_href }, + appInstance := { href := p_app_instance } + } // End of template mw_app_lcm_op_occ_link + + template (omit) AppInstSubscriptionRequest m_app_inst_subscription_request( + in Json.String p_subscriptionType, + in Json.AnyURI p_callbackUri, + in template (omit) AppInstanceState p_appInstanceState := omit, + in template (omit) AppInstanceSubscriptionFilter p_appInstanceSubscriptionFilter := omit + ) := { + subscriptionType := p_subscriptionType, + callbackUri := p_callbackUri, + appInstanceState := p_appInstanceState, + appInstanceSubscriptionFilter := p_appInstanceSubscriptionFilter + } // End of template m_app_inst_subscription_request + + template (present) AppInstSubscriptionRequest mw_app_inst_subscription_request( + template (present) Json.String p_subscriptionType := ?, + template (present) Json.AnyURI p_callbackUri := ?, + template AppInstanceState p_appInstanceState := *, + template AppInstanceSubscriptionFilter p_appInstanceSubscriptionFilter := * + ) := { + subscriptionType := p_subscriptionType, + callbackUri := p_callbackUri, + appInstanceState := p_appInstanceState, + appInstanceSubscriptionFilter := p_appInstanceSubscriptionFilter + } // End of template mw_app_inst_subscription_request + + template (omit) AppInstSubscriptionInfo m_app_inst_subscription_info( + in Json.String p_id, + in Json.String p_subscriptionType, + in Json.AnyURI p_callbackUri, + in template (value) AppInstSubscriptionInfo_Link p_links, + in template (omit) AppInstanceState p_appInstanceState := omit, + in template (omit) AppInstanceSubscriptionFilter p_appInstanceSubscriptionFilter := omit + ) := { + id := p_id, + subscriptionType := p_subscriptionType, + appInstanceState := p_appInstanceState, + appInstanceSubscriptionFilter := p_appInstanceSubscriptionFilter, + callbackUri := p_callbackUri, + links := p_links + } // End of template m_app_inst_subscription_info + + template (present) AppInstSubscriptionInfo mw_app_inst_subscription_info( + template (present) Json.String p_id := ?, + template (present) Json.String p_subscriptionType := ?, + template (present) Json.AnyURI p_callbackUri := ?, + template (present) AppInstSubscriptionInfo_Link p_links := ?, + template AppInstanceState p_appInstanceState := *, + template AppInstanceSubscriptionFilter p_appInstanceSubscriptionFilter := * + ) := { + id := p_id, + subscriptionType := p_subscriptionType, + appInstanceState := p_appInstanceState, + appInstanceSubscriptionFilter := p_appInstanceSubscriptionFilter, + callbackUri := p_callbackUri, + links := p_links + } // End of template mw_app_inst_subscription_info + + template (value) AppInstanceSubscriptionLinkList m_app_instance_subscription_link_list( + in template (value) AppInstanceSubscriptionLinkList_Link p_links + ) := { + links := p_links + } // End of template m_app_instance_subscription_link_list + + template (present) AppInstanceSubscriptionLinkList mw_app_instance_subscription_link_list( + template (present) AppInstanceSubscriptionLinkList_Link p_links := ? + ) := { + links := p_links + } // End of template mw_app_instance_subscription_link_list + + template (omit) AppInstanceSubscriptionLinkList_Link m_app_instance_subscription_link_list_link( + in Json.AnyURI p_href, + in template (omit) AppInstanceSubscriptionLinkList_Link_Subscriptions p_subscriptions := omit + ) := { + self_ := { href := p_href }, + subscriptions := p_subscriptions + } // End of template m_app_instance_subscription_link_list_link + + template (present) AppInstanceSubscriptionLinkList_Link mw_app_instance_subscription_link_list_link( + template (present) Json.AnyURI p_href := ?, + template AppInstanceSubscriptionLinkList_Link_Subscriptions p_subscriptions := * + ) := { + self_ := { href := p_href }, + subscriptions := p_subscriptions + } // End of template mw_app_instance_subscription_link_list_link + } // End of group mex_lifcyclemgt } // End of module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn index 8971e22..2f80948 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn @@ -866,6 +866,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { AppInstanceState appInstanceState optional, AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional } + type record of AppInstSubscriptionRequest AppInstSubscriptionRequestList; /** * @desc This data type represents an application lifecycle management operation occurrence @@ -893,6 +894,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { } with { variant (links) "name as '_links'"; } + type record of AppLcmOpOcc AppLcmOpOccList; /** * @desc Input parameters of the LCM operation @@ -1038,8 +1040,8 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { * @member links List of hyperlinks related to the resource * @see ETSI GS MEC 010-2 Clause 6.2.2.19 Type: AppInstanceSubscriptionLinkList */ - type record SubscriptionLinkList { - SubscriptionLinkList_Link links + type record AppInstanceSubscriptionLinkList { + AppInstanceSubscriptionLinkList_Link links } with { variant (links) "name as '_links'"; } @@ -1050,9 +1052,9 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { * @member subscriptions A link list to the subscriptions * @see ETSI GS MEC 010-2 Clause 6.2.2.19 Type: AppInstanceSubscriptionLinkList */ - type record SubscriptionLinkList_Link { - LinkType self_, - SubscriptionLinkList_Link_Subscriptions subscriptions optional + type record AppInstanceSubscriptionLinkList_Link { + LinkType self_, + AppInstanceSubscriptionLinkList_Link_Subscriptions subscriptions optional } with { variant (self_) "name as 'self'"; } @@ -1063,19 +1065,19 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { * @member subscriptionType Type of the subscription * @see ETSI GS MEC 010-2 Clause 6.2.2.19 Type: AppInstanceSubscriptionLinkList */ - type record SubscriptionLinkList_Link_Subscription { + type record AppInstanceSubscriptionLinkList_Link_Subscription { Json.AnyURI href, AppInstanceSubscriptionType subscriptionType } - type record length(1..infinity) of SubscriptionLinkList_Link_Subscription SubscriptionLinkList_Link_Subscriptions; + type record length(1..infinity) of AppInstanceSubscriptionLinkList_Link_Subscription AppInstanceSubscriptionLinkList_Link_Subscriptions; /** * @desc String representing the type of a subscription * @see ETSI GS MEC 010-2 Clause 6.2.2.20.2 Simple data types */ type Json.String AppInstanceSubscriptionType; - + /** * @desc This data type represents the parameters for configuring the MEP to run an application instance * @member appServiceRequired Describes services a MEC application requires to run @@ -1999,7 +2001,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { * @desc Reference of the catalogue. */ type Json.String CategoryRef_Href; - + /** * @desc Unique identifier of the category. */ diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index efde2f5..a70f3da 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -107,15 +107,16 @@ module LibHttp_JsonMessageBodyTypes { InstantiateAppRequest appInstanceInstantiate, TerminateAppRequest terminateAppRequest, OperateAppRequest changeStateTo, + AppLcmOpOccList appLcmOpOccList, + AppLcmOpOcc appLcmOpOcc, + AppInstSubscriptionRequest appInstSubscriptionRequest, + AppInstSubscriptionInfo appInstSubscriptionInfo, + AppInstanceSubscriptionLinkList appInstSubscriptionLinkList, /* AppLCM_TypesAndValues.CreateAppInstanceRequestWithError createAppInstanceRequestWithError, */ /* AppLCM_TypesAndValues.InstantiateAppRequestWithError appInstanceInstantiateWithError, */ /* AppLCM_TypesAndValues.TerminateAppRequestWithError terminateTypeWithError, */ /* AppLCM_TypesAndValues.OperateAppRequestWithError changeStateToWithError, */ - /* AppLCM_TypesAndValues.AppInstanceLcmOpOcc appInstanceLcmOpOcc, */ - /* AppLCM_TypesAndValues.AppInstanceLcmOpOccList appInstanceLcmOpOccList, */ - /* AppLCM_TypesAndValues.SubscriptionRequest subscriptionRequest, */ /* AppLCM_TypesAndValues.SubscriptionRequestWithError subscriptionRequestWithError, */ - /* AppLCM_TypesAndValues.SubscriptionInfoList subscriptionInfoList, */ /* AppLCM_TypesAndValues.SubscriptionInfo subscriptionInfo, */ /* AppLCM_TypesAndValues.Notification lcmNotification, */ UEAppInterfaceAPI_TypesAndValues.AppContext appContext, diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn index 1aa123e..480f824 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -243,6 +243,85 @@ module LibHttp_JsonTemplates { changeStateTo := p_operate_app_request } // End of template mw_body_json_operate_app_request + template (value) JsonBody m_body_json_app_lcm_op_occ_list( + in template (value) AppLcmOpOccList p_app_op_occ_list + ) := { + appLcmOpOccList := p_app_op_occ_list + } // End of template m_body_json_app_lcm_op_occ_list + + template (present) JsonBody mw_body_json_app_lcm_op_occ_list( + template (present) AppLcmOpOccList p_app_op_occ_list := ? + ) := { + appLcmOpOccList := p_app_op_occ_list + } // End of template mw_body_json_app_lcm_op_occ_list + + template (value) JsonBody m_body_json_app_lcm_op_occ( + in template (value) AppLcmOpOcc p_app_op_occ + ) := { + appLcmOpOcc := p_app_op_occ + } // End of template m_body_json_lifecycle_op_occ + + template (present) JsonBody mw_body_json_app_lcm_op_occ( + template (present) AppLcmOpOcc p_app_op_occ := ? + ) := { + appLcmOpOcc := p_app_op_occ + } // End of template mw_body_json_lifecycle_op_occ + + template (value) JsonBody m_body_json_app_inst_subscription_request( + in template (value) AppInstSubscriptionRequest p_app_inst_subscription_request + ) := { + appInstSubscriptionRequest := p_app_inst_subscription_request + } // End of template m_body_json_app_inst_subscription_request + + template (present) JsonBody mw_body_json_app_inst_subscription_request( + template (present) AppInstSubscriptionRequest p_app_inst_subscription_request := ? + ) := { + appInstSubscriptionRequest := p_app_inst_subscription_request + } // End of template mw_body_json_app_inst_subscription_request + + template (value) JsonBody m_body_json_app_inst_subscription_info( + in template (value) AppInstSubscriptionInfo p_app_inst_subscription_info + ) := { + appInstSubscriptionInfo := p_app_inst_subscription_info + } // End of template m_body_json_app_inst_subscription_info + + template (present) JsonBody mw_body_json_app_inst_subscription_info( + template (present) AppInstSubscriptionInfo p_app_inst_subscription_info := ? + ) := { + appInstSubscriptionInfo := p_app_inst_subscription_info + } // End of template mw_body_json_app_inst_subscription_info + + template (value) JsonBody m_body_json_app_instance_subscription_link_list( + in template (value) AppInstanceSubscriptionLinkList p_app_instance_subscription_link_list + ) := { + appInstSubscriptionLinkList := p_app_instance_subscription_link_list + } // End of template m_body_json_app_instance_subscription_link_list + + template (present) JsonBody mw_body_json_app_instance_subscription_link_list( + template (present) AppInstanceSubscriptionLinkList p_app_instance_subscription_link_list := ? + ) := { + appInstSubscriptionLinkList := p_app_instance_subscription_link_list + } // End of template mw_body_json_app_instance_subscription_link_list + + + // template (value) JsonBody m_body_json_app_inst_subscription_request_list( + // in template (value) AppInstSubscriptionRequestList p_app_inst_subscription_request_list + // ) := { + // appInstSubscriptionRequestList := p_app_inst_subscription_request_list + // } // End of template m_body_json_app_inst_subscription_request_list + + // template (present) JsonBody mw_body_json_app_inst_subscription_request_list( + // template (present) AppInstSubscriptionRequestList p_app_inst_subscription_request_list := ? + // ) := { + // appInstSubscriptionRequestList := p_app_inst_subscription_request_list + // } // End of template mw_body_json_app_inst_subscription_request_list + + + + + + + /*template (present) JsonBody mw_body_json_mex_lcm_instance_info_list ( in template (present) AppInstanceInfoList p_app_instance_info_list ) := { @@ -280,24 +359,6 @@ module LibHttp_JsonTemplates { - template (present) JsonBody mw_body_json_lifecycle_op_occ_list ( - in template (present) AppInstanceLcmOpOccList p_app_instance_op_occ_list - ) := { - appInstanceLcmOpOccList := p_app_instance_op_occ_list - } - - template (present) JsonBody mw_body_json_lifecycle_op_occ ( - in template (present) AppInstanceLcmOpOcc p_app_instance_op_occ - ) := { - appInstanceLcmOpOcc := p_app_instance_op_occ - } - - template (present) JsonBody m_body_json_lcm_subscribe( - in template (present) SubscriptionRequest p_app_lcm_request - ) := { - subscriptionRequest := p_app_lcm_request - } - template (present) JsonBody m_body_json_lcm_subscribe_with_error( in template (present) SubscriptionRequestWithError p_app_lcm_request_with_error ) := { -- GitLab From ee14df8c0fa14409777ea7b9eda46e45bbbac070 Mon Sep 17 00:00:00 2001 From: garciay Date: Tue, 14 Nov 2023 14:50:40 +0100 Subject: [PATCH 38/58] TTF T027: Finalyze MEC 010-2/MEX/LCM --- ...ycleAndOperationGrantingAPI_TestCases.ttcn | 393 ++++++++++++++---- ...leAndOperationGrantingAPI_TestControl.ttcn | 4 + ...ycleAndOperationGrantingAPI_Functions.ttcn | 18 +- ...ycleAndOperationGrantingAPI_Templates.ttcn | 54 ++- ...ndOperationGrantingAPI_TypesAndValues.ttcn | 3 +- ttcn/LibMec/ttcn/LibMec_Pixits.ttcn | 4 +- .../ttcn/LibHttp_JsonMessageBodyTypes.ttcn | 19 +- .../ttcn/LibHttp_JsonTemplates.ttcn | 98 +---- 8 files changed, 412 insertions(+), 181 deletions(-) diff --git a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn index 0c493af..12ea8f6 100644 --- a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn @@ -1817,20 +1817,30 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Test Body tc_ac.start; alt { - [] httpPort.receive( - mw_http_request( - mw_http_request_post( - PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(v_app_pkg_subscription_info.id, "UTF-8")), // TODO To be changed - v_headers, - mw_http_message_body_json( - mw_body_json_app_package_notification( - mw_app_pkg_notification // TODO To be refined - ))))) -> value v_response { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(v_app_pkg_subscription_info.id, "UTF-8")), // TODO To be changed + v_headers, + mw_http_message_body_json( + mw_body_json_app_package_notification( + mw_app_pkg_notification // TODO To be refined + ))))) { tc_ac.stop; + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); + log("*** " & testcasename() & ": PASS: IUT successfully sends notification info ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } + [] httpPort_notif.receive { + tc_ac.stop; + + httpPort_notif.send(m_http_response(m_http_response_500_internal_error(v_headers))); + + log("*** " & testcasename() & ": FAIL: Expected message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); @@ -3723,7 +3733,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var AppPkgInfo v_app_pkg_info; - var AppInstanceInfo v_app_instanceInfo; + var AppInstanceInfo v_app_instance_info; // Test control if (not(PIC_APP_LCM_MANAGEMENT)) { @@ -3736,7 +3746,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble - f_create_app_instance(v_app_pkg_info, v_app_instanceInfo); + f_create_app_instance(v_app_pkg_info, v_app_instance_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -3757,9 +3767,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { { *, mw_app_instance_info( - v_app_instanceInfo.id, - v_app_instanceInfo.appDId, - v_app_instanceInfo.appProvider + v_app_instance_info.id, + v_app_instance_info.appDId, + v_app_instance_info.appProvider ), * } @@ -3776,7 +3786,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_delete_app_instance(v_app_pkg_info.id, v_app_instance_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_002_OK @@ -3787,7 +3797,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var AppPkgInfo v_app_pkg_info; - var AppInstanceInfo v_app_instanceInfo; + var AppInstanceInfo v_app_instance_info; // Test control if (not(PIC_APP_LCM_MANAGEMENT)) { @@ -3800,12 +3810,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble - f_create_app_instance(v_app_pkg_info, v_app_instanceInfo); + f_create_app_instance(v_app_pkg_info, v_app_instance_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instanceInfo.id)), + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -3819,9 +3829,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_message_body_json( mw_body_json_app_instance_info( mw_app_instance_info( - v_app_instanceInfo.id, - v_app_instanceInfo.appDId, - v_app_instanceInfo.appProvider + v_app_instance_info.id, + v_app_instance_info.appDId, + v_app_instance_info.appProvider )))))) { tc_ac.stop; @@ -3835,7 +3845,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_delete_app_instance(v_app_pkg_info.id, v_app_instance_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_003_OK @@ -3895,7 +3905,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var AppPkgInfo v_app_pkg_info; - var AppInstanceInfo v_app_instanceInfo; + var AppInstanceInfo v_app_instance_info; // Test control if (not(PIC_APP_LCM_MANAGEMENT)) { @@ -3908,12 +3918,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble - f_create_app_instance(v_app_pkg_info, v_app_instanceInfo); + f_create_app_instance(v_app_pkg_info, v_app_instance_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instanceInfo.id)), + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -3998,7 +4008,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var Headers v_headers; var HttpMessage v_response; var AppPkgInfo v_app_pkg_info; - var AppInstanceInfo v_app_instanceInfo; + var AppInstanceInfo v_app_instance_info; // Test control if (not(PIC_APP_LCM_MANAGEMENT)) { @@ -4011,12 +4021,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble - f_create_app_instance(v_app_pkg_info, v_app_instanceInfo); + f_create_app_instance(v_app_pkg_info, v_app_instance_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instanceInfo.id)) & "instantiate", + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "instantiate", v_headers, m_http_message_body_json( m_body_json_instantiate_app_request( @@ -4059,7 +4069,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_delete_app_instance(v_app_pkg_info.id, v_app_instance_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_005_OK @@ -4070,7 +4080,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var AppPkgInfo v_app_pkg_info; - var AppInstanceInfo v_app_instanceInfo; + var AppInstanceInfo v_app_instance_info; // Test control if (not(PIC_APP_LCM_MANAGEMENT)) { @@ -4083,12 +4093,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble - f_create_app_instance(v_app_pkg_info, v_app_instanceInfo); + f_create_app_instance(v_app_pkg_info, v_app_instance_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instanceInfo.id)) & "instantiate", + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "instantiate", v_headers, m_http_message_body_json( m_body_json_instantiate_app_request( @@ -4119,7 +4129,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_delete_app_instance(v_app_pkg_info.id, v_app_instance_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_005_BR @@ -4130,7 +4140,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var AppPkgInfo v_app_pkg_info; - var AppInstanceInfo v_app_instanceInfo; + var AppInstanceInfo v_app_instance_info; // Test control if (not(PIC_APP_LCM_MANAGEMENT)) { @@ -4143,7 +4153,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble - f_create_app_instance(v_app_pkg_info, v_app_instanceInfo); + f_create_app_instance(v_app_pkg_info, v_app_instance_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -4179,7 +4189,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_delete_app_instance(v_app_pkg_info.id, v_app_instance_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_005_NF @@ -4191,7 +4201,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var Headers v_headers; var HttpMessage v_response; var AppPkgInfo v_app_pkg_info; - var AppInstanceInfo v_app_instanceInfo; + var AppInstanceInfo v_app_instance_info; var charstring v_app_lcm_op_occ_id; // Test control @@ -4205,12 +4215,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble - f_instanciate_app_instance(v_app_pkg_info, v_app_instanceInfo, v_app_lcm_op_occ_id); + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instanceInfo.id)) & "terminate", + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "terminate", v_headers, m_http_message_body_json( m_body_json_terminate_app_request( @@ -4254,7 +4264,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_delete_app_instance(v_app_pkg_info.id, v_app_instance_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_006_OK @@ -4265,7 +4275,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var AppPkgInfo v_app_pkg_info; - var AppInstanceInfo v_app_instanceInfo; + var AppInstanceInfo v_app_instance_info; var charstring v_app_lcm_op_occ_id; // Test control @@ -4279,12 +4289,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble - f_instanciate_app_instance(v_app_pkg_info, v_app_instanceInfo, v_app_lcm_op_occ_id); + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instanceInfo.id)) & "instanicate", // Worng URL + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "instanicate", // Worng URL v_headers, m_http_message_body_json( m_body_json_terminate_app_request( @@ -4311,7 +4321,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // End of 'alt' statement // Postamble - f_terminate_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_006_BR @@ -4322,7 +4332,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var AppPkgInfo v_app_pkg_info; - var AppInstanceInfo v_app_instanceInfo; + var AppInstanceInfo v_app_instance_info; var charstring v_app_lcm_op_occ_id; // Test control @@ -4377,7 +4387,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var AppPkgInfo v_app_pkg_info; - var AppInstanceInfo v_app_instanceInfo; + var AppInstanceInfo v_app_instance_info; var charstring v_app_lcm_op_occ_id; // Test control @@ -4391,12 +4401,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble - f_instanciate_app_instance(v_app_pkg_info, v_app_instanceInfo, v_app_lcm_op_occ_id); + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instanceInfo.id)) & "operate", + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "operate", v_headers, m_http_message_body_json( m_body_json_operate_app_request( @@ -4427,7 +4437,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // End of 'alt' statement // Postamble - f_terminate_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_007_OK @@ -4438,7 +4448,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var AppPkgInfo v_app_pkg_info; - var AppInstanceInfo v_app_instanceInfo; + var AppInstanceInfo v_app_instance_info; var charstring v_app_lcm_op_occ_id; // Test control @@ -4452,12 +4462,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble - f_instanciate_app_instance(v_app_pkg_info, v_app_instanceInfo, v_app_lcm_op_occ_id); + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instanceInfo.id)) & "operated", // Wrong URL + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "operated", // Wrong URL v_headers, m_http_message_body_json( m_body_json_operate_app_request( @@ -4484,7 +4494,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // End of 'alt' statement // Postamble - f_terminate_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_007_BR @@ -4551,7 +4561,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var AppPkgInfo v_app_pkg_info; - var AppInstanceInfo v_app_instanceInfo; + var AppInstanceInfo v_app_instance_info; var charstring v_app_lcm_op_occ_id; // Test control @@ -4565,7 +4575,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble - f_instanciate_app_instance(v_app_pkg_info, v_app_instanceInfo, v_app_lcm_op_occ_id); + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -4603,7 +4613,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // End of 'alt' statement // Postamble - f_terminate_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_008_OK @@ -4614,7 +4624,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var AppPkgInfo v_app_pkg_info; - var AppInstanceInfo v_app_instanceInfo; + var AppInstanceInfo v_app_instance_info; var charstring v_app_lcm_op_occ_id; // Test control @@ -4628,7 +4638,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble - f_instanciate_app_instance(v_app_pkg_info, v_app_instanceInfo, v_app_lcm_op_occ_id); + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -4664,7 +4674,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // End of 'alt' statement // Postamble - f_terminate_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_009_OK @@ -4726,7 +4736,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var Headers v_headers; var HttpMessage v_response; var AppPkgInfo v_app_pkg_info; - var AppInstanceInfo v_app_instanceInfo; + var AppInstanceInfo v_app_instance_info; var charstring v_app_lcm_op_occ_id; // Test control @@ -4740,7 +4750,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble - f_instanciate_app_instance(v_app_pkg_info, v_app_instanceInfo, v_app_lcm_op_occ_id); + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -4781,7 +4791,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_delete_app_instance_subscription(v_response.response.body.json_body.appInstSubscriptionInfo.id); - f_terminate_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_010_OK @@ -4847,7 +4857,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var AppPkgInfo v_app_pkg_info; - var AppInstanceInfo v_app_instanceInfo; + var AppInstanceInfo v_app_instance_info; var charstring v_app_lcm_op_occ_id; var AppInstSubscriptionInfo v_app_inst_subscription_info; @@ -4862,7 +4872,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble - f_instanciate_app_instance(v_app_pkg_info, v_app_instanceInfo, v_app_lcm_op_occ_id); + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); f_create_app_instance_subscription(v_app_inst_subscription_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( @@ -4896,7 +4906,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_delete_app_instance_subscription(v_app_inst_subscription_info.id); - f_terminate_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_011_OK @@ -4907,7 +4917,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var AppPkgInfo v_app_pkg_info; - var AppInstanceInfo v_app_instanceInfo; + var AppInstanceInfo v_app_instance_info; var charstring v_app_lcm_op_occ_id; var AppInstSubscriptionInfo v_app_inst_subscription_info; @@ -4922,7 +4932,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble - f_instanciate_app_instance(v_app_pkg_info, v_app_instanceInfo, v_app_lcm_op_occ_id); + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); f_create_app_instance_subscription(v_app_inst_subscription_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( @@ -4959,7 +4969,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Postamble f_delete_app_instance_subscription(v_app_inst_subscription_info.id); - f_terminate_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_012_OK @@ -5019,7 +5029,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var AppPkgInfo v_app_pkg_info; - var AppInstanceInfo v_app_instanceInfo; + var AppInstanceInfo v_app_instance_info; var charstring v_app_lcm_op_occ_id; var AppInstSubscriptionInfo v_app_inst_subscription_info; @@ -5034,7 +5044,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble - f_instanciate_app_instance(v_app_pkg_info, v_app_instanceInfo, v_app_lcm_op_occ_id); + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); f_create_app_instance_subscription(v_app_inst_subscription_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( @@ -5064,7 +5074,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // End of 'alt' statement // Postamble - f_terminate_app_instance(v_app_pkg_info.id, v_app_instanceInfo.id); + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_013_OK @@ -5117,6 +5127,247 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEX_LCM_013_NF + /** + * @desc Check that MEC API provider service cancels an on going LCM Operation + */ + testcase TC_MEC_MEC010p2_MEX_LCM_014_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_OP_OCC_URI & oct2char(unichar2oct(v_app_lcm_op_occ_id)) & "/cancel", + v_headers, + m_http_message_body_json( + m_body_json_cancel_mode( + FORCEFUL + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppLcmOpOcc ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_014_OK + + /** + * @desc Check that MEC API provider service fails to cancel an on going LCM Operation when it receives a malformed request + */ + testcase TC_MEC_MEC010p2_MEX_LCM_014_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_OP_OCC_URI & oct2char(unichar2oct(v_app_lcm_op_occ_id)) & "/cancel", + v_headers, + m_http_message_body_json( + m_body_json_cancel_mode( + ERROR_CASE + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppLcmOpOcc ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_014_BR + + /** + * @desc Check that MEC API provider service fails to cancel an on going LCM Operation when it receives a request related to a not existing application LCM Operation + */ + testcase TC_MEC_MEC010p2_MEX_LCM_014_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_OP_OCC_URI & oct2char(unichar2oct(PX_APP_NON_EXISTANT_LCM_OP_OCC_ID)) & "/cancel", + v_headers, + m_http_message_body_json( + m_body_json_cancel_mode( + ERROR_CASE + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppLcmOpOcc ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_014_NF + + // TODO 15 & 16, how to achieve operationStates indicating value FAILED_TEMP + + /** + * @desc Check that MEC API provider service sends the information about an existing LCM subscription when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_017_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + var AppInstSubscriptionInfo v_app_inst_subscription_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_create_app_instance_subscription(v_app_inst_subscription_info); + f_init_default_headers_list(-, -, v_headers); + action("Trigger notification"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(v_app_inst_subscription_info.id, "UTF-8")), // TODO To be changed + v_headers, + mw_http_message_body_json( + mw_body_json_app_inst_notification( + mw_app_inst_notification // TODO To be refined + ))))) { + tc_ac.stop; + + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct AppInstSubscriptionInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] httpPort_notif.receive { + tc_ac.stop; + + httpPort_notif.send(m_http_response(m_http_response_500_internal_error(v_headers))); + + log("*** " & testcasename() & ": FAIL: Expected message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance_subscription(v_app_inst_subscription_info.id); + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_017_OK + + } // End of group mex_lifcyclemgt } // End of module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases diff --git a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn index 3a67ba8..07d3737 100644 --- a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn @@ -150,6 +150,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl { execute(TC_MEC_MEC010p2_MEX_LCM_012_NF()); execute(TC_MEC_MEC010p2_MEX_LCM_013_OK()); execute(TC_MEC_MEC010p2_MEX_LCM_013_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_014_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_014_BR()); + execute(TC_MEC_MEC010p2_MEX_LCM_014_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_017_OK()); } } } diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn index 61be897..ecff7dd 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn @@ -263,7 +263,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Functions { function f_create_app_instance( out AppPkgInfo p_app_pkg_info, - out AppInstanceInfo p_app_instanceInfo + out AppInstanceInfo p_app_instance_info ) runs on HttpComponent { // Local variables var Headers v_headers; @@ -301,8 +301,8 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Functions { p_app_pkg_info.appDId )))))) -> value v_response { tc_ac.stop; - p_app_instanceInfo := v_response.response.body.json_body.appInstanceInfo; - log("f_create_app_pkg_subscription: INFO: IUT responds to the AppInstanceInfo: ", p_app_instanceInfo); + p_app_instance_info := v_response.response.body.json_body.appInstanceInfo; + log("f_create_app_pkg_subscription: INFO: IUT responds to the AppInstanceInfo: ", p_app_instance_info); } [] tc_ac.timeout { log("f_create_app_pkg_subscription: : INCONC: Expected message not received ***"); @@ -345,21 +345,21 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Functions { function f_instanciate_app_instance( out AppPkgInfo p_app_pkg_info, - out AppInstanceInfo p_app_instanceInfo, + out AppInstanceInfo p_app_instance_info, out charstring p_app_lcm_op_occ_id ) runs on HttpComponent { // Local variables var Headers v_headers; var HttpMessage v_response; var AppPkgInfo v_app_pkg_info; - var AppInstanceInfo v_app_instanceInfo; + var AppInstanceInfo v_app_instance_info; - f_create_app_instance(v_app_pkg_info, v_app_instanceInfo); + f_create_app_instance(v_app_pkg_info, v_app_instance_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instanceInfo.id)) & "instantiate", + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "instantiate", v_headers, m_http_message_body_json( m_body_json_instantiate_app_request( @@ -403,13 +403,13 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Functions { // Local variables var Headers v_headers; var AppPkgInfo v_app_pkg_info; - var AppInstanceInfo v_app_instanceInfo; + var AppInstanceInfo v_app_instance_info; f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instanceInfo.id)) & "instantiate", + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "instantiate", v_headers, m_http_message_body_json( m_body_json_terminate_app_request( diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn index 6a87a81..193337d 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn @@ -944,9 +944,9 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { } // End of template mw_app_instance_subscription_link_list template (omit) AppInstanceSubscriptionLinkList_Link m_app_instance_subscription_link_list_link( - in Json.AnyURI p_href, - in template (omit) AppInstanceSubscriptionLinkList_Link_Subscriptions p_subscriptions := omit - ) := { + in Json.AnyURI p_href, + in template (omit) AppInstanceSubscriptionLinkList_Link_Subscriptions p_subscriptions := omit + ) := { self_ := { href := p_href }, subscriptions := p_subscriptions } // End of template m_app_instance_subscription_link_list_link @@ -959,6 +959,54 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { subscriptions := p_subscriptions } // End of template mw_app_instance_subscription_link_list_link + template (omit) AppInstNotification m_app_inst_notification( + in Json.String p_id, + in NotificationType p_notificationType, + in Json.String p_subscriptionId, + in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TimeStamp p_timeStamp, + in Json.String p_appInstanceId, + in Json.String p_appPkgId, + in Json.String p_appDId, + in template (value) AppInstNotification_Links p_links, + in template (omit) AppInstanceState p_appInstanceState := omit, + in template (omit) LocationInformation p_appInstLocation := omit + ) := { + id := p_id, + notificationType := p_notificationType, + appInstanceState := p_appInstanceState, + subscriptionId := p_subscriptionId, + timeStamp := p_timeStamp, + appInstanceId := p_appInstanceId, + appPkgId := p_appPkgId, + appDId := p_appDId, + appInstLocation := p_appInstLocation, + links := p_links + } // End of template m_app_inst_notification + + template (present) AppInstNotification mw_app_inst_notification( + template (present) Json.String p_id := ?, + template (present) NotificationType p_notificationType := ?, + template (present) Json.String p_subscriptionId := ?, + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TimeStamp p_timeStamp := ?, + template (present) Json.String p_appInstanceId := ?, + template (present) Json.String p_appPkgId := ?, + template (present) Json.String p_appDId := ?, + template (present) AppInstNotification_Links p_links := ?, + template AppInstanceState p_appInstanceState := *, + template LocationInformation p_appInstLocation := * + ) := { + id := p_id, + notificationType := p_notificationType, + appInstanceState := p_appInstanceState, + subscriptionId := p_subscriptionId, + timeStamp := p_timeStamp, + appInstanceId := p_appInstanceId, + appPkgId := p_appPkgId, + appDId := p_appDId, + appInstLocation := p_appInstLocation, + links := p_links + } // End of template mw_app_inst_notification + } // End of group mex_lifcyclemgt } // End of module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn index 2f80948..eb6c3c3 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn @@ -760,7 +760,8 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { type enumerated StopType { FORCEFUL (0), - GRACEFUL (1) + GRACEFUL (1), + ERROR_CASE (3) // In case of Bad Request tests } /** diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index 24b035c..063d8d8 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -66,13 +66,13 @@ module LibMec_Pixits { modulepar charstring PX_MEC_SVC_MGMT_APPS_URI := "/mec_service_mgmt/v1/applications"; - modulepar charstring PX_ME_APP_SUPPORT_TIMING_CURRENT_URI := "//timing/current_time"; + modulepar charstring PX_ME_APP_SUPPORT_TIMING_CURRENT_URI := "/timing/current_time"; modulepar charstring PX_ME_APP_SUPPORT_URI := "/applications"; modulepar charstring PX_MEC_SVC_MGMT_SVC_URI := "/mec_service_mgmt/v1/services"; - modulepar charstring PX_ME_APP_SUPPORT_TIMING_CAPS_URI := "//timing/timing_caps"; + modulepar charstring PX_ME_APP_SUPPORT_TIMING_CAPS_URI := "/timing/timing_caps"; modulepar charstring PX_FAI_FA_INFO_URI := "/fai/v1/fa_info"; diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index a70f3da..4f117db 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -91,16 +91,6 @@ module LibHttp_JsonMessageBodyTypes { AppPkgSubscriptionLinkList appPkgSubscriptionLinkList, AppPkgNotification appPkgNotification, ConfigPlatformForAppRequest configPlatformForAppRequest, - /* MepmPkgm_TypesAndValues.AppPkg appMepmPackageManagement, */ - /* MepmPkgm_TypesAndValues.OnboardedAppPkgInfo onboardedMepmAppPkgInfo, */ - /* MepmPkgm_TypesAndValues.OnboardedAppPkgInfoList appOnboardMepmPackageInfoList, */ - /* MepmPkgm_TypesAndValues.AppPkgWithError appMepmPackageManagementWithError, */ - /* MepmPkgm_TypesAndValues.AppPkgSubscription appMepmPkgSubscription, */ - /* MepmPkgm_TypesAndValues.AppPkgSubscriptionInfo appMepmPkgSubscriptionInfo, */ - /* MepmPkgm_TypesAndValues.AppPkgSubscriptionInfoList appMepmPkgSubscriptionInfoList, */ - /* MepmPkgm_TypesAndValues.AppPkgSubscriptionWithError appMepmPkgSubscriptionWithError, */ - /* MepmPkgm_TypesAndValues.AppPkgNotification appMepmPkgNotification, */ - /* MepmPkgm_TypesAndValues.OnboardedAppPkgInfo appOnboardMepmPackageInfo, */ CreateAppInstanceRequest createAppInstanceRequest, AppInstanceInfo appInstanceInfo, AppInstanceInfoList appInstanceInfoList, @@ -112,13 +102,8 @@ module LibHttp_JsonMessageBodyTypes { AppInstSubscriptionRequest appInstSubscriptionRequest, AppInstSubscriptionInfo appInstSubscriptionInfo, AppInstanceSubscriptionLinkList appInstSubscriptionLinkList, - /* AppLCM_TypesAndValues.CreateAppInstanceRequestWithError createAppInstanceRequestWithError, */ - /* AppLCM_TypesAndValues.InstantiateAppRequestWithError appInstanceInstantiateWithError, */ - /* AppLCM_TypesAndValues.TerminateAppRequestWithError terminateTypeWithError, */ - /* AppLCM_TypesAndValues.OperateAppRequestWithError changeStateToWithError, */ - /* AppLCM_TypesAndValues.SubscriptionRequestWithError subscriptionRequestWithError, */ - /* AppLCM_TypesAndValues.SubscriptionInfo subscriptionInfo, */ - /* AppLCM_TypesAndValues.Notification lcmNotification, */ + CancelMode cancelMode, + AppInstNotification appInstNotification, UEAppInterfaceAPI_TypesAndValues.AppContext appContext, UEAppInterfaceAPI_TypesAndValues.AppInfo appInfo, ServiceInfoList serviceInfoList, diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn index 480f824..62da712 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -303,88 +303,30 @@ module LibHttp_JsonTemplates { appInstSubscriptionLinkList := p_app_instance_subscription_link_list } // End of template mw_body_json_app_instance_subscription_link_list + template (value) JsonBody m_body_json_cancel_mode( + in template (value) CancelMode p_cancel_mode + ) := { + cancelMode := p_cancel_mode + } // End of template m_body_json_cancel_mode - // template (value) JsonBody m_body_json_app_inst_subscription_request_list( - // in template (value) AppInstSubscriptionRequestList p_app_inst_subscription_request_list - // ) := { - // appInstSubscriptionRequestList := p_app_inst_subscription_request_list - // } // End of template m_body_json_app_inst_subscription_request_list - - // template (present) JsonBody mw_body_json_app_inst_subscription_request_list( - // template (present) AppInstSubscriptionRequestList p_app_inst_subscription_request_list := ? - // ) := { - // appInstSubscriptionRequestList := p_app_inst_subscription_request_list - // } // End of template mw_body_json_app_inst_subscription_request_list - - - - - - - - /*template (present) JsonBody mw_body_json_mex_lcm_instance_info_list ( - in template (present) AppInstanceInfoList p_app_instance_info_list - ) := { - appInstanceInfoList := p_app_instance_info_list - } - - - template (present) JsonBody m_body_json_lifecycle_management_instantiate ( - in template (present) InstantiateAppRequest p_app_instance_instantiate - ) := { - appInstanceInstantiate := p_app_instance_instantiate - } - - template (present) JsonBody m_body_json_lifecycle_management_instantiate_with_error ( - in template (present) InstantiateAppRequestWithError p_app_instance_instantiate_with_error - ) := { - appInstanceInstantiateWithError := p_app_instance_instantiate_with_error - } - - - - template (present) JsonBody m_body_json_lifecycle_management_terminate ( - in template (present) TerminateAppRequest p_app_instance_terminate - ) := { - terminateType := p_app_instance_terminate - } - - template (present) JsonBody m_body_json_lifecycle_management_terminate_with_error ( - in template (present) TerminateAppRequestWithError p_app_instance_terminate_with_error - ) := { - terminateTypeWithError := p_app_instance_terminate_with_error - } - - - - - - template (present) JsonBody m_body_json_lcm_subscribe_with_error( - in template (present) SubscriptionRequestWithError p_app_lcm_request_with_error - ) := { - subscriptionRequestWithError := p_app_lcm_request_with_error - } - - - template (present) JsonBody mw_body_json_lcm_subscription_list( - in template (present) SubscriptionInfoList p_app_lcm_subscription_list - ) := { - subscriptionInfoList := p_app_lcm_subscription_list - } + template (present) JsonBody mw_body_json_cancel_mode( + template (present) CancelMode p_cancel_mode := ? + ) := { + cancelMode := p_cancel_mode + } // End of template mw_body_json_cancel_mode - template (present) JsonBody mw_body_json_lcm_subscription( - in template (present) SubscriptionInfo p_app_lcm_subscription - ) := { - subscriptionInfo := p_app_lcm_subscription - } + template (value) JsonBody m_body_json_app_inst_notification( + in template (value) AppInstNotification p_app_inst_notification + ) := { + appInstNotification := p_app_inst_notification + } // End of template m_body_json_app_inst_notification + template (present) JsonBody mw_body_json_app_inst_notification( + template (present) AppInstNotification p_app_inst_notification := ? + ) := { + appInstNotification := p_app_inst_notification + } // End of template mw_body_json_app_inst_notification - template (present) JsonBody mw_body_json_lcm_notification ( - in template (present) Notification p_lcm_notification - ) := { - lcmNotification := p_lcm_notification - } - */ } // End of group mex_lifcyclemgt group application_mobilty_service_api { -- GitLab From f73c2c519f3197e6743abcac27429796ec373fc1 Mon Sep 17 00:00:00 2001 From: garciay Date: Tue, 28 Nov 2023 08:15:09 +0100 Subject: [PATCH 39/58] review MEC 011 --- plantuml/__main__.py | 6 +- scripts/generate_png.sh | 2 +- ...ormApplicationEnablementAPI_TestCases.ttcn | 1378 ++++++++++++++--- ...mApplicationEnablementAPI_TestControl.ttcn | 84 + ...plicationMobilityServiceAPI_Templates.ttcn | 12 +- ...tionMobilityServiceAPI_TypesAndValues.ttcn | 21 - ...ycleAndOperationGrantingAPI_Templates.ttcn | 109 +- ...ndOperationGrantingAPI_TypesAndValues.ttcn | 109 +- ...ormApplicationEnablementAPI_Functions.ttcn | 72 +- ...atformApplicationEnablementAPI_Pixits.ttcn | 7 + ...ormApplicationEnablementAPI_Templates.ttcn | 99 +- ...plicationEnablementAPI_TypesAndValues.ttcn | 80 +- ...AccessInformationServiceAPI_Templates.ttcn | 19 +- ...sInformationServiceAPI_TypesAndValues.ttcn | 26 +- .../ttcn/LocationAPI_Templates.ttcn | 3 + .../ttcn/LocationAPI_TypesAndValues.ttcn | 22 +- .../RnisAPI/ttcn/RnisAPI_Templates.ttcn | 16 - .../ttcn/TrafficManagementAPI_Templates.ttcn | 3 + .../TrafficManagementAPI_TypesAndValues.ttcn | 14 +- .../V2XInformationServiceAPI_Templates.ttcn | 3 + ...XInformationServiceAPI_TypesAndValues.ttcn | 26 +- .../ttcn/WlanInformationAPI_Templates.ttcn | 19 +- .../WlanInformationAPI_TypesAndValues.ttcn | 24 +- ttcn/LibMec/ttcn/LibMec_Pixits.ttcn | 48 +- ttcn/LibMec/ttcn/LibMec_Templates.ttcn | 16 + ttcn/LibMec/ttcn/LibMec_TypesAndValues.ttcn | 20 + .../ttcn/LibHttp_JsonMessageBodyTypes.ttcn | 1 + .../ttcn/LibHttp_JsonTemplates.ttcn | 12 + 28 files changed, 1683 insertions(+), 568 deletions(-) diff --git a/plantuml/__main__.py b/plantuml/__main__.py index a3f73cf..5589e40 100644 --- a/plantuml/__main__.py +++ b/plantuml/__main__.py @@ -171,7 +171,11 @@ def main(): # End of 'with' statement # End of 'with' statement - os.system('java -DPLANTUML_LIMIT_SIZE=8192 -jar ./plantuml.jar -svg {}'.format(OUT_FILE_PATH)) + # Check if file is not empty + if os.path.getsize(OUT_FILE_PATH) == 0: + logger.error(f'Empty result, please check that FileMask is properly set: ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TIMEROP | TESTCASE') + else: + os.system('java -DPLANTUML_LIMIT_SIZE=8192 -jar ./plantuml.jar -svg {}'.format(OUT_FILE_PATH)) # End of main function if __name__ == "__main__": diff --git a/scripts/generate_png.sh b/scripts/generate_png.sh index 7c73718..37b46ba 100755 --- a/scripts/generate_png.sh +++ b/scripts/generate_png.sh @@ -1,6 +1,6 @@ #!/bin/bash #set -e -set -vx +#set -vx clear diff --git a/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn index e00b0ff..6646ce9 100644 --- a/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn +++ b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn @@ -7,7 +7,7 @@ * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. - * @see ETSI GS MEC 003, Draft ETSI GS MEC 011 V2.2.1 + * @see ETSI GS MEC 003, Draft ETSI GS MEC 011 V3.2.1 */ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { @@ -29,6 +29,9 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { import from EdgePlatformApplicationEnablementAPI_Pics all; import from EdgePlatformApplicationEnablementAPI_Pixits all; + // LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Templates all; + // LibMec import from LibMec_TypesAndValues all; import from LibMec_Templates all; @@ -45,11 +48,11 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with a list of available MEC services for a given application instance when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var ServiceInfo v_service_info; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -64,6 +67,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_service_info(v_service_info, v_headers); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -82,8 +86,17 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_service_info_list - )))) { + mw_body_json_service_info_list( + { + *, + mw_service_info( + v_service_info.serName, + -, -, -, -, -, + PX_APP_INSTANCE_ID + ), + * + } + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfoList ***"); @@ -96,12 +109,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_service_info(v_service_info); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_001_OK /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -154,8 +167,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_001_BR /** - * @desc Check that the IUT notifies the authorised relevant (subscribed) application instances when a new service for a given application instance is registered. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 + * @desc Check that the IUT notifies the authorised relevant (subscribed) application instances when a new service for a given application instance is registered */ testcase TC_MEC_MEC011_SRV_APPSAQ_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -199,13 +211,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { "2.0", m_end_point_uris({"/meMp1/service/MyEntryPoint"}), m_security_info - ) - ) - ) - ) - ) - ) - ); + ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -257,7 +263,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -324,7 +329,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -387,7 +391,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with the information on a specific service for a given application instance when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -445,8 +448,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_003_OK /** - * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 + * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application# */ testcase TC_MEC_MEC011_SRV_APPSAQ_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -500,7 +502,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT updates a service information for a given application instance when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -582,7 +583,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_004_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -662,7 +662,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_004_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -727,7 +726,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_004_PF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -811,7 +809,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -868,7 +865,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -922,7 +918,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications on service availability events. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -998,7 +993,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1064,7 +1058,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with the information on a specific subscription when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1121,7 +1114,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1175,7 +1167,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT acknowledges the unsubscribe from service availability event notifications when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1229,7 +1220,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_004_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1284,12 +1274,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of group app_sub - group conf_task { /** * @desc Check that the IUT responds that it has completed the application level termination - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/CONFTASK/ConfirmTasks.tplan2 */ testcase TC_MEC_MEC011_SRV_CONFTASK_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1348,7 +1336,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an operationAction is sent to an unknown application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/CONFTASK/ConfirmTasks.tplan2 */ testcase TC_MEC_MEC011_SRV_CONFTASK_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1407,7 +1394,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds that the MEC application is up and running - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/CONFTASK/ConfirmTasks.tplan2 */ testcase TC_MEC_MEC011_SRV_CONFTASK_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1466,7 +1452,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an indication is sent to an unknown application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/CONFTASK/ConfirmTasks.tplan2 */ testcase TC_MEC_MEC011_SRV_CONFTASK_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1532,7 +1517,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with a list of active DNS rules when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/DNS/PlatDnsRules.tplan2 */ testcase TC_MEC_MEC011_SRV_DNS_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1586,9 +1570,61 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_DNS_001_OK + /** + * @desc Check that the IUT responds with a list of active DNS rules when queried by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_DNS_001_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/dns_rules", + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DnsRuleList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_DNS_001_NF + /** * @desc Check that the IUT responds with the information on a specific DNS rule when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/DNS/PlatDnsRules.tplan2 */ testcase TC_MEC_MEC011_SRV_DNS_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1646,7 +1682,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/DNS/PlatDnsRules.tplan2 */ testcase TC_MEC_MEC011_SRV_DNS_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1700,7 +1735,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT updates a specific DNS rule when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/DNS/PlatDnsRules.tplan2 */ testcase TC_MEC_MEC011_SRV_DNS_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1766,7 +1800,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/DNS/PlatDnsRules.tplan2 */ testcase TC_MEC_MEC011_SRV_DNS_003_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1831,7 +1864,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/DNS/PlatDnsRules.tplan2 */ testcase TC_MEC_MEC011_SRV_DNS_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1895,7 +1927,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/DNS/PlatDnsRules.tplan2 */ testcase TC_MEC_MEC011_SRV_DNS_003_PF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1960,15 +1991,15 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of group app_dns - group liv { + group msl { /** * @desc Check that the IUT responds with the liveness of a MEC service instance when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/Liveness.tplan2 */ testcase TC_MEC_MEC011_SRV_MSL_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var ServiceInfo v_service_info; // Test control if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -1983,11 +2014,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_service_info(v_service_info, v_headers); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & "/" & PX_LINK_LIV, + PICS_ROOT_API & PX_LINK_LIV, v_headers ) ) @@ -2017,12 +2049,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_service_info(v_service_info); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_MSL_001_OK /** * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/Liveness.tplan2 */ testcase TC_MEC_MEC011_SRV_MSL_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2045,7 +2077,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & "/" & PX_LINK_LIV, + PICS_ROOT_API & PX_LINK_LIV, v_headers ) ) @@ -2076,11 +2108,11 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT updates the liveness of a MEC service instance when requested by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/Liveness.tplan2 */ testcase TC_MEC_MEC011_SRV_MSL_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var ServiceInfo v_service_info; // Test control if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -2095,11 +2127,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_service_info(v_service_info, v_headers); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_patch( - PICS_ROOT_API & "/" & PX_LINK_LIV, + PICS_ROOT_API & PX_LINK_LIV, v_headers, m_http_message_body_json( m_body_json_srv_liveness_info( @@ -2140,12 +2173,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_service_info(v_service_info); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_MSL_002_OK /** * @desc Check that the IUT responds with an error when incorrect parameters were sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/Liveness.tplan2 */ testcase TC_MEC_MEC011_SRV_MSL_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2168,7 +2201,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_patch( - PICS_ROOT_API & "/" & PX_LINK_LIV, + PICS_ROOT_API & PX_LINK_LIV, v_headers, m_http_message_body_json( m_body_json_srv_liveness_info( @@ -2208,23 +2241,20 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_MSL_002_BR - } // End of group liv - - /* - * Service Availability Query (SAQ) - */ - group saq { + } // End of group msl + group reg_apps { + /** - * @desc Check that the IUT responds with a list of available MEC services when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SAQ/PlatServices.tplan2 + * @desc Check that the IUT acknowledges the registration by a MEC Application to the MEC platform */ - testcase TC_MEC_MEC011_SRV_SAQ_001_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_001_OK_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var HttpMessage v_response; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; @@ -2239,12 +2269,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI, - v_headers - ) - ) - ); + m_http_request_post( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2252,14 +2284,23 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_service_info_list - )))) { + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_info_regapps( + mw_app_info( + PX_APP_NAME + )))))) -> value v_response { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfoList ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: Location header not present ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_value; + f_get_header(v_response.response.header, "Location", v_header_value); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); @@ -2268,16 +2309,17 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_app_deletion(v_response.response.body.json_body.appInfo_regapps.appInstanceId); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_SAQ_001_OK + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_OK_01 /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SAQ/PlatServices.tplan2 + * @desc Check that the IUT acknowledges the registration by a MEC Application to the MEC platform */ - testcase TC_MEC_MEC011_SRV_SAQ_001_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_001_OK_02() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var HttpMessage v_response; // Test control if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -2293,15 +2335,18 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Preamble f_init_default_headers_list(-, -, v_headers); - httpPort.send( m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI & "?instance_id=" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")), - v_headers - ) - ) - ); + m_http_request_post( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, -, + PX_APP_INSTANCE_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2309,12 +2354,25 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request() - )) { + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_info_regapps( + mw_app_info( + PX_APP_NAME, + -, -, -, + PX_APP_INSTANCE_ID + )))))) -> value v_response { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: Location header not present ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_value; + f_get_header(v_response.response.header, "Location", v_header_value); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); @@ -2323,19 +2381,20 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_app_deletion(v_response.response.body.json_body.appInfo_regapps.appInstanceId); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_SAQ_001_BR + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_OK_02 /** - * @desc Check that the IUT responds with the information on a specific service when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SAQ/PlatServices.tplan2 + * @desc Check that the IUT acknowledges the registration by a MEC Application instanciated by the MEC platform */ - testcase TC_MEC_MEC011_SRV_SAQ_002_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_001_OK_03() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var HttpMessage v_response; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; @@ -2350,12 +2409,17 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI & "/" & oct2char(unichar2oct(PX_SERVICE_ID, "UTF-8")), - v_headers - ) - ) - ); + m_http_request_post( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, + PX_APP_D_ID, + PX_APP_INSTANCE_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2363,16 +2427,26 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_service_info( - mw_service_info( - PX_SERVICE_ID - )))))) { + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_info_regapps( + mw_app_info( + PX_APP_NAME, + -, -, + PX_APP_D_ID, + PX_APP_INSTANCE_ID + )))))) -> value v_response { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: Location header not present ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_value; + f_get_header(v_response.response.header, "Location", v_header_value); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); @@ -2381,19 +2455,19 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_app_deletion(v_response.response.body.json_body.appInfo_regapps.appInstanceId); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_SAQ_002_OK + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_OK_03 /** - * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SAQ/PlatServices.tplan2 + * @desc Check that the IUT responds with an error message when the IUT received a registration with missing fields from a MEC Application instanciated by the MEC platform */ - testcase TC_MEC_MEC011_SRV_SAQ_002_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; @@ -2408,12 +2482,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_ID, "UTF-8")), - v_headers - ) - ) - ); + m_http_request_post( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2421,11 +2497,11 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found - )) { + mw_http_response_400_bad_request + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2436,26 +2512,17 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_SAQ_002_NF - - } // End of group saq - - /* - * Service Subscriptions (SRVSUB) - */ - group srv_sub { + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_01 /** - * @desc Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 + * @desc Check that the IUT responds with an error message when the IUT received a registration with missing fields from a MEC Application instanciated by the MEC platform */ - testcase TC_MEC_MEC011_SRV_SRVSUB_001_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_02() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var SerAvailabilityNotificationSubscription v_ser_availability_notification_subscription; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; @@ -2468,15 +2535,22 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Preamble f_init_default_headers_list(-, -, v_headers); - f_create_ser_availability_notification_subscription(v_ser_availability_notification_subscription); httpPort.send( m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", - v_headers - ) - ) - ); + m_http_request_post( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, + PX_APP_D_ID, + PX_APP_INSTANCE_ID, + -, -, -, -, -, + false + + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2484,14 +2558,11 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_subscription_link_list( - mw_subscription_link_list - ))))) { + mw_http_response_400_bad_request + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a Mp1SubscriptionLinkList ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2501,20 +2572,18 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_ser_availability_notification_subscription(v_ser_availability_notification_subscription); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_SRVSUB_001_OK + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_03 /** - * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 + * @desc Check that the IUT responds with an error message when the IUT received by a MEC Application registration with unexpected appServiceRequired */ - testcase TC_MEC_MEC011_SRV_SRVSUB_001_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_03() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; @@ -2529,12 +2598,26 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", - v_headers - ) - ) - ); + m_http_request_post( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, + PX_APP_D_ID, + PX_APP_INSTANCE_ID, + -, + { + m_service_dependency( + PX_NON_EXISTENT_SERVICE_ID, + PX_SERVICE_INFO_VERSION + ) + } + + + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2542,11 +2625,11 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found - )) { + mw_http_response_400_bad_request + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2557,16 +2640,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_SRVSUB_001_NF + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_03 /** - * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications on service availability events - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 + * @desc Check that the IUT responds with an error message when the IUT received by a MEC Application registration with unexpected appServiceOptional */ - testcase TC_MEC_MEC011_SRV_SRVSUB_002_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_04() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -2585,18 +2666,26 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI, v_headers, m_http_message_body_json( - m_body_json_srv_avail_notif_subscription( - m_srv_avail_notif_subscription( - PX_SRV_AVAIL_NOTIF_CALLBACK_URI - ) - ) - ) - ) - ) - ); + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, + PX_APP_D_ID, + PX_APP_INSTANCE_ID, + -, + -, + { + m_service_dependency( + PX_NON_EXISTENT_SERVICE_ID, + PX_SERVICE_INFO_VERSION + ) + } + + + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2604,7 +2693,889 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_201_created( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_04 + + /** + * @desc Check that the IUT responds with an error message when the IUT received by a MEC Application registration with unexpected appFeatureRequired + */ + testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_05() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, + PX_APP_D_ID, + PX_APP_INSTANCE_ID, + -, + -, + -, + { + m_feature_dependency( + "", + "" + ) + } + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_05 + + /** + * @desc Check that the IUT responds with an error message when the IUT received by a MEC Application registration with unexpected appFeatureOptional + + */ + testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_06() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, + PX_APP_D_ID, + PX_APP_INSTANCE_ID, + -, + -, + -, + -, + { + m_feature_dependency( + "", + "" + ) + } + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_06 + + /** + * @desc Check that the IUT responds with the AppInfo description when queried by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_REGAPPS_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppInfo v_app_info; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_app_registration(v_app_info, v_headers); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(v_app_info.appInstanceId, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_info_regapps( + mw_app_info( + v_app_info.appName, + -, -, + v_app_info.appDId, + v_app_info.appInstanceId + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct AppInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_app_deletion(v_app_info.appInstanceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_002_OK + + /** + * @desc Check that the IUT responds with an error when when it receives a request for returning an AppInfo with a wrong ID + */ + testcase TC_MEC_MEC011_SRV_REGAPPS_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_002_NF + + /** + * @desc Check that the IUT responds with 204 No Content when queried to update MEC Application registration + */ + testcase TC_MEC_MEC011_SRV_REGAPPS_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppInfo v_app_info; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_app_registration(v_app_info, v_headers); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(v_app_info.appInstanceId, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + v_app_info.appName, + v_app_info.appProvider, + -, + v_app_info.appDId, + v_app_info.appInstanceId + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_app_deletion(v_app_info.appInstanceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_003_OK + + /** + * @desc Check that the IUT responds with an error when queried to update MEC Application registration with a wrong ID + */ + testcase TC_MEC_MEC011_SRV_REGAPPS_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppInfo v_app_info; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_app_registration(v_app_info, v_headers); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + v_app_info.appName, + v_app_info.appProvider, + -, + v_app_info.appDId, + v_app_info.appInstanceId + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_app_deletion(v_app_info.appInstanceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_003_NF + + /** + * @desc Check that the IUT responds with 204 No Content when queried to delete an existing MEC Application registration + */ + testcase TC_MEC_MEC011_SRV_REGAPPS_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppInfo v_app_info; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_app_registration(v_app_info, v_headers); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(v_app_info.appInstanceId, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_004_OK + + /** + * @desc Check that the IUT responds with an error when queried to delete an unknown MEC Application registration + */ + testcase TC_MEC_MEC011_SRV_REGAPPS_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_004_NF + + } // End of group reg_apps + + /* + * Service Availability Query (SAQ) + */ + group saq { + + /** + * @desc Check that the IUT responds with a list of available MEC services when queried by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_SAQ_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI, + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_service_info_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_SAQ_001_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_SAQ_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI & "?instance_id=" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request() + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_SAQ_001_BR + + /** + * @desc Check that the IUT responds with the information on a specific service when queried by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_SAQ_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI & "/" & oct2char(unichar2oct(PX_SERVICE_ID, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_service_info( + mw_service_info( + PX_SERVICE_ID + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_SAQ_002_OK + + /** + * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_SAQ_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_ID, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_SAQ_002_NF + + } // End of group saq + + /* + * Service Subscriptions (SRVSUB) + */ + group srv_sub { + + /** + * @desc Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_SRVSUB_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SerAvailabilityNotificationSubscription v_ser_availability_notification_subscription; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + f_create_ser_availability_notification_subscription(v_ser_availability_notification_subscription); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_subscription_link_list( + mw_subscription_link_list + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Mp1SubscriptionLinkList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_ser_availability_notification_subscription(v_ser_availability_notification_subscription); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_SRVSUB_001_OK + + /** + * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_SRVSUB_001_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_SRVSUB_001_NF + + /** + * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications on service availability events + */ + testcase TC_MEC_MEC011_SRV_SRVSUB_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + v_headers, + m_http_message_body_json( + m_body_json_srv_avail_notif_subscription( + m_srv_avail_notif_subscription( + PX_SRV_AVAIL_NOTIF_CALLBACK_URI + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( mw_http_message_body_json( mw_body_json_srv_avail_notif_subscription( mw_srv_avail_notif_subscription( @@ -2633,7 +3604,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_SRVSUB_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2695,7 +3665,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with the information on a specific subscription when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_SRVSUB_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2716,13 +3685,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble - f_init_default_headers_list(-, -, v_headers); f_create_ser_availability_notification_subscription(v_ser_availability_notification_subscription); v_uri := regexp( oct2char(unichar2oct(v_ser_availability_notification_subscription.links.self_.href)), "?+(" & PX_MEC_SVC_MGMT_APPS_URI & "/?*)", 0 ); + f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( @@ -2761,7 +3730,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_SRVSUB_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2815,7 +3783,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT acknowledges the unsubscribe from service availability event notifications when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_SRVSUB_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2836,13 +3803,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble - f_init_default_headers_list(-, -, v_headers); f_create_ser_availability_notification_subscription(v_ser_availability_notification_subscription); v_uri := regexp( oct2char(unichar2oct(v_ser_availability_notification_subscription.links.self_.href)), "?+(" & PX_MEC_SVC_MGMT_APPS_URI & "/?*)", 0 ); + f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( @@ -2875,7 +3842,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_SRVSUB_004_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2930,14 +3896,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of group srv_sub - /* - * Timing capabilities (TIME) - */ + /* + * Timing capabilities (TIME) + */ group timing { /** * @desc Check that the IUT responds with timing capabilities when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TIME/PlatTiming.tplan2 */ testcase TC_MEC_MEC011_SRV_TIME_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2997,7 +3962,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with current time when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TIME/PlatTiming.tplan2 */ testcase TC_MEC_MEC011_SRV_TIME_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3057,14 +4021,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of group timing - /* - * Traffic rules (TRAF) - */ + /* + * Traffic rules (TRAF) + */ group traffic_rules { /** * @desc Check that the IUT responds with a list of available traffic rules when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRAF/PlatTrafficRules.tplan2 */ testcase TC_MEC_MEC011_SRV_TRAF_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3121,7 +4084,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRAF/PlatTrafficRules.tplan2 */ testcase TC_MEC_MEC011_SRV_TRAF_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3175,7 +4137,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with the information on a specific traffic rule when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRAF/TrafficRules.tplan2 */ testcase TC_MEC_MEC011_SRV_TRAF_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3233,7 +4194,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT updates a specific traffic rule when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRAF/TrafficRules.tplan2 */ testcase TC_MEC_MEC011_SRV_TRAF_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3302,7 +4262,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRAF/PlatTrafficRules.tplan2 */ testcase TC_MEC_MEC011_SRV_TRAF_003_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3366,7 +4325,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRAF/PlatTrafficRules.tplan2 */ testcase TC_MEC_MEC011_SRV_TRAF_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3430,7 +4388,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRAF/PlatTrafficRules.tplan2 */ testcase TC_MEC_MEC011_SRV_TRAF_003_PF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3495,14 +4452,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of group traffic_rules - /* - * Transport (TRANS) - */ + /* + * Transport (TRANS) + */ group transport_rules { /** * @desc Check that the IUT responds with a list of available transports when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRANS/PlatTransport.tplan2 */ testcase TC_MEC_MEC011_SRV_TRANS_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables diff --git a/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn index 0f71a6c..a806736 100644 --- a/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn +++ b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn @@ -12,6 +12,90 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestControl { control { if (PICS_MEC_PLAT and PICS_SERVICES) { + if (PICS_APP_ENABLEMENT_API_SUPPORTED) { + execute(TC_MEC_MEC011_SRV_APPSAQ_001_OK()); + execute(TC_MEC_MEC011_SRV_APPSAQ_001_BR()); + execute(TC_MEC_MEC011_SRV_APPSAQ_002_OK()); + execute(TC_MEC_MEC011_SRV_APPSAQ_002_BR()); + execute(TC_MEC_MEC011_SRV_APPSAQ_002_NF()); + execute(TC_MEC_MEC011_SRV_APPSAQ_003_OK()); + execute(TC_MEC_MEC011_SRV_APPSAQ_003_NF()); + execute(TC_MEC_MEC011_SRV_APPSAQ_004_OK()); + execute(TC_MEC_MEC011_SRV_APPSAQ_004_BR()); + execute(TC_MEC_MEC011_SRV_APPSAQ_004_NF()); + execute(TC_MEC_MEC011_SRV_APPSAQ_004_PF()); + + execute(TC_MEC_MEC011_SRV_APPSUB_001_OK()); + execute(TC_MEC_MEC011_SRV_APPSUB_001_NF()); + execute(TC_MEC_MEC011_SRV_APPSUB_002_OK()); + execute(TC_MEC_MEC011_SRV_APPSUB_002_BR()); + execute(TC_MEC_MEC011_SRV_APPSUB_003_OK()); + execute(TC_MEC_MEC011_SRV_APPSUB_003_NF()); + execute(TC_MEC_MEC011_SRV_APPSUB_004_OK()); + execute(TC_MEC_MEC011_SRV_APPSUB_004_NF()); + + execute(TC_MEC_MEC011_SRV_CONFTASK_001_OK()); + execute(TC_MEC_MEC011_SRV_CONFTASK_001_NF()); + execute(TC_MEC_MEC011_SRV_CONFTASK_002_OK()); + execute(TC_MEC_MEC011_SRV_CONFTASK_002_NF()); + + execute(TC_MEC_MEC011_SRV_DNS_001_OK()); + execute(TC_MEC_MEC011_SRV_DNS_001_NF()); + execute(TC_MEC_MEC011_SRV_DNS_002_OK()); + execute(TC_MEC_MEC011_SRV_DNS_002_NF()); + execute(TC_MEC_MEC011_SRV_DNS_003_OK()); + execute(TC_MEC_MEC011_SRV_DNS_003_BR()); + execute(TC_MEC_MEC011_SRV_DNS_003_NF()); + execute(TC_MEC_MEC011_SRV_DNS_003_PF()); + + execute(TC_MEC_MEC011_SRV_MSL_001_OK()); + execute(TC_MEC_MEC011_SRV_MSL_001_NF()); + execute(TC_MEC_MEC011_SRV_MSL_002_OK()); + execute(TC_MEC_MEC011_SRV_MSL_002_BR()); + + execute(TC_MEC_MEC011_SRV_REGAPPS_001_OK_01()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_OK_02()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_OK_03()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_01()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_02()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_03()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_04()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_05()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_06()); + execute(TC_MEC_MEC011_SRV_REGAPPS_002_OK()); + execute(TC_MEC_MEC011_SRV_REGAPPS_002_NF()); + execute(TC_MEC_MEC011_SRV_REGAPPS_003_OK()); + execute(TC_MEC_MEC011_SRV_REGAPPS_003_NF()); + execute(TC_MEC_MEC011_SRV_REGAPPS_004_OK()); + execute(TC_MEC_MEC011_SRV_REGAPPS_004_NF()); + + execute(TC_MEC_MEC011_SRV_SAQ_001_OK()); + execute(TC_MEC_MEC011_SRV_SAQ_001_BR()); + execute(TC_MEC_MEC011_SRV_SAQ_002_OK()); + execute(TC_MEC_MEC011_SRV_SAQ_002_NF()); + + execute(TC_MEC_MEC011_SRV_SRVSUB_001_OK()); + execute(TC_MEC_MEC011_SRV_SRVSUB_001_NF()); + execute(TC_MEC_MEC011_SRV_SRVSUB_002_OK()); + execute(TC_MEC_MEC011_SRV_SRVSUB_002_BR()); + execute(TC_MEC_MEC011_SRV_SRVSUB_003_OK()); + execute(TC_MEC_MEC011_SRV_SRVSUB_003_NF()); + execute(TC_MEC_MEC011_SRV_SRVSUB_004_OK()); + execute(TC_MEC_MEC011_SRV_SRVSUB_004_NF()); + + execute(TC_MEC_MEC011_SRV_TIME_001_OK()); + execute(TC_MEC_MEC011_SRV_TIME_002_OK()); + + execute(TC_MEC_MEC011_SRV_TRAF_001_OK()); + execute(TC_MEC_MEC011_SRV_TRAF_001_NF()); + execute(TC_MEC_MEC011_SRV_TRAF_002_OK()); + execute(TC_MEC_MEC011_SRV_TRAF_003_OK()); + execute(TC_MEC_MEC011_SRV_TRAF_003_BR()); + execute(TC_MEC_MEC011_SRV_TRAF_003_NF()); + execute(TC_MEC_MEC011_SRV_TRAF_003_PF()); + + execute(TC_MEC_MEC011_SRV_TRANS_001_OK()); + } } } // End of 'control' statement diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn index 7ea2bb1..60d997e 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn @@ -95,7 +95,7 @@ module ApplicationMobilityServiceAPI_Templates { in template (omit) Json.AnyURI p_callbackReference := omit, in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := omit, in template (omit) AdjacentFilterCriteria p_filterCriteria := omit, - in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.TimeStamp p_expiryDeadline := omit, + in template (omit) TimeStamp p_expiryDeadline := omit, in template (omit) Json.Bool p_requestTestNotification := omit, in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := omit ) := { @@ -113,7 +113,7 @@ module ApplicationMobilityServiceAPI_Templates { template Json.AnyURI p_callbackReference := *, template ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := *, template AdjacentFilterCriteria p_filterCriteria := *, - template ApplicationMobilityServiceAPI_TypesAndValues.TimeStamp p_expiryDeadline := *, + template TimeStamp p_expiryDeadline := *, template Json.Bool p_requestTestNotification := *, template ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := * ) := { @@ -131,7 +131,7 @@ module ApplicationMobilityServiceAPI_Templates { in template (value) Links_Notification p_links, in template (value) AssociateId p_associateId, in template (value) MobilityStatus p_mobilityStatus, - in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.TimeStamp p_timeStamp := omit, + in template (omit) TimeStamp p_timeStamp := omit, in template (omit) TargetAppInfo p_targetAppInfo := omit ) := { notificationType := p_notificationType, @@ -147,7 +147,7 @@ module ApplicationMobilityServiceAPI_Templates { template (present) Links_Notification p_links := ?, template (present) AssociateId p_associateId := ?, template (present) MobilityStatus p_mobilityStatus := ?, - template ApplicationMobilityServiceAPI_TypesAndValues.TimeStamp p_timeStamp := *, + template TimeStamp p_timeStamp := *, template TargetAppInfo p_targetAppInfo := * ) := { notificationType := p_notificationType, @@ -160,7 +160,7 @@ module ApplicationMobilityServiceAPI_Templates { template (omit) ApplicationMobilityServiceAPI_TypesAndValues.ExpiryNotification m_expire_notification( in Json.String p_notificationType, - in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.TimeStamp p_timestamp := omit, + in template (omit) TimeStamp p_timestamp := omit, in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := omit ) := { notificationType := p_notificationType, @@ -170,7 +170,7 @@ module ApplicationMobilityServiceAPI_Templates { template (present) ApplicationMobilityServiceAPI_TypesAndValues.ExpiryNotification mw_expire_notification( template (present) Json.String p_notificationType := ?, - template ApplicationMobilityServiceAPI_TypesAndValues.TimeStamp p_timestamp := *, + template TimeStamp p_timestamp := *, template ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := * ) := { notificationType := p_notificationType, diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn index 16bdcfd..4a79f59 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn @@ -331,27 +331,6 @@ module ApplicationMobilityServiceAPI_TypesAndValues { } type record length(1..infinity) of IpAddress IpAddresses; - /** - * @desc - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see ETSI GS MEC 021 V3.1.1 (2023-10) Clause 7.5.3 Type: TimeStamp - */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds - } - - /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type Json.UInteger Seconds; - - /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type Json.UInteger NanoSeconds; - /** * @desc This type represents a type of link * @member href URI referring to a resource diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn index 193337d..b914cc0 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn @@ -3,10 +3,13 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { // JSON import from Json all; - // LibMec_EdgePlatformApplicationEnablementAPI - //import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; /* TITAN WORK-AROUND for build issue (class forward declaration) */ + // LibMec + import from LibMec_TypesAndValues all; - // LibMec_ApplicationMobilityServiceAPI + // LibMec/LibMec_EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; + + // LibMec/LibMec_ApplicationMobilityServiceAPI import from ApplicationMobilityServiceAPI_TypesAndValues all; // LibMec_ApplicationPackageLifecycleAndOperationGrantingAPI @@ -343,7 +346,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { template (present) Json.String p_id := ?, template (present) Json.String p_notificationType := ?, template (present) Json.String p_subscriptionId := ?, - template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TimeStamp p_timeStamp := ?, + template (present) TimeStamp p_timeStamp := ?, template (present) Json.String p_appPkgId := ?, template (present) Json.String p_appDId := ?, template (present) AppPkgInfo_OperationalState p_operationalState := ?, @@ -498,12 +501,84 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { serTransportDependencies := p_serTransportDependencies, requestedPermissions := p_requestedPermissions } // End of template mw_service_dependency - + + template (value) FeatureDependency m_feature_dependency( + in Json.String p_featureName, + in Json.String p_version + ) := { + featureName := p_featureName, + version := p_version + } // End of template m_feature_dependency + + template (present) FeatureDependency mw_feature_dependency( + template (present) Json.String p_featureName := ?, + template (present) Json.String p_version := ? + ) := { + featureName := p_featureName, + version := p_version + } // End of template mw_feature_dependency + + template (value) TransportDependency m_transport_dependency( + in template (value) TransportDescriptor p_transport, + in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SerializerType p_serializers, + in template (value) Labels p_labels + ) := { + transport := p_transport, + serializers := p_serializers, + labels := p_labels + } // End of template m_transport_dependency + + template (present) TransportDependency mw_transport_dependency( + template (present) TransportDescriptor p_transport := ?, + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SerializerType p_serializers := ?, + template (present) Labels p_labels := ? + ) := { + transport := p_transport, + serializers := p_serializers, + labels := p_labels + } // End of template mw_transport_dependency + + template (omit) TransportDescriptor m_transport_descriptor( + in Json.String p_name, + in ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TransportType p_type_ := REST_HTTP, + in Json.String p_protocol, + in Json.String p_version, + in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SecurityInfo p_security, + in template (omit) Json.String p_description := omit, + in template (omit) Json.String p_implSpecificInfo := omit + ) := { + name := p_name, + description := p_description, + type_ := p_type_, + protocol := p_protocol, + version := p_version, + security := p_security, + implSpecificInfo := p_implSpecificInfo + } // End of template m_transport_descriptor + + template (present) TransportDescriptor mw_transport_descriptor( + template (present) Json.String p_name := ?, + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TransportType p_type_ := ?, + template (present) Json.String p_protocol := ?, + template (present) Json.String p_version := ?, + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SecurityInfo p_security := ?, + template Json.String p_description := *, + template Json.String p_implSpecificInfo := * + ) := { + name := p_name, + description := p_description, + type_ := p_type_, + protocol := p_protocol, + version := p_version, + security := p_security, + implSpecificInfo := p_implSpecificInfo + } // End of template mw_transport_descriptor + template (omit) TrafficRuleDescriptor m_traffic_rule_descriptor( in template (value) Json.String p_trafficRuleId, in template (value) FilterType p_filterType, in template (value) Json.Integer p_priority, - in template (value) TrafficFilter p_trafficFilter, + in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter p_trafficFilter, in template (value) Action p_action, in template (omit) InterfaceDescriptor p_dstInterface := omit ) := { @@ -519,7 +594,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { template (present) Json.String p_trafficRuleId := ?, template (present) FilterType p_filterType := ?, template (present) Json.Integer p_priority := ?, - template (present) TrafficFilter p_trafficFilter := ?, + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter p_trafficFilter := ?, template (present) Action p_action := ?, template InterfaceDescriptor p_dstInterface := * ) := { @@ -531,7 +606,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { dstInterface := p_dstInterface } // End of template mw_traffic_rule_descriptor - template (omit) TrafficFilter m_traffic_filter( + template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter m_traffic_filter( in template (omit) Json.String p_srcAddress := omit, in template (omit) Json.String p_dstAddress := omit, in template (omit) Json.String p_srcPort := omit, @@ -565,7 +640,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { tC := p_tC } // End of template m_traffic_filter - template TrafficFilter mw_traffic_filter( + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter mw_traffic_filter( template Json.String p_srcAddress := *, template Json.String p_dstAddress := *, template Json.String p_srcPort := *, @@ -818,8 +893,8 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { template (omit) AppLcmOpOcc m_app_lcm_op_occ( in Json.String p_id, in OperationState p_operationState, - in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TimeStamp p_stateEnteredTime, - in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TimeStamp p_startTime, + in template (value) TimeStamp p_stateEnteredTime, + in template (value) TimeStamp p_startTime, in OperationType p_lcmOperation, in template (value) AppLcmOpOcc_Link p_links, in template (omit) OperationParams p_operationParams := omit, @@ -840,8 +915,8 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { template (present) AppLcmOpOcc mw_app_lcm_op_occ( template (present) Json.String p_id := ?, template (present) OperationState p_operationState := ?, - template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TimeStamp p_stateEnteredTime := ?, - template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TimeStamp p_startTime := ?, + template (present) TimeStamp p_stateEnteredTime := ?, + template (present) TimeStamp p_startTime := ?, template (present) OperationType p_lcmOperation := ?, template (present) AppLcmOpOcc_Link p_links := ?, template OperationParams p_operationParams := *, @@ -961,9 +1036,9 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { template (omit) AppInstNotification m_app_inst_notification( in Json.String p_id, - in NotificationType p_notificationType, + in ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.NotificationType p_notificationType, in Json.String p_subscriptionId, - in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TimeStamp p_timeStamp, + in template (value) TimeStamp p_timeStamp, in Json.String p_appInstanceId, in Json.String p_appPkgId, in Json.String p_appDId, @@ -985,9 +1060,9 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { template (present) AppInstNotification mw_app_inst_notification( template (present) Json.String p_id := ?, - template (present) NotificationType p_notificationType := ?, + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.NotificationType p_notificationType := ?, template (present) Json.String p_subscriptionId := ?, - template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TimeStamp p_timeStamp := ?, + template (present) TimeStamp p_timeStamp := ?, template (present) Json.String p_appInstanceId := ?, template (present) Json.String p_appPkgId := ?, template (present) Json.String p_appDId := ?, diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn index eb6c3c3..ba064e3 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn @@ -16,12 +16,12 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { // LibMec import from LibMec_TypesAndValues all; + // LibMec_EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; + // LibMec_ApplicationMobilityServiceAPI import from ApplicationMobilityServiceAPI_TypesAndValues all; - // LibMec_EdgePlatformApplicationEnablementAPI - //import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; /* TITAN WORK-AROUND for build issue (class forward declaration) */ - /** * @desc An application Descriptor (AppD) is a part of application package, and describes application requirements and rules required by application provider * @member appDid Identifier of this MEC application descriptor. This attribute shall be globally unique @@ -185,7 +185,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { */ type record TransportsSupported { TransportDescriptor transport, - SerializerType serializers + ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SerializerType serializers } /** @@ -400,7 +400,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { */ type record TransportDependency { TransportDescriptor transport, - SerializerType serializers, + ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SerializerType serializers, Labels labels } type record of TransportDependency TransportDependencies; @@ -421,10 +421,10 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { type record TransportDescriptor { Json.String name, Json.String description optional, - TransportType type_, + ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TransportType type_, Json.String protocol, Json.String version, - SecurityInfo security, + ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SecurityInfo security, Json.String implSpecificInfo optional } with { variant (type_) "name as 'type'"; @@ -1906,27 +1906,6 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { } type set of KeyValuePair KeyValuePairs; - /** - * @desc This data type represents the time stamp as Unix-time since January 1, 1970, 00:00:00 UTC - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see ETSI GS MEC 010-2 Clause 6.2.5.4 Type: TimeStamp - */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds - } - - /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type Json.UInteger Seconds; - - /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type Json.UInteger NanoSeconds; - /** * @desc This type represents the checksum of an application package * @member algorithm Name of the algorithm used to generate the checksum, as defined in ETSI GS NFV-SOL 004 [18] @@ -1941,8 +1920,8 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { group edge_platform_application_enablement { /* TITAN WORK-AROUND for build issue (class forward declaration) */ /** - * @desc The enumeration TransportType represents types of transports. - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.4-1: Enumeration TransportType + * @desc The enumeration TransportType represents types of transports. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.4-1: Enumeration TransportType */ type enumerated TransportType { REST_HTTP, @@ -1957,26 +1936,26 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { /** * @desc List of supported OAuth 2.0 grant types. */ - type enumerated GrantTypes { - OAUTH2_AUTHORIZATION_CODE, - OAUTH2_IMPLICIT_GRANT, - OAUTH2_RESOURCE_OWNER, - OAUTH2_CLIENT_CREDENTIALS - } - type record length(1..4) of GrantTypes GrantTypesList; + // type enumerated GrantTypes { + // OAUTH2_AUTHORIZATION_CODE, + // OAUTH2_IMPLICIT_GRANT, + // OAUTH2_RESOURCE_OWNER, + // OAUTH2_CLIENT_CREDENTIALS + // } + // type record length(1..4) of GrantTypes GrantTypesList; /** * @desc The token endpoint. */ - type Json.String TokenEndpoint; + //type Json.String TokenEndpoint; /** * @desc Parameters related to use of OAuth 2.0. */ - type record OAuth2Info { - GrantTypesList grantTypes, - TokenEndpoint tokenEndpoint - } + // type record OAuth2Info { + // GrantTypesList grantTypes, + // TokenEndpoint tokenEndpoint + // } /** * @desc This type represents security information related to a transport. @@ -1984,12 +1963,12 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { */ type record SecurityInfo { OAuth2Info oAuth2Info optional, - Json.UInt8 extentions optional + Json.UInt8 extensions optional } /** - * @desc The enumeration SerializerTypes represents types of serializers. - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.3-1: Enumeration SerializerType + * @desc The enumeration SerializerTypes represents types of serializers. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.3-1: Enumeration SerializerType */ type enumerated SerializerType { JSON, @@ -1999,34 +1978,34 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { } /** - * @desc Reference of the catalogue. - */ - type Json.String CategoryRef_Href; + * @desc Reference of the catalogue. + */ + //type Json.String CategoryRef_Href; /** - * @desc Unique identifier of the category. - */ - type Json.String CategoryRef_Id; + * @desc Unique identifier of the category. + */ + //type Json.String CategoryRef_Id; /** - * @desc Name of the category. - */ - type Json.String Name; + * @desc Name of the category. + */ + //type Json.String Name; /** - * @desc Category version. - */ - type Json.String CategoryRef_Version; + * @desc Category version. + */ + //type Json.String CategoryRef_Version; /** - * @desc This type represents the category reference. - */ - type record CategoryRef { - CategoryRef_Href href, - CategoryRef_Id id, - Name name, - CategoryRef_Version version - } + * @desc This type represents the category reference. + */ + // type record CategoryRef { + // CategoryRef_Href href, + // CategoryRef_Id id, + // Name name, + // CategoryRef_Version version + // } type Json.String NotificationType; diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn index 7e3cb45..2ba0429 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn @@ -173,5 +173,75 @@ module EdgePlatformApplicationEnablementAPI_Functions { } } // End of 'alt' statement } // End of function f_delete_ser_availability_notification_subscription - + + function f_app_registration( + out AppInfo p_app_info, + out Headers p_headers + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_info_regapps( + mw_app_info( + PX_APP_NAME + )))))) -> value v_response { + tc_ac.stop; + + p_app_info := v_response.response.body.json_body.appInfo_regapps; + p_headers := v_response.response.header; + log("f_app_registration: IUT successfully responds with a AppInfo: ", p_app_info); + } + [] tc_ac.timeout { + log("f_app_registration: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_app_registration + + function f_app_deletion( + in Json.String p_app_instance_id + ) runs on HttpComponent { + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + v_headers + ))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_app_deletion: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_app_deletion + } // End of module EdgePlatformApplicationEnablementAPI_Functions diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Pixits.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Pixits.ttcn index e36543d..3c16b76 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Pixits.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Pixits.ttcn @@ -1,8 +1,15 @@ module EdgePlatformApplicationEnablementAPI_Pixits { + // JSON + import from Json all; + // LibMec/EdgePlatformApplicationEnablementAPI import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; + modulepar Json.String PX_APP_NAME := "appName"; + + modulepar Json.String PX_APP_D_ID := "appName"; + modulepar AppInstanceId PX_APP_INSTANCE_ID := "appInst01"; modulepar AppInstanceId PX_NON_EXISTENT_APP_INSTANCE_ID := "appInst99"; diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn index 2c149ed..11f4d44 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn @@ -1,6 +1,5 @@ /** * @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 EdgePlatformApplicationEnablementAPI_Templates { @@ -10,27 +9,17 @@ module EdgePlatformApplicationEnablementAPI_Templates { // LibCommon import from LibCommon_BasicTypesAndValues all; - // LibMec/AppEna + // LibMec + import from LibMec_TypesAndValues all; + + // LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; + + // LibMec/EdgePlatformApplicationEnablementAPI import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; import from EdgePlatformApplicationEnablementAPI_Pixits all; - template (value) TimeStamp m_time_stamp( - in Seconds p_seconds, - in NanoSeconds p_nanoSeconds := 0 - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of template m_time_stamp - - template (present) TimeStamp mw_time_stamp( - template (present) Seconds p_seconds := ?, - template (present) NanoSeconds p_nanoSeconds := ? - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of template mw_time_stamp - - template (value) SecurityInfo m_security_info( + template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo m_security_info( in GrantTypesList p_grantTypes := { OAUTH2_CLIENT_CREDENTIALS }, in TokenEndpoint p_tokenEndpoint := "/mecSerMgmtApi/security/MyTokenEndPoint" ) := { @@ -41,7 +30,7 @@ module EdgePlatformApplicationEnablementAPI_Templates { extentions := omit } // End of template m_security_info - template (present) SecurityInfo mw_security_info( + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo mw_security_info( template (present) GrantTypesList p_grantTypes := ?, template (present) TokenEndpoint p_tokenEndpoint := ? ) := { @@ -88,7 +77,7 @@ module EdgePlatformApplicationEnablementAPI_Templates { in SerName p_serName, in ServiceInfo_Version p_version := PX_SERVICE_INFO_VERSION, in ServiceState p_state := PX_SERVICE_INFO_STATE, - in SerializerType p_serializer := PX_SERIALIZER, + in EdgePlatformApplicationEnablementAPI_TypesAndValues.SerializerType p_serializer := PX_SERIALIZER, in template (value) ServiceInfo_Link p_links, in template (omit) SerInstanceId p_serInstanceId := omit, in template (omit) TransportId p_transportId := omit, @@ -114,7 +103,7 @@ module EdgePlatformApplicationEnablementAPI_Templates { template (present) SerName p_serName := ?, template (present) ServiceInfo_Version p_version := PX_SERVICE_INFO_VERSION, template (present) ServiceState p_state := PX_SERVICE_INFO_STATE, - template (present) SerializerType p_serializer := PX_SERIALIZER, + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.SerializerType p_serializer := PX_SERIALIZER, template (present) ServiceInfo_Link p_links := ?, template SerInstanceId p_serInstanceId := *, template TransportId p_transportId := *, @@ -149,7 +138,7 @@ module EdgePlatformApplicationEnablementAPI_Templates { } // End of template mw_subscription_link_list template (value) Self m_self( - in template (value) LinkType p_self_ + in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.LinkType p_self_ ) := { self_ := p_self_ } // End of template m_self @@ -184,6 +173,62 @@ module EdgePlatformApplicationEnablementAPI_Templates { appInstanceId := p_appInstanceId } // End of template mw_app_termination_notif_subscription + template (omit) AppInfo m_app_info( + in Json.String p_appName, + in template (omit) Json.String p_appProvider := omit, + in template (omit) CategoryRef p_appCategory := omit, + in template (omit) Json.String p_appDId := omit, + in template (omit) Json.String p_appInstanceId := omit, + in template (omit) EndPointInfo p_endpoint := omit, + in template (omit) ServiceDependencies p_appServiceRequired := omit, + in template (omit) ServiceDependencies p_appServiceOptional := omit, + in template (omit) FeatureDependencies p_appFeatureRequired := omit, + in template (omit) FeatureDependencies p_appFeatureOptional := omit, + in template (omit) Json.Bool p_isInsByMec := omit, + in template (omit) AppProfile p_appProfile := omit + ) := { + appName := p_appName, + appProvider := p_appProvider, + appCategory := p_appCategory, + appDId := p_appDId, + appInstanceId := p_appInstanceId, + endpoint := p_endpoint, + appServiceRequired := p_appServiceRequired, + appServiceOptional := p_appServiceOptional, + appFeatureRequired := p_appFeatureRequired, + appFeatureOptional := p_appFeatureOptional, + isInsByMec := p_isInsByMec, + appProfile := p_appProfile + } // End of template m_app_info + + template (present) AppInfo mw_app_info( + template (present) Json.String p_appName := ?, + template Json.String p_appProvider := *, + template CategoryRef p_appCategory := *, + template Json.String p_appDId := *, + template Json.String p_appInstanceId := *, + template EndPointInfo p_endpoint := *, + template ServiceDependencies p_appServiceRequired := *, + template ServiceDependencies p_appServiceOptional := *, + template FeatureDependencies p_appFeatureRequired := *, + template FeatureDependencies p_appFeatureOptional := *, + template Json.Bool p_isInsByMec := *, + template AppProfile p_appProfile := * + ) := { + appName := p_appName, + appProvider := p_appProvider, + appCategory := p_appCategory, + appDId := p_appDId, + appInstanceId := p_appInstanceId, + endpoint := p_endpoint, + appServiceRequired := p_appServiceRequired, + appServiceOptional := p_appServiceOptional, + appFeatureRequired := p_appFeatureRequired, + appFeatureOptional := p_appFeatureOptional, + isInsByMec := p_isInsByMec, + appProfile := p_appProfile + } // End of template mw_app_info + template (value) ServiceLivenessInfo m_service_liveness_info( in ServiceState p_state, in template (value) TimeStamp p_timeStamp, @@ -207,11 +252,11 @@ module EdgePlatformApplicationEnablementAPI_Templates { template (value) TransportInfo m_transport_info( in TransportInfo_Id p_id, in TransportInfo_Name p_name, - in TransportType p_type_, + in EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType p_type_, in TransportInfo_Protocol p_protocol, in TransportInfo_Version p_version, in template (value) EndPointInfo p_endpoint, - in template (value) SecurityInfo p_security + in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo p_security ) := { id := p_id, name := p_name, @@ -227,11 +272,11 @@ module EdgePlatformApplicationEnablementAPI_Templates { template (present) TransportInfo mw_transport_info( template (present) TransportInfo_Id p_id := ?, template (present) TransportInfo_Name p_name := ?, - template (present) TransportType p_type_ := ?, + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType p_type_ := ?, template (present) TransportInfo_Protocol p_protocol := ?, template (present) TransportInfo_Version p_version := ?, template (present) EndPointInfo p_endpoint := ?, - template (present) SecurityInfo p_security := ? + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo p_security := ? ) := { id := p_id, name := p_name, diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn index fd0248c..f24ab58 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn @@ -1,12 +1,14 @@ /** * @desc The ETSI MEC ISG MEC011 Application Enablement API described using OpenAPI - * @see https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/03.01.01_60/gs_MEC011v030101p.pdf */ module EdgePlatformApplicationEnablementAPI_TypesAndValues { // JSON import from Json all; + // LibMec + import from LibMec_TypesAndValues all; + // MEC-10-2 import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; @@ -34,7 +36,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @member operationAction Operation that is being performed on the MEC application instance * @member maxGracefulTimeout Maximum non-zero timeout value in seconds for graceful termination or graceful stop of an application instance * @member links Object containing hyperlinks related to the resource - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.4.2-1: Attributes of AppTerminationNotification + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.4.2-1: Attributes of AppTerminationNotification */ type record AppTerminationNotification { NotificationType notificationType, @@ -50,7 +52,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * that the application has completed its application level related terminate/stop actions, e.g. retention of application state * in the case of stop. * @member operationAction Operation that is being performed on the MEC application instance - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.4.3-1: Attributes of AppTerminationConfirmation + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.4.3-1: Attributes of AppTerminationConfirmation */ type record AppTerminationConfirmation { OperationAction operationAction @@ -59,7 +61,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc This type represents the information that the MEC application instance indicates to the MEC platform that it is up and running * @member indication Indication about the MEC application instance - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.4.4-1: Attributes of AppReadyConfirmation + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.4.4-1: Attributes of AppReadyConfirmation */ type record AppReadyConfirmation { Json.String indication @@ -77,7 +79,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @member callbackReference URI selected by the MEC application instance to receive notifications on the subscribed MEC application instance management information * @member links Object containing hyperlinks related to the resource * @member appInstanceId It is used as the filtering criterion for the subscribed events - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.3.2-1: Attributes of AppTerminationNotificationSubscription + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.3.2-1: Attributes of AppTerminationNotificationSubscription */ type record AppTerminationNotificationSubscription { SubscriptionType subscriptionType, @@ -100,7 +102,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc Represents possible states of a MEC service instance - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.6-1: Enumeration ServiceState + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.6.6-1: Enumeration ServiceState */ type enumerated ServiceState { ACTIVE (0), @@ -114,7 +116,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @member state Liveness state of the MEC service instance * @member timeStamp The time when the last "heartbeat" message was received by MEC platform * @member interval The interval (in seconds) between two consecutive "heartbeat" messages (see clause 8.2.10.3.3) that MEC platform has determined. - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.2.4-1: Attributes of ServiceLivenessInfo + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.2.4-1: Attributes of ServiceLivenessInfo */ type record ServiceLivenessInfo { ServiceState state, @@ -153,19 +155,9 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { } type record length(1..infinity) of CategoryRef CategoryRefList; - /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. - */ - type Json.UInteger Seconds; - - /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. - */ - type Json.UInteger NanoSeconds; - /** * @desc Platform Time Source status. 1 = TRACEABLE - time source is locked to the UTC time source. 2 = NONTRACEABLE - time source is not locked to the UTC time source. - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.2.5-1: Attributes of CurrentTime + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.2.5-1: Attributes of CurrentTime */ type enumerated TimeSourceStatus { TRACEABLE (1), @@ -177,7 +169,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. * @member timeSourceStatus Platform Time Source status. 1 = TRACEABLE - time source is locked to the UTC time source. 2 = NONTRACEABLE - time source is not locked to the UTC time source. - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.2.5-1: Attributes of CurrentTime + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.2.5-1: Attributes of CurrentTime */ type record CurrentTime { Seconds seconds, @@ -199,7 +191,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @member appFeatureOptional Describes features a MEC application may use if available * @member isInsByMec Indicate whether the application instance is instantiated by the MEC Management * @member appProfile Can be mapped to EAS profile as defined in ETSI TS 129 558 [19] - * @see ETSI GS MEC 011 V3.1.1 (2022-09) 7.1.2.6-1: Attributes of AppInfo + * @see ETSI GS MEC 011 V3.2.1 7.1.2.6-1: Attributes of AppInfo */ type record AppInfo { Json.String appName, @@ -251,7 +243,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * member srcMacAddress If the interface type is "MAC", source address identifies the MAC address of the interface * member dstMacAddress If the interface type is "MAC", destination address identifies the MAC address of the interface * member dstIpAddress If the interface type is "IP", destination address identifies the IP address of the remote destination - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.5.3-1: Attributes of DestinationInterface + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.5.3-1: Attributes of DestinationInterface */ type record DestinationInterface { InterfaceType interfaceType, @@ -307,7 +299,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * member ipAddress IP address associated with the FQDN resolved by the DNS rule * member ttl Time to live value, in seconds. * member state Contains the DNS rule state: ACTIVE, INACTIVE - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.2.3-1: Attributes of DnsRule + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.2.3-1: Attributes of DnsRule */ type record DnsRule { DnsRule_Id dnsRuleId, @@ -369,7 +361,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc This type represents a type of link and may be referenced from data structures. * @member href URI referring to a resource - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 6.3.2-1: Attributes of the LinkType + * @see ETSI GS MEC 011 V3.2.1 Table 6.3.2-1: Attributes of the LinkType */ type record LinkType { Href href @@ -420,7 +412,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @desc This type represents a list of links related to currently existing subscriptions for a MEC application instance. * @member self_ Self-referring URI * @member subscriptions The MEC application instance's subscriptions - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 6.2.2-1: Attributes of the SubscriptionLinkList + * @see ETSI GS MEC 011 V3.2.1 Table 6.2.2-1: Attributes of the SubscriptionLinkList */ type record Links { LinkType self_, @@ -432,7 +424,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc This type represents a list of links related to currently existing subscriptions for a MEC application instance. * @member links Object containing hyperlinks related to the resource - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 6.2.2-1: Attributes of the SubscriptionLinkList + * @see ETSI GS MEC 011 V3.2.1 Table 6.2.2-1: Attributes of the SubscriptionLinkList */ type record SubscriptionLinkList { Links links @@ -444,7 +436,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @desc The MEC application instance's subscriptions * @member href URI referring to the subscription * @member subscriptionType Type of the subscription - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 6.2.2-1: Attributes of the SubscriptionLinkList + * @see ETSI GS MEC 011 V3.2.1 Table 6.2.2-1: Attributes of the SubscriptionLinkList */ type record Subscription_ { Json.AnyURI href, @@ -478,7 +470,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc This type represents security information related to a transport. - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.5.4-1: Attributes of SecurityInfo + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.5.4-1: Attributes of SecurityInfo */ type record SecurityInfo { OAuth2Info oAuth2Info optional, @@ -523,7 +515,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @member serCategories Categories of services about which to report events * @member states States of the services about which to report events * @member isLocal Restrict event reporting to whether the service is local to the MEC platform where the subscription is managed - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.3.2-1: Attributes of SerAvailabilityNotificationSubscription + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.3.2-1: Attributes of SerAvailabilityNotificationSubscription */ type record FilteringCriteria { SerInstanceIdList serInstanceIds optional, @@ -544,7 +536,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc The enumeration SerializerTypes represents types of serializers. - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.3-1: Enumeration SerializerType + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.6.3-1: Enumeration SerializerType */ type enumerated SerializerType { JSON, @@ -579,7 +571,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc Contains the types of locality. - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.5-1: Enumeration LocalityType + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.6.5-1: Enumeration LocalityType */ type enumerated LocalityType { MEC_SYSTEM, @@ -624,7 +616,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @member isLocal Indicate whether the service is located in the same locality (as defined by scopeOfLocality) as the consuming MEC application (TRUE) or not (FALSE) * @member livenessInterval Interval (in seconds) between two consecutive "heartbeat" messages * @member links Links to resources related to this resource - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.2.2-1: Attributes of ServiceInfo + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.2.2-1: Attributes of ServiceInfo */ type record ServiceInfo { SerInstanceId serInstanceId optional, @@ -718,7 +710,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @member localPriority NTP server local priority * @member authenticationOption NTP authentication option * @member authenticationKeyNum Authentication key number - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.2.4-1: Attributes of TimingCaps + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.2.4-1: Attributes of TimingCaps */ type record NtpServers { NtpServerAddrType ntpServerAddrType, @@ -741,22 +733,12 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { } type record of TimingCaps_PtpMasters TimingCaps_PtpMastersList; - /** - * @desc Time. - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. - */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds - } - /** * @desc This type represents the information provided by the mobile edge platform in response to the Timing capabilities Query message * @member timeStamp * @member ntpServers Number of available NTP servers * @member ptpMasters Number of available PTP Servers (referred to as "masters" in IEEE 1588-2019™ [i.2]) - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.2.4-1: Attributes of TimingCaps + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.2.4-1: Attributes of TimingCaps */ type record TimingCaps { TimeStamp timeStamp optional, @@ -830,7 +812,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @member qCI Used to match all packets that have the same QCI * @member dSCP Used to match all IPv4 packets that have the same DSCP * @member tC Used to match all IPv6 packets that have the same TC - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.5.2-1: Attributes of TrafficFilter + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.5.2-1: Attributes of TrafficFilter */ type record TrafficFilter { TrafficFilter_AddressList srcAddress optional, @@ -896,7 +878,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * member action The action of the MEC host data plane when a packet matches the trafficFilter * member dstInterface Describes the destination interface information * member state Contains the traffic rule state: ACTIVE, INACTIVE - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.2.2-1: Attributes of TrafficRule + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.2.2-1: Attributes of TrafficRule */ type record TrafficRule { TrafficRule_Id trafficRuleId, @@ -947,7 +929,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @member fqdn Fully Qualified Domain Name of the service * @member addresses Entry point information of the service as one or more pairs of IP address and port * @member alternativeEntry point information of the service in a format defined by an implementation, or in an external specification - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.5.3-1: Attributes of EndPointInfo + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.5.3-1: Attributes of EndPointInfo */ type record EndPointInfo { EndPointInfo_UriList uris optional, @@ -967,7 +949,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @member endpoint Information about the endpoint to access the transport * @member security Information about the security used by the transport * @member implSpecificInfo Additional implementation specific details of the transport - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.2.3-1: Attributes of TransportInfo + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.2.3-1: Attributes of TransportInfo */ type record TransportInfo { TransportInfo_Id id, @@ -986,7 +968,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc The enumeration TransportType represents types of transports. - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.4-1: Enumeration TransportType + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.6.4-1: Enumeration TransportType */ type enumerated TransportType { REST_HTTP, @@ -1021,7 +1003,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @member tunnelType Type of the tunnel, e.g. GTP_U, GRE, etc * @member tunnelDstAddress Destination address of the tunnel * @member tunnelSrcAddress Source address of the tunnel - * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 7.1.5.4-1: Attributes of TunnelInfo + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.5.4-1: Attributes of TunnelInfo */ type record TunnelInfo { TunnelInfo_TunnelType tunnelType, diff --git a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Templates.ttcn b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Templates.ttcn index 5ac2133..a5dfa5a 100644 --- a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Templates.ttcn +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Templates.ttcn @@ -6,6 +6,9 @@ module FixedAccessInformationServiceAPI_Templates { // LibCommon import from LibCommon_BasicTypesAndValues all; + // LibMec + import from LibMec_TypesAndValues all; + // LibMec_FixedAccessInformationServiceAPI import from FixedAccessInformationServiceAPI_TypesAndValues all; import from FixedAccessInformationServiceAPI_Pixits all; @@ -260,20 +263,4 @@ module FixedAccessInformationServiceAPI_Templates { alarms := p_alarms } // End of template mw_filter_criteria_onu_alarm - template (value) TimeStamp m_time_stamp( - in Json.UInteger p_seconds, - in Json.UInteger p_nanoSeconds := 0 - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of temlate m_time_stamp - - template (present) TimeStamp mw_time_stamp( - template (present) Json.UInteger p_seconds := ?, - template (present) Json.UInteger p_nanoSeconds := ? - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of temlate mw_time_stamp - } // End of module FixedAccessInformationServiceAPI_Templates diff --git a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn index 6873dc4..de9f30a 100644 --- a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn @@ -13,6 +13,9 @@ module FixedAccessInformationServiceAPI_TypesAndValues { // JSON import from Json all; + // LibMec + import from LibMec_TypesAndValues all; + /** * @desc This type represents the fixed access information * @member timeStamp Time stamp @@ -699,29 +702,6 @@ module FixedAccessInformationServiceAPI_TypesAndValues { LinkType subscription } - /** - * @desc - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.2-1: Attributes of the TimeStamp - */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds - } - - /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.2-1: Attributes of the TimeStamp - */ - type Json.UInteger Seconds; - - /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.2-1: Attributes of the TimeStamp - */ - type Json.UInteger NanoSeconds; - /** * @desc This type represents a customer premises (physical location) * @member latitude Latitude (DATUM=WGS84) diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn index 15b6974..4d824fc 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn @@ -6,6 +6,9 @@ module LocationAPI_Templates { // LibCommon import from LibCommon_BasicTypesAndValues all; + // LibMec + import from LibMec_TypesAndValues all; + // LibMec/LocationAPI import from LocationAPI_TypesAndValues all; import from LocationAPI_Pixits all; diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn index 0693c57..5f232e9 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn @@ -13,26 +13,8 @@ module LocationAPI_TypesAndValues { // JSON import from Json all; - /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type Json.UInteger Seconds; - - /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type Json.UInteger NanoSeconds; - - /** - * @desc - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.2 Type: TimeStamp - */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds - } + // LibMec + import from LibMec_TypesAndValues all; /** * @desc This type represents a list of UserInfo. diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn index c4145ec..83d31c1 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn @@ -448,22 +448,6 @@ module RnisAPI_Templates { s1BearerInfoDetailed := p_s1BearerInfoDetailed } // End of mw_s1_ue_info - template (value) TimeStamp m_time_stamp( - in UInt32 p_seconds, - in UInt32 p_nanoSeconds := 0 - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of temlate m_time_stamp - - template (present) TimeStamp mw_time_stamp( - template (present) UInt32 p_seconds := ?, - template (present) UInt32 p_nanoSeconds := ? - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of temlate mw_time_stamp - template (value) FilterCriteriaAssoc m_filter_criteria( in AppInstanceId p_appInstanceId, in template (value) AssociateId p_associateId, diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn index 372367f..2fd17bf 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn @@ -6,6 +6,9 @@ module TrafficManagementAPI_Templates { // LibCommon import from LibCommon_BasicTypesAndValues all; + // LibMec + import from LibMec_TypesAndValues all; + // LibMec/TrafficManagementAPI import from TrafficManagementAPI_TypesAndValues all; import from TrafficManagementAPI_Pixits all; diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn index 4c11591..3800d40 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn @@ -3,6 +3,9 @@ module TrafficManagementAPI_TypesAndValues { // JSON import from Json all; + // LibMec + import from LibMec_TypesAndValues all; + /** * @desc Information of bandwidth resource * @member allocationId Bandwidth allocation instance identifier @@ -48,17 +51,6 @@ module TrafficManagementAPI_TypesAndValues { AllocationDirection allocationDirection optional } - /** - * @desc Time stamp description - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo - */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds - } - /** * @desc Bandwidth allocation instance identifier * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn index 5365b30..72e6485 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn @@ -16,6 +16,9 @@ module V2XInformationServiceAPI_Templates { // LibCommon import from LibCommon_BasicTypesAndValues all; + // LibMec + import from LibMec_TypesAndValues all; + // LibMec/V2XInformationServiceAPI import from V2XInformationServiceAPI_TypesAndValues all; import from V2XInformationServiceAPI_Pixits all; diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn index 045f4f4..3521625 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn @@ -13,6 +13,9 @@ module V2XInformationServiceAPI_TypesAndValues { // JSON import from Json all; + // LibMec + import from LibMec_TypesAndValues all; + /** * @desc Provisioning information required for V2X communication over Uu unicast * @member timeStamp_ Time stamp @@ -508,29 +511,6 @@ module V2XInformationServiceAPI_TypesAndValues { variant (links) "name as '_links'"; } - /** - * @desc Time stamp description - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.2-1: Attributes of the TimeStamp - */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds - } - - /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.2-1: Attributes of the TimeStamp - */ - type Json.UInteger Seconds; - - /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.2-1: Attributes of the TimeStamp - */ - type Json.UInteger NanoSeconds; - /** * @desc Location information * @member ecgi E-UTRAN CelI Global Identifier of the serving cell diff --git a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Templates.ttcn b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Templates.ttcn index 828ad59..3806442 100644 --- a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Templates.ttcn +++ b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Templates.ttcn @@ -6,26 +6,13 @@ module WlanInformationAPI_Templates { // LibCommon import from LibCommon_BasicTypesAndValues all; + // LibMec + import from LibMec_TypesAndValues all; + // LibMec/WlanInformationAPI import from WlanInformationAPI_TypesAndValues all; import from WlanInformationAPI_Pixits all; - template (value) TimeStamp m_time_stamp( - in Seconds p_seconds, - in NanoSeconds p_nanoSeconds := 0 - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of template m_time_stamp - - template (present) TimeStamp mw_time_stamp( - template (present) Seconds p_seconds := ?, - template (present) NanoSeconds p_nanoSeconds := ? - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of template mw_time_stamp - template (omit) ApInfo m_ap_info( in template (value) ApIdentity p_apId, in template (omit) UInt32 p_channel := omit, diff --git a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn index a87f639..e5d677e 100644 --- a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn @@ -13,6 +13,9 @@ module WlanInformationAPI_TypesAndValues { // JSON import from Json all; + // LibMec + import from LibMec_TypesAndValues all; + /** * @desc This type represents the information on Access Points available from the WLAN Access Information Service. * @member timeStamp TimeStamp @@ -339,27 +342,6 @@ module WlanInformationAPI_TypesAndValues { variant (links) "name as '_links'"; } - /** - * @desc Time stamp description - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see ETSI GS MEC 028 V2.3.1 Table 6.5.2-1: Attributes of the TimeStamp - */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds - } - - /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type Json.UInteger Seconds; - - /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type Json.UInteger NanoSeconds; - /** * @desc Identifiers determining a specific Access Point * @member bssid Basic Service Set Identifier (BSSID) is a unique Identifier assigned to an Access Point (as network interface controller) for communications at the data link layer of a network segment diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index 063d8d8..0b42a5b 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -14,9 +14,9 @@ module LibMec_Pixits { modulepar charstring PX_ME_APP_Q_UE_IDENTITY_ID_URI := "/ui/v1/"; - modulepar charstring PX_SVC_MGMT_TRANS_URI := "/mec_service_mgmt/v1/transports"; + modulepar charstring PX_SVC_MGMT_TRANS_URI := "mec_service_mgmt/v1/transports"; - modulepar charstring PX_SVC_MGMT_APP_URI := "/mec_service_mgmt/v1/application"; + modulepar charstring PX_SVC_MGMT_APP_URI := "mec_service_mgmt/v1/application"; modulepar charstring PX_RNIS_SUBSCRITIONS_URI := "/rni/v2/subscriptions"; @@ -42,37 +42,39 @@ module LibMec_Pixits { modulepar charstring PX_ME_APP_AMS_SUBS := "/amsi/v1/subscriptions"; - modulepar charstring PX_MEO_GRANT_URI := "/granting/v1/grants"; + modulepar charstring PX_MEO_GRANT_URI := "granting/v1/grants"; - modulepar charstring PX_MEO_PKGM_URI := "/app_pkgm/v1/app_packages" + modulepar charstring PX_MEO_PKGM_URI := "app_pkgm/v1/app_packages" - modulepar charstring PX_MEO_PKGM_URI_ONBOARDED := "/app_pkgm/v1/onboarded_app_packages" + modulepar charstring PX_MEO_PKGM_URI_ONBOARDED := "app_pkgm/v1/onboarded_app_packages" - modulepar charstring PX_MEO_PKGM_SUBS := "/app_pkgm/v1/subscriptions" + modulepar charstring PX_MEO_PKGM_SUBS := "app_pkgm/v1/subscriptions" - modulepar charstring PX_MEPM_PKGM_URI := "/app_pkgm/v1/app_packages" + modulepar charstring PX_MEPM_PKGM_URI := "app_pkgm/v1/app_packages" - modulepar charstring PX_MEPM_PKGM_SUBS := "/app_pkgm/v1/subscriptions" + modulepar charstring PX_MEPM_PKGM_SUBS := "app_pkgm/v1/subscriptions" - modulepar charstring PX_APP_LCM_URI := "/app_lcm/v1/app_instances" + modulepar charstring PX_APP_LCM_URI := "app_lcm/v1/app_instances" - modulepar charstring PX_MEX_LCM_SUBS := "/app_lcm/v1/subscriptions"; + modulepar charstring PX_MEX_LCM_SUBS := "app_lcm/v1/subscriptions"; - modulepar charstring PX_MEX_LCM_OP_OCC_URI := "/app_lcm/v1/app_lcm_op_occs"; + modulepar charstring PX_MEX_LCM_OP_OCC_URI := "app_lcm/v1/app_lcm_op_occs"; modulepar charstring PX_UE_APP_CTX_URI := "/mx2/v1/app_contexts"; modulepar charstring PX_UE_APPS_URI := "/mx2/v1/app_list"; - modulepar charstring PX_MEC_SVC_MGMT_APPS_URI := "/mec_service_mgmt/v1/applications"; + modulepar charstring PX_MEC_SVC_MGMT_APPS_URI := "mec_app_support/v2/registrations"; - modulepar charstring PX_ME_APP_SUPPORT_TIMING_CURRENT_URI := "/timing/current_time"; + modulepar charstring PX_ME_APP_SUPPORT_TIMING_CURRENT_URI := "mec_app_support/v2/timing/current_time"; - modulepar charstring PX_ME_APP_SUPPORT_URI := "/applications"; + modulepar charstring PX_ME_APP_SUPPORT_URI := "mec_app_support/v2/applications"; - modulepar charstring PX_MEC_SVC_MGMT_SVC_URI := "/mec_service_mgmt/v1/services"; + modulepar charstring PX_ME_APP_REG_APPS_URI := "mec_app_support/v2/applications"; - modulepar charstring PX_ME_APP_SUPPORT_TIMING_CAPS_URI := "/timing/timing_caps"; + modulepar charstring PX_MEC_SVC_MGMT_SVC_URI := "mec_service_mgmt/v1/services"; + + modulepar charstring PX_ME_APP_SUPPORT_TIMING_CAPS_URI := "mec_app_support/v2/timing/timing_caps"; modulepar charstring PX_FAI_FA_INFO_URI := "/fai/v1/fa_info"; @@ -86,18 +88,18 @@ module LibMec_Pixits { modulepar charstring PX_UE_ZONAL_TRAF_SUB_URI := "/fai/v1/optical_network_info"; - modulepar charstring PX_FED_API_LIST_SYSTEM_INFO := "/fed_enablement/v1/fed_resources/system_info"; + modulepar charstring PX_FED_API_LIST_SYSTEM_INFO := "fed_enablement/v1/fed_resources/system_info"; - modulepar charstring PX_FED_API_SUB := "/fed_enablement/v1/fed_resources/system_info"; + modulepar charstring PX_FED_API_SUB := "fed_enablement/v1/fed_resources/system_info"; - modulepar charstring PX_FED_API_SUB_WRONG := "/fed_enablement/v10/fed_resources/system_info"; // v10 instead of v1 + modulepar charstring PX_FED_API_SUB_WRONG := "fed_enablement/v10/fed_resources/system_info"; // v10 instead of v1 - modulepar charstring PX_IOT_API_LIST_DEVICE_INFO := "/iots/v1/registered_devices"; + modulepar charstring PX_IOT_API_LIST_DEVICE_INFO := "iots/v1/registered_devices"; - modulepar charstring PX_IOT_API_SUB := "/iots/v1/registered_devices"; + modulepar charstring PX_IOT_API_SUB := "iots/v1/registered_devices"; - modulepar charstring PX_IOT_API_LIST_PLTF_INFO := "/iots/v1/registered_iot_platforms"; + modulepar charstring PX_IOT_API_LIST_PLTF_INFO := "iots/v1/registered_iot_platforms"; - modulepar charstring PX_IOT_API_LIST_PLTF_SUB := "/iots/v1/registered_iot_platforms"; + modulepar charstring PX_IOT_API_LIST_PLTF_SUB := "iots/v1/registered_iot_platforms"; } // End of module LibMec_Pixits diff --git a/ttcn/LibMec/ttcn/LibMec_Templates.ttcn b/ttcn/LibMec/ttcn/LibMec_Templates.ttcn index d5f8e82..fafc89d 100644 --- a/ttcn/LibMec/ttcn/LibMec_Templates.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Templates.ttcn @@ -37,4 +37,20 @@ module LibMec_Templates { instance := p_instance } // End of template mw_problem_details + template (value) TimeStamp m_time_stamp( + in Seconds p_seconds, + in NanoSeconds p_nanoSeconds := 0 + ) := { + seconds := p_seconds, + nanoSeconds := p_nanoSeconds + } // End of template m_time_stamp + + template (present) TimeStamp mw_time_stamp( + template (present) Seconds p_seconds := ?, + template (present) NanoSeconds p_nanoSeconds := ? + ) := { + seconds := p_seconds, + nanoSeconds := p_nanoSeconds + } // End of template mw_time_stamp + } // End of module LibMec_Templates diff --git a/ttcn/LibMec/ttcn/LibMec_TypesAndValues.ttcn b/ttcn/LibMec/ttcn/LibMec_TypesAndValues.ttcn index 829f2eb..b960094 100644 --- a/ttcn/LibMec/ttcn/LibMec_TypesAndValues.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_TypesAndValues.ttcn @@ -6,6 +6,26 @@ module LibMec_TypesAndValues { // LibCommon import from LibCommon_BasicTypesAndValues all; + /** + * @desc Time stamp description + * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + */ + type record TimeStamp { + Seconds seconds, + NanoSeconds nanoSeconds + } + + /** + * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + */ + type Json.UInteger Seconds; + + /** + * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + */ + type Json.UInteger NanoSeconds; + /** * @desc Problem Details for HTTP APIs * @member type_ A URI reference according to IETF RFC 3986 that identifies the problem type diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index 4f117db..7cef8ba 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -72,6 +72,7 @@ module LibHttp_JsonMessageBodyTypes { MtsSessionInfo mtsSessionInfo, MtsSessionInfos mtsSessionInfos, EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfoList transportInfoList, + EdgePlatformApplicationEnablementAPI_TypesAndValues.AppInfo appInfo_regapps, TrafficRuleList trafficRuleList, TrafficRule trafficRule, /*AppMobilityServiceInfo appMobilityServiceInfo,*/ diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn index 62da712..fdb1e45 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -970,6 +970,18 @@ module LibHttp_JsonTemplates { trafficRuleList := p_trafficRuleList } // End of template mw_body_json_traffic_rule_list + template (value) JsonBody m_body_json_app_info_regapps( + in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.AppInfo p_appInfo_regapps + ) := { + appInfo_regapps := p_appInfo_regapps + } // End of template m_body_json_app_info_regapps + + template (present) JsonBody mw_body_json_app_info_regapps( + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.AppInfo p_appInfo_regapps := ? + ) := { + appInfo_regapps := p_appInfo_regapps + } // End of template mw_body_json_app_info_regapps + } // End of group app_enablement_api group ue_app_ctx { -- GitLab From f582f187aa93320f49bbddfd6bcf4338f8ecb314 Mon Sep 17 00:00:00 2001 From: garciay Date: Tue, 28 Nov 2023 09:09:14 +0100 Subject: [PATCH 40/58] review MEC 012 --- .../AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn | 83 +++++++++++++------ .../AtsMec_RnisAPI_TestControl.ttcn | 18 ++++ .../ttcn/LibHttp_JsonMessageBodyTypes.ttcn | 1 + .../ttcn/LibHttp_JsonTemplates.ttcn | 12 +++ 4 files changed, 89 insertions(+), 25 deletions(-) diff --git a/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn b/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn index 9dc2638..1e79a3c 100644 --- a/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn +++ b/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn @@ -65,8 +65,7 @@ module AtsMec_RnisAPI_TestCases { group rnis_notifications { /** - * @desc Check that the RNIS service sends an RNIS notification about cell change if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 + * @desc Check that the RNIS service sends an RNIS notification about cell change if the RNIS service has an associated subscription and the event is generated */ testcase TC_MEC_MEC012_SRV_RNIS_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -166,7 +165,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about RAB establishment if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -227,7 +225,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about RAB modification if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -289,7 +286,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about RAB release if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -351,7 +347,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about UE measurement report if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_005_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -411,7 +406,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about UE timing advance if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_006_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -471,7 +465,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about UE carrier aggregation reconfiguration if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_007_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -531,7 +524,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about S1-U bearer if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_008_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -589,7 +581,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about 5G NR UE measurement report if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_009_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -645,6 +636,59 @@ module AtsMec_RnisAPI_TestCases { f_cf_01_http_notif_down(); } // End of testcase TC_MEC_MEC012_SRV_RNIS_009_OK + /** + * @desc Check that the RNIS service sends an RNIS notification on subscription expiration if the RNIS service has an associated subscription and the event is generated + */ + testcase TC_MEC_MEC012_SRV_RNIS_010_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_RNIS) or not(PICS_RNIS_NOTIFICATIONS)) { + log("*** " & testcasename() & ": PICS_RNIS and PICS_RNIS_NOTIFICATIONS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + action("Wait for subscription expiration"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PX_CALLBACK_URI, + -, + mw_http_message_body_json( + mw_body_json_expiry_notification_rnis + )))) { + tc_wait.stop; + + // Send 204 No Content + httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully sends RAB release notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_wait.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC012_SRV_RNIS_010_OK + } // End of group rnis_notifications group all_subscriptions { @@ -660,8 +704,7 @@ module AtsMec_RnisAPI_TestCases { * - MeasTaSubscription * - CaReconfSubscription * - S1BearerSubscription - * - NrMeasRepUeSubscription" - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 + * - NrMeasRepUeSubscription */ testcase TC_MEC_MEC012_SRV_RNIS_011_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -729,8 +772,7 @@ module AtsMec_RnisAPI_TestCases { * - MeasTaSubscription * - CaReconfSubscription * - S1BearerSubscription - * - NrMeasRepUeSubscription" - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 + * - NrMeasRepUeSubscription */ testcase TC_MEC_MEC012_SRV_RNIS_012_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -812,7 +854,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service responds with an error when it receives a request to get all RNIS subscriptions with a wrong subscription type - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BO_BI.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_011_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -870,7 +911,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service responds with an error when it receives a request to create a new RNIS subscription with a wrong format - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_012_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -952,8 +992,7 @@ module AtsMec_RnisAPI_TestCases { * - MeasTaSubscription * - CaReconfSubscription * - S1BearerSubscription - * - NrMeasRepUeSubscription" - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 + * - NrMeasRepUeSubscription */ testcase TC_MEC_MEC012_SRV_RNIS_013_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1076,8 +1115,7 @@ module AtsMec_RnisAPI_TestCases { * - MeasTaSubscription * - CaReconfSubscription * - S1BearerSubscription - * - NrMeasRepUeSubscription" - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 + * - NrMeasRepUeSubscription */ testcase TC_MEC_MEC012_SRV_RNIS_014_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1210,7 +1248,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service deletes a RNIS subscription when requested - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_015_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1307,7 +1344,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service responds with error when a not existing RNIS subscription is requested - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BO_BI.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_013_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1361,7 +1397,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service responds with error when a modification for a not existing RNIS subscription is requested - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BO_BI.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_014_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1477,7 +1512,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service responds with error when a modification for a not existing RNIS subscription is requested - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BO_BI.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_014_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1548,7 +1582,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service responds with error when the deletion of a not existing RNIS subscription is requested - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BO_BI.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_015_NF() runs on HttpComponent system HttpTestAdapter { // Local variables diff --git a/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestControl.ttcn b/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestControl.ttcn index 20cc6fb..02c7634 100644 --- a/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestControl.ttcn +++ b/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestControl.ttcn @@ -17,13 +17,31 @@ module AtsMec_RnisAPI_TestControl { execute(TC_MEC_MEC012_SRV_RNIS_002_OK()); execute(TC_MEC_MEC012_SRV_RNIS_003_OK()); execute(TC_MEC_MEC012_SRV_RNIS_004_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_005_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_006_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_006_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_007_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_007_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_010_OK()); } + if (PICS_RNIS_ALL_SUBSCRIPTIONS) { execute(TC_MEC_MEC012_SRV_RNIS_011_OK()); execute(TC_MEC_MEC012_SRV_RNIS_012_OK()); execute(TC_MEC_MEC012_SRV_RNIS_011_BR()); execute(TC_MEC_MEC012_SRV_RNIS_012_BR()); } + + if (PICS_RNIS_SPECIFIC_SUBSCRIPTION) { + execute(TC_MEC_MEC012_SRV_RNIS_013_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_013_NF()); + execute(TC_MEC_MEC012_SRV_RNIS_014_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_014_BR()); + execute(TC_MEC_MEC012_SRV_RNIS_014_NF()); + execute(TC_MEC_MEC012_SRV_RNIS_015_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_015_NF()); + } + if (PICS_RNIS_QUERY) { execute(TC_MEC_MEC012_SRV_RNIS_016_OK()); execute(TC_MEC_MEC012_SRV_RNIS_016_BR()); diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index 7cef8ba..f72b195 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -64,6 +64,7 @@ module LibHttp_JsonMessageBodyTypes { MeasTaSubscription measTaSubscription, CaReConfSubscription caReConfSubscription, S1BearerSubscription s1BearerSubscription, + RnisAPI_TypesAndValues.ExpiryNotification expiryNotification_rnis, L2Meas l2Meas, BwInfoList bwInfoList, BwInfo bwInfo, diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn index fdb1e45..e27ee69 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -718,6 +718,18 @@ module LibHttp_JsonTemplates { l2Meas := p_l2Meas } // End of template mw_body_json_l2_meas_subscription + template (value) JsonBody m_body_json_expiry_notification_rnis( + in template (value) RnisAPI_TypesAndValues.ExpiryNotification p_expiryNotification + ) := { + expiryNotification_rnis := p_expiryNotification + } // End of template m_body_json_expiry_notification_rnis + + template (present) JsonBody mw_body_json_expiry_notification_rnis( + template (present) RnisAPI_TypesAndValues.ExpiryNotification p_expiryNotification := ? + ) := { + expiryNotification_rnis := p_expiryNotification + } // End of template mw_body_json_expiry_notification_rnis + } // End of group rnis_subscriptions group rnis_notifications { -- GitLab From f6052a81b4b2d43b5317b9a1e71f4fd82d984042 Mon Sep 17 00:00:00 2001 From: garciay Date: Tue, 19 Dec 2023 16:13:48 +0100 Subject: [PATCH 41/58] TTF T027: TTCN-3 ATS MEC 013 review - TPs bugs fixed --- titan-test-system-framework | 2 +- .../AtsMec_LocationAPI_TestCases.ttcn | 4270 +++++++++++++---- .../AtsMec_LocationAPI_TestControl.ttcn | 96 +- .../ttcn/LocationAPI_Functions.ttcn | 252 +- .../LocationAPI/ttcn/LocationAPI_Pixits.ttcn | 14 + .../ttcn/LocationAPI_Templates.ttcn | 278 ++ .../ttcn/LocationAPI_TypesAndValues.ttcn | 210 +- .../ttcn/LibHttp_JsonMessageBodyTypes.ttcn | 8 + .../ttcn/LibHttp_JsonTemplates.ttcn | 96 + 9 files changed, 4093 insertions(+), 1133 deletions(-) diff --git a/titan-test-system-framework b/titan-test-system-framework index 524df4e..6901c1c 160000 --- a/titan-test-system-framework +++ b/titan-test-system-framework @@ -1 +1 @@ -Subproject commit 524df4ef9a2fed2c32c1d9166ebebdb51fa666ba +Subproject commit 6901c1c381950f308d2b1643e90757248ae99eab diff --git a/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn index 20105f0..46d16cc 100644 --- a/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn +++ b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn @@ -7,7 +7,7 @@ * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. - * @see ETSI GS MEC 003, Draft ETSI GS MEC 013 V2.0.3 (2018-10) + * @see ETSI GS MEC 003, Draft ETSI GS MEC 013 V3.1.1 (2018-10) */ module AtsMec_LocationAPI_TestCases { @@ -30,42 +30,42 @@ module AtsMec_LocationAPI_TestCases { // LibMec import from LibMec_Functions all; + import from LibMec_Templates all; import from LibMec_Pics all; import from LibMec_Pixits all; - group ueLocationLookup { - + group radioNodeLocationLookup { + /** - * @desc Check that the IUT responds with a list for the location of User Equipments when queried by a MEC Application + * @desc Check that the IUT responds with the list of radio nodes currently associated with the MEC host and the location of each radio node when queried by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_RLOCLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - + var HttpMessage v_response; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, + PICS_ROOT_API & PX_ME_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")) & "/accessPoints", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -73,20 +73,13 @@ module AtsMec_LocationAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_user_list( - mw_user_list( - ?/*{mw_user_info( - PX_USER, - PX_ACCESS_POINT_ID, - PX_ZONE_ID, - -, - PX_RESOURCE_URL - )}*/, - ? - )))))) { + mw_body_json_access_point_list( + mw_access_point_list( + PX_ZONE_ID + )))))) -> value v_response { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ZoneId ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an AccessPoint list containing a ZoneId ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -94,54 +87,106 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_OK - + } // End of testcase TC_MEC_MEC013_SRV_RLOCLOOK_001_OK + /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELOC/PlatUeLocationLookup.tplan2 - * @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo + * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_RLOCLOOK_001_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_ZONE_ID, "UTF-8")) & "/accessPoints", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found() + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_RLOCLOOK_001_NF + + /** + * @desc Check that the IUT responds with the radio nodes when queried by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_RLOCLOOK_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - + var HttpMessage v_response; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?areaId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")), // areaId instead of zoneId + PICS_ROOT_API & PX_ME_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")) & "/accessPoints/" & oct2char(unichar2oct(PX_ACCESS_POINT_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request - )) { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_access_point_info( + mw_access_point_info( + PX_ACCESS_POINT_ID + )))))) -> value v_response { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an AccessPointInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -149,54 +194,120 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_BR - + } // End of testcase TC_MEC_MEC013_SRV_RLOCLOOK_002_OK + /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELOC/PlatUeLocationLookup.tplan2 - * @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo + * @desc Check that the IUT responds with an error when the radio nodes does not exist + */ + testcase TC_MEC_MEC013_SRV_RLOCLOOK_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_ZONE_ID, "UTF-8")) & "/accessPoints/" & oct2char(unichar2oct(PX_NON_EXISTENT_ZONE_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found() + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_RLOCLOOK_002_NF + + } // End of group radioNodeLocationLookup + + group ueAreaLookup { + + /** + * @desc Check that the IUT responds with a list of UE area subscriptions when queried by a MEC Application - No filter */ - testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEAREALOOK_001_OK_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - + var UserAreaNotification v_user_area_notification; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble + f_create_user_area_subscription(v_user_area_notification, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_NON_EXISTENT_ZONE_ID, "UTF-8")), + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found - )) { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + -, + { + *, + mw_subscription( + "UserAreaSubscription", + v_user_area_notification.links_.self_.href + ), + * + } + )))))) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of UserAreaSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -204,68 +315,67 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_user_area_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_NF - - } // End of group ueLocationLookup - - group ueLocSub { - + } // End of testcase TC_MEC_MEC013_SRV_UEAREALOOK_001_OK_01 + /** - * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications user location event + * @desc Check that the IUT responds with a list of UE area subscriptions when queried by a MEC Application - Event filter */ - testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEAREALOOK_001_OK_02() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; - + var UserAreaNotification v_user_area_notification; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble + f_create_user_area_subscription(v_user_area_notification, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, - v_headers, - m_http_message_body_json( - m_body_json_user_location_event_subscription( - m_user_location_event_subscription( - PX_CALLBACK_REF_URL, - PX_USER, - PX_CLIENT_ID - )))))); + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "?event", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_user_location_event_subscription( - mw_user_location_event_subscription( - PX_CALLBACK_REF_URL, - PX_USER, - -, - PX_CLIENT_ID - )))))) -> value v_response { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + -, + { + *, + mw_subscription( + "UserAreaSubscription", + v_user_area_notification.links_.self_.href + ), + * + } + )))))) -> value v_response { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a callbackURL ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of UserAreaSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -273,56 +383,54 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble - f_delete_user_location_event_subscription(v_response.response.body.json_body.userLocationEventSubscription); + f_delete_user_area_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01 - + } // End of testcase TC_MEC_MEC013_SRV_UEAREALOOK_001_OK_02 + /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid filter */ - testcase TC_MEC_MEC013_SRV_UELOCSUB_001_BR_01() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEAREALOOK_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - + var UserAreaNotification v_user_area_notification; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble + f_create_user_area_subscription(v_user_area_notification, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, - v_headers, - m_http_message_body_json( - m_body_json_user_location_event_subscription( - m_user_location_event_subscription_error( - PX_USER, - PX_CLIENT_ID - )))))); + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "?filter(dummy, "")", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -330,21 +438,1761 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_user_area_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_BR_01 - + } // End of testcase TC_MEC_MEC013_SRV_UEAREALOOK_001_BR + /** - * @desc Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UELOCSUB/PlatUeLocationSubscription.tplan2 + * @desc Check that the IUT acknowledges the change of UE area subscription request when commanded by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UELOCSUB_002_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEAREALOOK_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables - var UserLocationEventSubscription v_userLocationEventSubscription; var Headers v_headers; - var charstring v_uri; - + var UserAreaNotification v_user_area_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_area_subscription(v_user_area_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_user_area_notification( + v_user_area_notification + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct UserAreaNotification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_area_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREALOOK_002_OK + + /** + * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEAREALOOK_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREALOOK_002_NF + + } // End of group ueAreaLookup + + group ueAreaSubscribe { + + /** + * @desc Check that the IUT acknowledges the creation of UE area subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEAREASUB_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_area_subscription( + m_user_area_subscription( + PX_AREA_SUB_CALLBACK_URI, // callbackReference + PX_USER, + m_area_info( + ELLIPSOID_POINT_UNCERT_CIRCLE, + { + m_point({PX_UE_COORD_LAT}, {PX_UE_COORD_LONG}) + }, + PX_RADIUS + ), + PX_TRACKIMNG_ACCURACY, + PX_CLIENT_ID //clientCorrelator + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_user_area_notification( + mw_user_area_notification // FIXME To be refined + ))))) -> value v_response { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userAreaNotification, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_area_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_001_OK_01 + + /** + * @desc Check that the IUT acknowledges the creation of UE area subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEAREASUB_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var UserAreaNotification v_user_area_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_create_user_area_subscription(v_user_area_notification, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_user_area_notification( + mw_user_area_notification // FIXME To be refined + ))))) { + tc_ac.stop; + + // Send response + var Headers v_headers; + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userAreaNotification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_area_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_001_OK_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided + */ + testcase TC_MEC_MEC013_SRV_UEAREASUB_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_area_subscription( + m_user_area_subscription( + "", // callbackReference + PX_USER, + m_area_info( + ELLIPSOID_POINT_UNCERT_CIRCLE, + { + m_point({PX_UE_COORD_LAT}, {PX_UE_COORD_LONG}) + } + // No radius + ), + PX_TRACKIMNG_ACCURACY, + PX_CLIENT_ID //clientCorrelator + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_001_BR + + /** + * @desc Check that the IUT acknowledges the change of UE area subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEAREASUB_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserAreaNotification v_user_area_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_area_subscription(v_user_area_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_user_area_subscription( + m_user_area_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, // callbackReference + PX_USER, + m_area_info( + ELLIPSOID_POINT_UNCERT_CIRCLE, + { m_point({PX_UE_COORD_LAT}, {PX_UE_COORD_LONG}) }, + PX_RADIUS + ), // AreaInfo + PX_TRACKIMNG_ACCURACY // TrackingAccuracy + + + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_user_area_subscription( + mw_user_area_subscription(PX_UE_NEW_SUB_CALLBACK_URI + )))))) { + + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with updated subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_002_OK + + /** + * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEAREASUB_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers, + m_http_message_body_json( + m_body_json_user_area_subscription( + m_user_area_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, // callbackReference + PX_USER, + m_area_info( + ELLIPSOID_POINT_UNCERT_CIRCLE, + { m_point({PX_UE_COORD_LAT}, {PX_UE_COORD_LONG}) }, + PX_RADIUS + ), // AreaInfo + PX_TRACKIMNG_ACCURACY // TrackingAccuracy + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_002_NF + + /** + * @desc Check that the IUT acknowledges the cancellation of UE area change notifications when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEAREASUB_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserAreaNotification v_user_area_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_area_subscription(v_user_area_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with no content ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_003_OK + + /** + * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEAREASUB_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_003_NF + + } // End of group ueAreaSubscribe + + group ueDistanceLookup { + + /** + * @desc Check that the IUT responds with the list of UE distance subscriptions to a UE when queried by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEDISTLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserDistanceNotification v_user_distance_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_distance_subscription(v_user_distance_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI, + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + -, + { + *, + mw_subscription( + "UserDistanceSubscription", + v_user_distance_notification.links_.self_.href + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 200 OK ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_distance_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTLOOK_001_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid filter + */ + testcase TC_MEC_MEC013_SRV_UEDISTLOOK_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI & "?event", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 200 OK ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTLOOK_001_BR + + /** + * @desc Check that the IUT responds with the distance to a UE when queried by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEDISTLOOK_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserDistanceNotification v_user_distance_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_distance_subscription(v_user_distance_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI & v_subscription_id, + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json(mw_body_json_user_distance_notification( + v_user_distance_notification + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct UserDistanceNotification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_distance_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTLOOK_002_OK + + /** + * @desc Check that the IUT responds with an error when inconsistent request was sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEDISTLOOK_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserDistanceNotification v_user_distance_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_distance_subscription(v_user_distance_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_distance_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTLOOK_002_NF + + } // End of group ueDistanceLookup + + group ueDistanceSubscribe { + + /** + * @desc Check that the IUT acknowledges the UE distance subscription request when commanded by a MEC Application and notifies it when (all) the requested UE(s) is (are) within the specified distance + */ + testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_distance_subscription( + m_user_distance_subscription( + PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference + PX_USER, + { PX_UE_MONITORED_IP_ADDRESS }, // monitoredAddress + PX_DISTANCE, + PX_TRACKIMNG_ACCURACY, + AllWithinDistance, + -, // checkImmediate + PX_CLIENT_ID //clientCorrelator + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_user_distance_subscription( + mw_user_distance_subscription( + PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference + -, + PX_USER, + { PX_UE_MONITORED_IP_ADDRESS }, // monitoredAddressPX_CLIENT_ID, //clientCorrelator + PX_DISTANCE, + PX_TRACKIMNG_ACCURACY, + AllWithinDistance, + -, // checkImmediate + PX_CLIENT_ID //clientCorrelator + )))))) -> value v_response { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Distance subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_LOC_API_DISTANCE_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userDistanceSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_distance_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_OK_01 + + /** + * @desc Check that the IUT acknowledges the UE distance subscription request when commanded by a MEC Application and notifies it when (all) the requested UE(s) is (are) within the specified distance + */ + testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var UserDistanceNotification v_user_distance_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_create_user_distance_subscription(v_user_distance_notification, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_user_distance_notification( + v_user_distance_notification + ))))) { + tc_ac.stop; + + // Send response + var Headers v_headers; + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userDistanceNotification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_distance_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_OK_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided + */ + testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_distance_subscription( + m_user_distance_subscription( + "", // callbackReference + PX_USER, + { }, // monitoredAddress is empty + PX_DISTANCE, + PX_TRACKIMNG_ACCURACY, + AllWithinDistance, + -, // checkImmediate + PX_CLIENT_ID //clientCorrelator + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_BR + + /** + * @desc Check that the IUT acknowledges the cancellation of UE distance notifications when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEDISTSUB_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserDistanceNotification v_user_distance_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_distance_subscription(v_user_distance_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with no content ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_002_OK + + /** + * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEDISTSUB_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found() + )) { + + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_002_NF + + } // End of group ueDistanceSubscribe + + group ueInfLook { + + /** + * @desc Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - No Filter + */ + testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLATand PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_user_list( + mw_user_list(-, ?) + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UserList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_01 + + /** + * @desc Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - Filter with one address + */ + testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLATand PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?address=" & PX_IP_ADDRESS, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_user_list( + mw_user_list( + { + *, + mw_user_info(PX_IP_ADDRESS), + * + }, + ?) + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UserList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_02 + + /** + * @desc Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - Filter with several addresses + */ + testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLATand PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?address=[" & PX_IP_ADDRESS & "," & PX_IP_ADDRESS_1 & "]", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_user_list( + mw_user_list( // FIXME Use superset? + { + *, + mw_user_info(PX_IP_ADDRESS), + mw_user_info(PX_IP_ADDRESS_1), + * + }, + ?) + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UserList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_03 + + /** + * @desc Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - Filter with several zoneIds + */ + testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLATand PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=[" & PX_ZONE_ID & "," & PX_ZONE_ID_1 & "]", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_user_list( + mw_user_list( // FIXME Use superset? + { + *, + mw_user_info(-, -, PX_ZONE_ID), + mw_user_info(-, -, PX_ZONE_ID_1), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UserList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_04 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?addr=" & PX_IP_ADDRESS, // Wrong name should trigger an error response. + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_BR + + /** + * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?address=" & PX_ACR_UNKNOWN_IP, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_001_NF + + } // End of group ueInfLook + + group ueLocationLookup { + + /** + * @desc Check that the IUT responds with a list for the location of User Equipments when queried by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list // FIXME + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of notification subscriptions ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_OK + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - UE location Event + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventNotification v_user_location_event_notification; + var charstring v_user_location_event_subscription_id; + var UserLocationPeriodicNotification v_user_location_periodic_notification; + var charstring v_user_location_periodic_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_notification, v_user_location_event_subscription_id); + f_create_user_location_periodic_subscription(v_user_location_periodic_notification, v_user_location_periodic_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "?event", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + -, // FIXME + { + *, + mw_subscription( + v_user_location_event_notification.notificationType, + v_user_location_event_notification.links_.self_.href + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of notification subscriptions ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_event_subscription(v_user_location_event_subscription_id); + f_delete_user_location_periodic_subscription(v_user_location_periodic_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_01 + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - UE location Periodic + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventNotification v_user_location_event_notification; + var charstring v_user_location_event_subscription_id; + var UserLocationPeriodicNotification v_user_location_periodic_notification; + var charstring v_user_location_periodic_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_notification, v_user_location_event_subscription_id); + f_create_user_location_periodic_subscription(v_user_location_periodic_notification, v_user_location_periodic_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "?periodic", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + -, // FIXME + { + *, + mw_subscription( + v_user_location_periodic_notification.notificationType, + v_user_location_periodic_notification.links_.self_.href + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of notification subscriptions ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_event_subscription(v_user_location_event_subscription_id); + f_delete_user_location_periodic_subscription(v_user_location_periodic_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_02 + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - UE location Event and address + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventNotification v_user_location_event_notification_1; + var charstring v_user_location_event_subscription_id_1; + var UserLocationEventNotification v_user_location_event_notification_2; + var charstring v_user_location_event_subscription_id_2; + var UserLocationPeriodicNotification v_user_location_periodic_notification; + var charstring v_user_location_periodic_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_notification_1, v_user_location_event_subscription_id_1); + f_create_user_location_event_subscription(v_user_location_event_notification_2, v_user_location_event_subscription_id_2, PX_USER_2); + f_create_user_location_periodic_subscription(v_user_location_periodic_notification, v_user_location_periodic_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "?event&adress=" & PX_USER_2, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + -, // FIXME + { + *, + mw_subscription( + v_user_location_periodic_notification.notificationType, + v_user_location_periodic_notification.links_.self_.href + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of notification subscriptions ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_event_subscription(v_user_location_event_subscription_id_1); + f_delete_user_location_event_subscription(v_user_location_event_subscription_id_2); + f_delete_user_location_periodic_subscription(v_user_location_periodic_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_03 + + /** + * @desc Check that the IUT responds with an error when inconsistent request was sent by a MEC Application - Invalid filter + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventNotification v_user_location_event_notification; + var charstring v_user_location_event_subscription_id; + var UserLocationPeriodicNotification v_user_location_periodic_notification; + var charstring v_user_location_periodic_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); @@ -358,34 +2206,350 @@ module AtsMec_LocationAPI_TestCases { // Test adapter configuration // Preamble - f_create_user_location_event_subscription(v_userLocationEventSubscription); - v_uri :=regexp( - oct2char(unichar2oct(v_userLocationEventSubscription.links_.self_.href)), - "?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)", - 0 - ); + f_create_user_location_event_subscription(v_user_location_event_notification, v_user_location_event_subscription_id); + f_create_user_location_periodic_subscription(v_user_location_periodic_notification, v_user_location_periodic_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "?dummy", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_event_subscription(v_user_location_event_subscription_id); + f_delete_user_location_periodic_subscription(v_user_location_periodic_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_BR + + /** + * @desc Check that the IUT responds with an error when inconsistent request was sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventNotification v_user_location_event_notification; + var charstring v_user_location_event_subscription_id; + var UserLocationPeriodicNotification v_user_location_periodic_notification; + var charstring v_user_location_periodic_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_notification, v_user_location_event_subscription_id); + f_create_user_location_periodic_subscription(v_user_location_periodic_notification, v_user_location_periodic_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_uri, - v_headers - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "?event&adress=" & PX_USER_2, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_204_no_content - )) { + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_event_subscription(v_user_location_event_subscription_id); + f_delete_user_location_periodic_subscription(v_user_location_periodic_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_NF + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - UE location Event + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventNotification v_user_location_event_notification; + var charstring v_user_location_event_subscription_id; + var UserLocationPeriodicNotification v_user_location_periodic_notification; + var charstring v_user_location_periodic_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_notification, v_user_location_event_subscription_id); + f_create_user_location_periodic_subscription(v_user_location_periodic_notification, v_user_location_periodic_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_user_location_event_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_user_location_event_subscription( + mw_user_location_event_subscription( + v_user_location_event_notification.links_.self_.href + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct userLocationEventSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_event_subscription(v_user_location_event_subscription_id); + f_delete_user_location_periodic_subscription(v_user_location_periodic_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_01 + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - UE location Periodoc + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventNotification v_user_location_event_notification; + var charstring v_user_location_event_subscription_id; + var UserLocationPeriodicNotification v_user_location_periodic_notification; + var charstring v_user_location_periodic_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_notification, v_user_location_event_subscription_id); + f_create_user_location_periodic_subscription(v_user_location_periodic_notification, v_user_location_periodic_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_user_location_periodic_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_user_location_periodic_subscription( + mw_user_location_periodic_subscription( + v_user_location_periodic_notification.links_.self_.href + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct userLocationEventSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_event_subscription(v_user_location_event_subscription_id); + f_delete_user_location_periodic_subscription(v_user_location_periodic_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_02 + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - UE location Event + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct userLocationEventSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_003_NF + + } // End of group ueLocationLookup + + group ueLocSub { + + /** + * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications user location event + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + PX_CLIENT_ID + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_user_location_event_subscription( + mw_user_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + -, + PX_CLIENT_ID + )))))) -> value v_response { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 No Content ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Distance subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userLocationEventSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); @@ -394,16 +2558,76 @@ module AtsMec_LocationAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_user_location_event_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_002_OK + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01_01 /** - * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UELOCSUB/PlatUeLocationSubscription.tplan2 + * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications user location event */ - testcase TC_MEC_MEC013_SRV_UELOCSUB_002_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var UserLocationEventNotification v_user_location_event_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_notification, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, -, + mw_http_message_body_json( + mw_body_json_user_location_event_notification( + mw_user_location_event_notification( + -, -, + v_user_location_event_notification.links_ + )))))) { + tc_ac.stop; + + // Send response + var Headers v_headers; + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userLocationEventNotification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_event_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01_02 + + /** + * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications user location periodic + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { @@ -421,12 +2645,16 @@ module AtsMec_LocationAPI_TestCases { f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), - v_headers - ) - ) - ); + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_location_periodic_subscription( + m_user_location_periodic_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + PX_CLIENT_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -434,12 +2662,33 @@ module AtsMec_LocationAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found - )) { + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_user_location_periodic_subscription( + mw_user_location_periodic_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + -, + PX_CLIENT_ID + )))))) -> value v_response { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Distance subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userLocationPeriodicSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); @@ -448,20 +2697,74 @@ module AtsMec_LocationAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_user_location_periodic_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_002_NF - - } // End of group ueLocSub - - group ueLocPeriodicSub { + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02_01 /** * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications user location periodic */ - testcase TP_MEC_MEC013_SRV_UELOCSUB_001_OK_02() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var UserLocationPeriodicNotification v_user_location_periodic_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_periodic_subscription(v_user_location_periodic_notification, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, -, + mw_http_message_body_json( + mw_body_json_user_location_periodic_notification( + mw_user_location_periodic_notification( + -, -, + v_user_location_periodic_notification.links_ + )))))) { + tc_ac.stop; + + // Send response + var Headers v_headers; + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userLocationPeriodicNotification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_periodic_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_001_BR_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { @@ -483,11 +2786,12 @@ module AtsMec_LocationAPI_TestCases { PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_user_location_periodic_subscription( - m_user_location_periodic_subscription( - PX_CALLBACK_REF_URL, - PX_USER - )))))); + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + "", + PX_USER, + PX_CLIENT_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -495,16 +2799,11 @@ module AtsMec_LocationAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_user_location_periodic_subscription( - mw_user_location_periodic_subscription( - PX_CALLBACK_REF_URL, - PX_USER - )))))) -> value v_response { + mw_http_response_400_bad_request + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a callbackURL ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -514,15 +2813,13 @@ module AtsMec_LocationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_user_location_periodic_subscription(v_response.response.body.json_body.userLocationPeriodicSubscription); f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC013_SRV_UELOCSUB_001_OK_02 + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_BR_01 /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UETRACKSUB/PlatUeTrackingSubscription.tplan2 + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided */ - testcase TC_MEC_MEC013_SRV_UETRACKSUB_001_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UELOCSUB_001_BR_02() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; @@ -543,15 +2840,15 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "_Invalid", + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, v_headers, m_http_message_body_json( m_body_json_user_location_periodic_subscription( m_user_location_periodic_subscription( - PX_CALLBACK_REF_URL, - PX_CLIENT_ID_UNKNOWN, - PX_USER - )))))); + "", + PX_USER, + PX_CLIENT_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -560,7 +2857,7 @@ module AtsMec_LocationAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); @@ -574,17 +2871,16 @@ module AtsMec_LocationAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UETRACKSUB_001_BR + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_BR_02 /** * @desc Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UETRACKSUB/PlatUeTrackingSubscription.tplan2 */ - testcase TC_MEC_MEC013_SRV_UETRACKSUB_002_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UELOCSUB_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var UserLocationPeriodicSubscription v_position_notification_subscription; - var charstring v_uri; + var UserLocationEventNotification v_user_location_event_notification; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { @@ -599,33 +2895,26 @@ module AtsMec_LocationAPI_TestCases { // Test adapter configuration // Preamble - f_create_user_location_periodic_subscription(v_position_notification_subscription); - v_uri := regexp( - oct2char(unichar2oct(v_position_notification_subscription.links_.self_.href)), - "?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)", - 0 - ); + f_create_user_location_event_subscription(v_user_location_event_notification, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_subscription_id, v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body + ))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds 204 No Content ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 No Content ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -636,13 +2925,12 @@ module AtsMec_LocationAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UETRACKSUB_002_OK + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_002_OK /** * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UETRACKSUB/PlatUeTrackingSubscription.tplan2 */ - testcase TC_MEC_MEC013_SRV_UETRACKSUB_002_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UELOCSUB_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; @@ -665,9 +2953,7 @@ module AtsMec_LocationAPI_TestCases { m_http_request_delete( PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -676,203 +2962,98 @@ module AtsMec_LocationAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds 404 Not Found ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with 404 Not Found ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UETRACKSUB_002_NF - - } // End of group ueLocPeriodicSub - - group ueInfLook { - - /** - * @desc Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFLOOK/PlatUeInformationLookup.tplan2 - */ - testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLATand PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_user_list( - mw_user_list(-, ?) - ))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a UserList ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFLOOK/PlatUeInformationLookup.tplan2 - */ - testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "/invalid/" & oct2char(unichar2oct(PX_USER, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_BR + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_002_NF /** - * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFLOOK/PlatUeInformationLookup.tplan2 + * @desc Check that the IUT acknowledges a request to modify an existing subscription by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "/" & oct2char(unichar2oct(PX_USER_UNKNOWN, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + testcase TC_MEC_MEC013_SRV_UELOCSUB_003_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventNotification v_user_location_event_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_001_NF - - } // End of group ueInfLook - - group ueInfSub { + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + PX_USER, + PX_CLIENT_ID + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_user_location_event_subscription( + mw_user_location_event_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + PX_USER, + -, + PX_CLIENT_ID + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates userLocationPeriodicSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_periodic_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_003_OK_01 /** - * @desc Check that the IUT acknowledges the UE information change subscription request when commanded by a MEC Application and notifies it when the location changes - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFSUB/PlatUeInformationSubscription.tplan2 + * @desc Check that the IUT acknowledges a request to modify an existing subscription by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UEINFSUB_001_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UELOCSUB_003_OK_02() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var UserLocationPeriodicNotification v_user_location_periodic_notification; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { @@ -887,19 +3068,20 @@ module AtsMec_LocationAPI_TestCases { // Test adapter configuration // Preamble + f_create_user_location_periodic_subscription(v_user_location_periodic_notification, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI, - v_headers, - m_http_message_body_json( - m_body_json_zone_location_event_subscription( - m_zone_location_event_subscription( - PX_CALLBACK_REF_URL, - PX_CLIENT_ID, - PX_ZONE_ID - )))))); + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_user_location_periodic_subscription( + m_user_location_periodic_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + PX_USER, + PX_CLIENT_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -907,17 +3089,18 @@ module AtsMec_LocationAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_zone_location_event_subscription( - mw_zone_location_event_subscription( - PX_CALLBACK_REF_URL, - PX_CLIENT_ID, - PX_ZONE_ID - )))))) -> value v_response { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_user_location_periodic_subscription( + mw_user_location_periodic_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + PX_USER, + -, + PX_CLIENT_ID + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a callbackURL ***"); + log("*** " & testcasename() & ": PASS: IUT successfully updates userLocationPeriodicSubscription, SubscriptionId: ", v_subscription_id," ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -927,17 +3110,18 @@ module AtsMec_LocationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_zone_location_event_subscription(v_response.response.body.json_body.zoneLocationEventSubscription); + f_delete_user_location_periodic_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEINFSUB_001_OK + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_003_OK_02 /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFSUB/PlatUeInformationSubscription.tplan2 + * @desc Check that the IUT responds with an error when received an inconsistent request */ - testcase TC_MEC_MEC013_SRV_UEINFSUB_001_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UELOCSUB_003_BR_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var UserLocationEventNotification v_user_location_event_notification; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { @@ -952,56 +3136,53 @@ module AtsMec_LocationAPI_TestCases { // Test adapter configuration // Preamble + f_create_user_location_event_subscription(v_user_location_event_notification, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & "/invilad/" & PX_LOC_API_ZONES_SUB_URI, - v_headers, - m_http_message_body_json( - m_body_json_zone_location_event_subscription( - m_zone_location_event_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_ZONE_ID - ) - ) - ) - ) - ) - ); + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + "", + PX_USER, + PX_CLIENT_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { + mw_http_response( + mw_http_response_400_bad_request + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + // Postamble + f_delete_user_location_periodic_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEINFSUB_001_BR + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_003_BR_01 /** - * @desc Check that the IUT acknowledges the cancellation of UE information change notifications when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFSUB/PlatUeInformationSubscription.tplan2 + * @desc Check that the IUT responds with an error when received an inconsistent request */ - testcase TC_MEC_MEC013_SRV_UEINFSUB_002_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UELOCSUB_003_BR_02() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var ZoneLocationEventSubscription v_zone_location_event_subscription; - var charstring v_uri; + var UserLocationPeriodicNotification v_user_location_periodic_notification; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { @@ -1016,19 +3197,20 @@ module AtsMec_LocationAPI_TestCases { // Test adapter configuration // Preamble - f_create_zone_location_event_subscription(v_zone_location_event_subscription); - v_uri := regexp( - oct2char(unichar2oct(v_zone_location_event_subscription.links_.self_.href)), - "?+" & PX_LOC_API_ZONES_SUB_URI & "/(?*)", - 0 - ); + f_create_user_location_periodic_subscription(v_user_location_periodic_notification, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & v_uri, - v_headers - ))); + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_user_location_periodic_subscription( + m_user_location_periodic_subscription( + "", + PX_USER, + PX_CLIENT_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1036,11 +3218,11 @@ module AtsMec_LocationAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_204_no_content - )) { + mw_http_response_400_bad_request + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 No Content ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1050,14 +3232,14 @@ module AtsMec_LocationAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_user_location_periodic_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEINFSUB_002_OK + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_003_BR_02 /** - * @desc Check that the IUT acknowledges the cancellation of UE information change notifications when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFSUB/PlatUeInformationSubscription.tplan2 + * @desc Check that the IUT acknowledges a request to modify a not existing subscription by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UEINFSUB_002_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UELOCSUB_003_NF_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; @@ -1077,24 +3259,28 @@ module AtsMec_LocationAPI_TestCases { f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & oct2char(unichar2oct(PX_USER_UNKNOWN, "UTF-8")), - v_headers - ) - ) - ); + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers, + m_http_message_body_json( + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + PX_USER, + PX_CLIENT_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { + mw_http_response( + mw_http_response_404_not_found + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds 404 Not Found ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1105,63 +3291,53 @@ module AtsMec_LocationAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEINFSUB_002_NF + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_003_NF_01 - } // End of group ueInfSub - - /* - * Radio Node Location Lookup (RLOCLOOK) - */ - - group radioNodeLocationLookup { - /** - * @desc Check that the IUT responds with the list of radio nodes currently associated with the MEC host and the location of each radio node when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/AccessPointList + * @desc Check that the IUT responds with an error when received an inconsistent request */ - testcase TC_MEC_MEC013_SRV_RLOCLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UELOCSUB_003_NF_02() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; - + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")) & "/accessPoints", - v_headers - ) - ) - ); + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers, + m_http_message_body_json( + m_body_json_user_location_periodic_subscription( + m_user_location_periodic_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + PX_USER, + PX_CLIENT_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_access_point_list( - mw_access_point_list( - PX_ZONE_ID - )))))) -> value v_response { + mw_http_response_404_not_found + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with an AccessPoint list containing a ZoneId ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1169,207 +3345,373 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_RLOCLOOK_001_OK + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_003_NF_02 + + } // End of group ueLocSub + + group ueTestNot { /** - * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + * @desc Check that the IUT provides a test notification when requested by a MEC Application */ - testcase TC_MEC_MEC013_SRV_RLOCLOOK_001_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UETESTNOT_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - + var HttpMessage v_response; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; } - + // Test component configuration - f_cf_01_http_up(); - + f_cf_01_http_notif_up(); + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_ZONE_ID, "UTF-8")) & "/accessPoints", - v_headers - ) - ) - ); + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + PX_CLIENT_ID, + true + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_user_location_event_subscription( + mw_user_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + -, + PX_CLIENT_ID, + true + )))))) -> value v_response { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Distance subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": INFO: IUT successfully responds with a userLocationEventSubscription, SubscriptionId: ", v_subscription_id," ***"); + repeat; // Wait for test notification + } + } + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_test_notification( + mw_test_notification( + v_response.response.body.json_body.userLocationEventNotification.links_ + )))))) { + tc_ac.stop; + + // Send response + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userAreaNotification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_user_location_event_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UETESTNOT_001_OK + /** + * @desc Check that the IUT terminates notifications after time expiration + */ + testcase TC_MEC_MEC013_SRV_UETESTNOT_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + var boolean v_notification_received_after_expiry := false; + timer tc_expiry := PX_NOTIF_EXPIRY; + timer tc_expiry_guard := PX_NOTIF_EXPIRY / 2.0; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + PX_CLIENT_ID, + -, -, -, -, + m_time_stamp( + float2int(PX_NOTIF_EXPIRY) + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Test Body tc_ac.start; + tc_expiry.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found() - )) { + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_user_location_event_subscription( + mw_user_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + -, + PX_CLIENT_ID + )))))) -> value v_response { tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Distance subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)", + 0 + ); - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + log("*** " & testcasename() & ": INFO: IUT successfully responds with a userLocationEventSubscription, SubscriptionId: ", v_subscription_id," ***"); + tc_ac.start; + repeat; // Wait for test notification + } + } + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_test_notification( + mw_test_notification( + v_response.response.body.json_body.userLocationEventNotification.links_ + )))))) { + tc_ac.stop; + + // Send response + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); + + log("*** " & testcasename() & ": INFO: Receive new notification ***"); + + v_notification_received_after_expiry := true; + tc_ac.start; + repeat; + } + [] tc_expiry.timeout { + v_notification_received_after_expiry := false; + tc_expiry_guard.start; + repeat; + } + [] tc_expiry_guard.timeout { + if (v_notification_received_after_expiry) { + log("*** " & testcasename() & ": FAIL: Received notification after expiration time ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + log("*** " & testcasename() & ": PASS: No more notification received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_RLOCLOOK_001_NF - - } // End of group radioNodeLocationLookup + f_delete_user_location_event_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UETESTNOT_002_OK + } // End of group ueTestNot + group ueZoneLook { + // TODO + } // End of group ueZoneLook - /* - * UE Area Subscribe (UEAREASUB) - */ - group ueAreaSubscribe { + group ueZoneSub { /** - * @desc Check that the IUT acknowledges the creation of UE area subscription request when commanded by a MEC Application + * @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UEAREASUB_001_OK_01() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; - + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI, - v_headers, - m_http_message_body_json( - m_body_json_user_area_subscription( - m_user_area_subscription( - PX_AREA_SUB_CALLBACK_URI, // callbackReference - PX_USER, - m_area_info( - ELLIPSOID_POINT_UNCERT_CIRCLE, - { - m_point({PX_UE_COORD_LAT}, {PX_UE_COORD_LONG}) - }, - PX_RADIUS - ), - PX_TRACKIMNG_ACCURACY, - PX_CLIENT_ID //clientCorrelator - )))))); + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_zone_location_event_subscription( + m_zone_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_CLIENT_ID, + PX_ZONE_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; - alt { + alt { [] httpPort.receive( mw_http_response( - mw_http_response_201_created( + mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_user_area_subscription( - mw_user_area_subscription( - PX_AREA_SUB_CALLBACK_URI, // callbackReference - -, -, - mw_area_info( - ELLIPSOID_POINT_UNCERT_CIRCLE, - { - m_point({PX_UE_COORD_LAT}, {PX_UE_COORD_LONG}) - }, - PX_RADIUS - ), - PX_TRACKIMNG_ACCURACY, - PX_CLIENT_ID //clientCorrelator - )))))) -> value v_response { + mw_body_json_zone_location_event_notification( + mw_zone_location_event_notification( + // FIXME + )))))) -> value v_response { tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Distance subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_LOC_API_ZONES_SUB_URI & "/(?*)", + 0 + ); - log("*** " & testcasename() & ": PASS: IUT successfully responds with a userAreaSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble - f_delete_user_area_subscription(v_response.response.body.json_body.userAreaSubscription); + f_delete_zone_location_event_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_001_OK_01 + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_01 /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + * @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UEAREASUB_001_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_02() runs on HttpComponent system HttpTestAdapter { // Local variables - var Headers v_headers; - + var ZoneLocationEventNotification v_zone_location_event_notification; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; } - + // Test component configuration - f_cf_01_http_up(); - + f_cf_01_http_notif_up(); + // Test adapter configuration - + // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI, - v_headers, - m_http_message_body_json( - m_body_json_user_area_subscription( - m_user_area_subscription( - PX_AREA_SUB_CALLBACK_URI, // callbackReference - PX_USER, - m_area_info( - ELLIPSOID_POINT_UNCERT_CIRCLE, - { - m_point({PX_UE_COORD_LAT}, {PX_UE_COORD_LONG}) - } - // No radius - ), - PX_TRACKIMNG_ACCURACY, - PX_CLIENT_ID //clientCorrelator - )))))); + f_create_zone_location_event_subscription(v_zone_location_event_notification, v_subscription_id); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, -, + mw_http_message_body_json( + mw_body_json_zone_location_event_notification( + mw_zone_location_event_notification( + -, + v_zone_location_event_notification.links_ + )))))) { tc_ac.stop; + + // Send response + var Headers v_headers; + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); - log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventNotification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1377,114 +3719,137 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_001_BR + f_delete_zone_location_event_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_02 /** - * @desc Check that the IUT acknowledges the cancellation of UE area change notifications when commanded by a MEC Application + * @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application - OperationStatus constraint */ - testcase TC_MEC_MEC013_SRV_UEAREASUB_002_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var UserAreaSubscription v_user_area_subscription; - var charstring v_uri; - + var HttpMessage v_response; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); - f_create_user_area_subscription(v_user_area_subscription); - v_uri := regexp( - oct2char(unichar2oct(v_user_area_subscription.links_.self_.href)), - "?+" & PX_LOC_API_AREA_SUB_URI & "/(?*)", - 0 - ); httpPort.send( m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & v_uri, - v_headers - ) - ) - ); + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_zone_status_subscription( + m_zone_status_subscription( + PX_AREA_SUB_CALLBACK_URI, + -, + PX_ZONE_ID, + -, -, -, -, -, -, -, + Serviceable + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_204_no_content - )) { - + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_zone_status_notification( + mw_zone_status_notification( + -, -, + Serviceable + )))))) -> value v_response { tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Distance subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_LOC_API_ZONES_SUB_URI & "/(?*)", + 0 + ); - log("*** " & testcasename() & ": PASS: IUT successfully responds with no content ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_zone_status_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_002_OK - + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_01 + /** - * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + * @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application - OperationStatus constraint */ - testcase TC_MEC_MEC013_SRV_UEAREASUB_002_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_02() runs on HttpComponent system HttpTestAdapter { // Local variables - var Headers v_headers; - + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; } - + // Test component configuration - f_cf_01_http_up(); - + f_cf_01_http_notif_up(); + // Test adapter configuration - + // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), - v_headers - ) - ) - ); + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, -, + mw_http_message_body_json( + mw_body_json_zone_status_notification( + mw_zone_status_notification( + v_zone_status_notification.links_ + )))))) { tc_ac.stop; + + // Send response + var Headers v_headers; + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); - log("*** " & testcasename() & ": PASS: IUT successfully responds with 404 Not Found ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventNotification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1492,117 +3857,131 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_002_NF - - } // End of group ueAreaSubscribe - - /* - * UE Distance Lookup (UEDISTLOOK) - */ - group ueDistanceLookup { + f_delete_zone_status_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_02 /** - * @desc Check that the IUT responds with the distance to a UE when queried by a MEC Application + * @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application - UserNumEvent constraint */ - testcase TC_MEC_MEC013_SRV_UEDISTLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - + var HttpMessage v_response; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - PICS_ROOT_API & oct2char(unichar2oct(PX_UE_LOC_QRY_URI, "UTF-8")) & "?address=" & oct2char(unichar2oct(PX_IP_ADDRESS, "UTF-8")) & "&latitude=" & float2str(PX_UE_COORD_LAT) & "&longitude=" & float2str(PX_UE_COORD_LONG), - v_headers - ) - ) - ); + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_zone_status_subscription( + m_zone_status_subscription( + PX_AREA_SUB_CALLBACK_URI, + -, + PX_ZONE_ID, + -, -, -, + PX_UPPER_NUM_USER_THRESHOLD, + PX_LOWER_NUM_USER_THRESHOLD + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_terminal_distance( - mw_terminal_distance - ))))) { - + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_zone_status_notification( + mw_zone_status_notification( + // FIXME + )))))) -> value v_response { tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Distance subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_LOC_API_ZONES_SUB_URI & "/(?*)", + 0 + ); - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 200 OK ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_zone_status_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEDISTLOOK_001_OK - + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_01 + /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + * @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application - UserNumEvent constraint */ - testcase TC_MEC_MEC013_SRV_UEDISTLOOK_001_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_02() runs on HttpComponent system HttpTestAdapter { // Local variables - var Headers v_headers; - + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; } - + // Test component configuration - f_cf_01_http_up(); - + f_cf_01_http_notif_up(); + // Test adapter configuration - + // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & oct2char(unichar2oct(PX_UE_LOC_QRY_URI, "UTF-8")) & "?address=" & oct2char(unichar2oct(PX_IP_ADDRESS, "UTF-8")) & "&lat=" & float2str(PX_UE_COORD_LAT) & "&longitude=" & float2str(PX_UE_COORD_LONG), - v_headers - ) - ) - ); + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id, omit, PX_UPPER_NUM_USER_THRESHOLD, PX_LOWER_NUM_USER_THRESHOLD); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, -, + mw_http_message_body_json( + mw_body_json_zone_status_notification( + v_zone_status_notification + ))))) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 400 bad request ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventNotification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1610,81 +3989,57 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_zone_status_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEDISTLOOK_001_BR - - } // End of group ueDistanceLookup - - /* - * UE Distance Subscribe (UEDISTSUB) - */ - group ueDistanceSubscribe { - + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_02 + /** - * @desc Check that the IUT acknowledges the UE distance subscription request when commanded by a MEC Application and notifies it when (all) the requested UE(s) is (are) within the specified distance + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided */ - testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEZONESUB_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; - + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI, + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_user_distance_subscription( - m_user_distance_subscription( - PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference - PX_USER, - { PX_UE_MONITORED_IP_ADDRESS }, // monitoredAddress - PX_DISTANCE, - PX_TRACKIMNG_ACCURACY, - AllWithinDistance, - -, // checkImmediate - PX_CLIENT_ID //clientCorrelator - )))))); + m_body_json_zone_location_event_subscription( + m_zone_location_event_subscription( + "", + PX_CLIENT_ID, + PX_ZONE_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_user_distance_subscription( - mw_user_distance_subscription( - PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference - -, - PX_USER, - { PX_UE_MONITORED_IP_ADDRESS }, // monitoredAddressPX_CLIENT_ID, //clientCorrelator - PX_DISTANCE, - PX_TRACKIMNG_ACCURACY, - AllWithinDistance, - -, // checkImmediate - PX_CLIENT_ID //clientCorrelator - )))))) -> value v_response { + mw_http_response_400_bad_request + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a userDistanceSubscription ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1692,63 +4047,66 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble - f_delete_user_distance_subscription(v_response.response.body.json_body.userDistanceSubscription); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_OK - + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_BR + /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + * @desc Check that the IUT acknowledges the change of UE area subscription request when commanded by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEZONESUB_002_OK_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - + var HttpMessage v_response; + var ZoneLocationEventNotification v_zone_location_event_notification; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble + f_create_zone_location_event_subscription(v_zone_location_event_notification, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI & "_INVALID", + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & v_subscription_id, v_headers, m_http_message_body_json( - m_body_json_user_distance_subscription( - m_user_distance_subscription( - PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference - PX_USER, - { }, // monitoredAddress is empty - PX_DISTANCE, - PX_TRACKIMNG_ACCURACY, - AllWithinDistance, - -, // checkImmediate - PX_CLIENT_ID //clientCorrelator - )))))); + m_body_json_zone_location_event_subscription( + m_zone_location_event_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + PX_CLIENT_ID, + PX_ZONE_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request - )) { - + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_zone_location_event_subscription( + mw_zone_location_event_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + PX_CLIENT_ID, + PX_ZONE_ID + )))))) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully updates the zoneLocationEventSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1756,61 +4114,66 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_zone_location_event_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_BR - + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_002_OK_01 + /** - * @desc Check that the IUT acknowledges the cancellation of UE distance notifications when commanded by a MEC Application + * @desc Check that the IUT acknowledges the change of UE area subscription request when commanded by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UEDISTSUB_002_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEZONESUB_002_OK_02() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var UserDistanceSubscription v_user_distance_subscription; - var charstring v_uri; - + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id); f_init_default_headers_list(-, -, v_headers); - f_create_user_distance_subscription(v_user_distance_subscription); - v_uri := regexp( - oct2char(unichar2oct(v_user_distance_subscription.links_.self_.href)), - "?+" & PX_LOC_API_DISTANCE_SUB_URI & "/(?*)", - 0 - ); httpPort.send( m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI & "/" & v_uri, - v_headers - ) - ) - ); + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_zone_status_subscription( + m_zone_status_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + -, + PX_ZONE_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_204_no_content - )) { - + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_zone_status_subscription( + mw_zone_status_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + -, + PX_ZONE_ID + )))))) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with no content ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully updates with a zoneStatusSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1818,53 +4181,57 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_zone_status_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_002_OK - + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_002_OK_02 + /** * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UEDISTSUB_002_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEZONESUB_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), - v_headers - ) - ) - ); + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers, + m_http_message_body_json( + m_body_json_zone_location_event_subscription( + m_zone_location_event_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + PX_CLIENT_ID, + PX_ZONE_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found() - )) { - + mw_http_response_404_not_found + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 404 Not Found ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1872,11 +4239,118 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_002_NF - - } // End of group ueDistanceSubscribe + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_002_NF + /** + * @desc Check that the IUT acknowledges the cancellation of UE area change notifications when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEZONESUB_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneLocationEventNotification v_zone_location_event_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_location_event_subscription(v_zone_location_event_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 No Content ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_003_OK + + /** + * @desc Check that the IUT acknowledges the cancellation of UE information change notifications when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEZONESUB_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_003_NF + + } // End of group ueZoneSub + } // End of module AtsMec_LocationAPI_TestCases diff --git a/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn index fb4852e..2a8ce72 100644 --- a/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn +++ b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn @@ -13,30 +13,88 @@ module AtsMec_LocationAPI_TestControl { if (PICS_MEC_PLAT and PICS_SERVICES) { if (PICS_LOCATION_API_SUPPORTED) { - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_OK()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_BR()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_NF()); + execute(TC_MEC_MEC013_SRV_RLOCLOOK_001_OK()); + execute(TC_MEC_MEC013_SRV_RLOCLOOK_001_NF()); + execute(TC_MEC_MEC013_SRV_RLOCLOOK_002_OK()); + execute(TC_MEC_MEC013_SRV_RLOCLOOK_002_NF()); + + execute(TC_MEC_MEC013_SRV_UEAREALOOK_001_OK_01()); + execute(TC_MEC_MEC013_SRV_UEAREALOOK_001_OK_02()); + execute(TC_MEC_MEC013_SRV_UEAREALOOK_001_BR()); + execute(TC_MEC_MEC013_SRV_UEAREALOOK_002_OK()); + execute(TC_MEC_MEC013_SRV_UEAREALOOK_002_NF()); + + execute(TC_MEC_MEC013_SRV_UEAREASUB_001_OK_01()); + execute(TC_MEC_MEC013_SRV_UEAREASUB_001_OK_02()); + execute(TC_MEC_MEC013_SRV_UEAREASUB_001_BR()); + execute(TC_MEC_MEC013_SRV_UEAREASUB_002_OK()); + execute(TC_MEC_MEC013_SRV_UEAREASUB_002_NF()); + execute(TC_MEC_MEC013_SRV_UEAREASUB_003_OK()); + execute(TC_MEC_MEC013_SRV_UEAREASUB_003_NF()); + + execute(TC_MEC_MEC013_SRV_UEDISTLOOK_001_OK()); + execute(TC_MEC_MEC013_SRV_UEDISTLOOK_001_BR()); + execute(TC_MEC_MEC013_SRV_UEDISTLOOK_002_OK()); + execute(TC_MEC_MEC013_SRV_UEDISTLOOK_002_NF()); + + execute(TC_MEC_MEC013_SRV_UEDISTSUB_001_OK_01()); + execute(TC_MEC_MEC013_SRV_UEDISTSUB_001_OK_02()); + execute(TC_MEC_MEC013_SRV_UEDISTSUB_001_BR()); + execute(TC_MEC_MEC013_SRV_UEDISTSUB_002_OK()); + execute(TC_MEC_MEC013_SRV_UEDISTSUB_002_NF()); + + execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_01()); + execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_02()); + execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_03()); + execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_04()); + execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_BR()); + execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_NF()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_OK()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_01()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_02()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_03()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_BR()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_NF()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_01()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_02()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_003_NF()); + + execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01_01()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01_02()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02_01()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02_02()); execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR_01()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR_02()); execute(TC_MEC_MEC013_SRV_UELOCSUB_002_OK()); execute(TC_MEC_MEC013_SRV_UELOCSUB_002_NF()); - - execute(TP_MEC_MEC013_SRV_UELOCSUB_001_OK_02()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_NF()); - - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK()); - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_BR()); - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_NF()); - - execute(TC_MEC_MEC013_SRV_UEINFSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_002_NF()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_003_OK_01()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_003_OK_02()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_003_BR_01()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_003_BR_02()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_003_NF_01()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_003_NF_02()); + + execute(TC_MEC_MEC013_SRV_UETESTNOT_001_OK()); + execute(TC_MEC_MEC013_SRV_UETESTNOT_002_OK()); + + + + + + execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_01()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_02()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_01()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_02()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_01()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_02()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_001_BR()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_002_OK_01()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_002_OK_02()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_002_NF()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_003_OK()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_003_NF()); - execute(TC_MEC_MEC013_SRV_UEAREASUB_001_OK_01()); } } } // End of 'control' statement diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn index e783c0b..0177ba7 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn @@ -38,7 +38,9 @@ module LocationAPI_Functions { import from LibMec_Pixits all; function f_create_user_location_event_subscription( - out UserLocationEventSubscription p_user_location_event_subscription + out UserLocationEventNotification p_user_location_event_notification, + out charstring p_subscription_id, + in Address p_address := PX_USER ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -53,7 +55,7 @@ module LocationAPI_Functions { m_body_json_user_location_event_subscription( m_user_location_event_subscription( PX_CALLBACK_REF_URL, - PX_USER + p_address )))))); tc_ac.start; alt { @@ -61,16 +63,24 @@ module LocationAPI_Functions { mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_user_location_event_subscription( - mw_user_location_event_subscription( - PX_CALLBACK_REF_URL, - PX_USER - )))))) -> value v_response { + mw_body_json_user_location_event_notification( + mw_user_location_event_notification( + p_address + )))))) -> value v_response { tc_ac.stop; - // FIXME Extract HTTP Location header - p_user_location_event_subscription := v_response.response.body.json_body.userLocationEventSubscription; - log("f_create_user_location_event_subscription: INFO: IUT successfully responds to the subscription: ", p_user_location_event_subscription); + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)", + 0 + ); + p_user_location_event_notification := v_response.response.body.json_body.userLocationEventNotification; + log("f_create_user_location_event_subscription: INFO: IUT successfully responds to the subscription: ", p_user_location_event_notification); + log("f_create_user_location_event_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_user_location_event_subscription: INCONC: Expected message not received"); @@ -80,29 +90,23 @@ module LocationAPI_Functions { } // End of function f_create_user_location_event_subscription function f_delete_user_location_event_subscription( - in UserLocationEventSubscription p_user_location_event_subscription + in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; - var HttpMessage v_response; - var charstring v_uri :=regexp( - oct2char(unichar2oct(p_user_location_event_subscription.links_.self_.href)), - "?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)", - 0 - ); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & p_subscription_id, v_headers - ))); + ))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; } [] tc_ac.timeout { @@ -113,7 +117,8 @@ module LocationAPI_Functions { } // End of function f_delete_user_location_event_subscription function f_create_user_location_periodic_subscription( - out UserLocationPeriodicSubscription p_user_location_periodic_subscription + out UserLocationPeriodicNotification p_user_location_periodic_notification, + out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -135,15 +140,24 @@ module LocationAPI_Functions { mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_user_location_periodic_subscription( - mw_user_location_periodic_subscription( + mw_body_json_user_location_periodic_notification( + mw_user_location_periodic_notification( PX_CALLBACK_REF_URL )))))) -> value v_response { tc_ac.stop; - // FIXME Extract HTTP Location header - p_user_location_periodic_subscription := v_response.response.body.json_body.userLocationPeriodicSubscription; - log("f_create_user_location_periodic_subscription: INFO: IUT successfully responds to the subscription: ", p_user_location_periodic_subscription); + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)", + 0 + ); + p_user_location_periodic_notification := v_response.response.body.json_body.userLocationPeriodicNotification; + log("f_create_user_location_periodic_subscription: INFO: IUT successfully responds to the subscription: ", p_user_location_periodic_notification); + log("f_create_user_location_periodic_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_user_location_periodic_subscription: INCONC: Expected message not received"); @@ -153,21 +167,15 @@ module LocationAPI_Functions { } // End of function f_create_user_location_periodic_subscription function f_delete_user_location_periodic_subscription( - in UserLocationPeriodicSubscription p_position_notification_subscription + in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; - var HttpMessage v_response; - var charstring v_uri := regexp( - oct2char(unichar2oct(p_position_notification_subscription.links_.self_.href)), - "?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)", - 0 - ); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & p_subscription_id, v_headers ))); tc_ac.start; @@ -185,7 +193,8 @@ module LocationAPI_Functions { } // End of function f_delete_user_location_periodic_subscription function f_create_zone_location_event_subscription( - out ZoneLocationEventSubscription p_zone_location_event_subscription + out ZoneLocationEventNotification p_zone_location_event_notification, + out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -198,28 +207,35 @@ module LocationAPI_Functions { v_headers, m_http_message_body_json( m_body_json_zone_location_event_subscription( - m_zone_location_event_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_ZONE_ID - )))))); + m_zone_location_event_subscription( + PX_CALLBACK_REF_URL, + -, + PX_ZONE_ID + )))))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_zone_location_event_subscription( - mw_zone_location_event_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_ZONE_ID - )))))) -> value v_response { + mw_body_json_zone_location_event_notification( + mw_zone_location_event_notification( + // FIXME + )))))) -> value v_response { tc_ac.stop; - // FIXME Extract HTTP Location header - p_zone_location_event_subscription := v_response.response.body.json_body.zoneLocationEventSubscription; - log("f_create_zone_location_event_subscription: INFO: IUT successfully responds to the subscription: ", p_zone_location_event_subscription); + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_LOC_API_ZONES_SUB_URI & "/(?*)", + 0 + ); + p_zone_location_event_notification := v_response.response.body.json_body.zoneLocationEventNotification; + log("f_create_zone_location_event_subscription: INFO: IUT successfully responds to the subscription: ", p_zone_location_event_notification); + log("f_create_zone_location_event_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_zone_location_event_subscription: INCONC: Expected message not received"); @@ -229,21 +245,16 @@ module LocationAPI_Functions { } // End of function f_create_zone_location_event_subscription function f_delete_zone_location_event_subscription( - in ZoneLocationEventSubscription p_zone_location_event_subscription + in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; - var charstring v_uri := regexp( - oct2char(unichar2oct(p_zone_location_event_subscription.links_.self_.href)), - "?+" & PX_LOC_API_ZONES_SUB_URI & "/(?*)", - 0 - ); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & p_subscription_id, v_headers ))); tc_ac.start; @@ -261,7 +272,11 @@ module LocationAPI_Functions { } // End of function f_delete_zone_location_event_subscription function f_create_zone_status_subscription( - out ZoneStatusSubscription p_zone_status_subscription + out ZoneStatusNotification p_zone_status_notification, + out charstring p_subscription_id, + in template (omit) OperationStatus p_operationStatus := Serviceable, + in template (omit) Json.UInteger p_upper_num_user_threshold := omit, + in template (omit) Json.UInteger p_lower_num_user_threshold := omit ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -276,8 +291,12 @@ module LocationAPI_Functions { m_body_json_zone_status_subscription( m_zone_status_subscription( PX_AREA_SUB_CALLBACK_URI, - PX_USER, - PX_ZONE_ID + -, + PX_ZONE_ID, + -, -, -, -, -, + p_upper_num_user_threshold, + p_lower_num_user_threshold, + p_operationStatus )))))); tc_ac.start; alt { @@ -285,16 +304,27 @@ module LocationAPI_Functions { mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_zone_status_subscription( - mw_zone_status_subscription( - PX_AREA_SUB_CALLBACK_URI + mw_body_json_zone_status_notification( + mw_zone_status_notification( + -, -, + p_operationStatus, + -, + PX_ZONE_ID )))))) -> value v_response { tc_ac.stop; - // FIXME Extract HTTP Location header - p_zone_status_subscription := v_response.response.body.json_body.zoneStatusSubscription; - log("f_create_zone_status_subscription: INFO: IUT successfully responds to the subscription: ", p_zone_status_subscription); - } + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_LOC_API_ZONES_SUB_URI & "/(?*)", + 0 + ); + p_zone_status_notification := v_response.response.body.json_body.zoneStatusNotification; + log("f_create_zone_status_subscription: INFO: IUT successfully responds to the subscription: ", p_zone_status_notification); + log("f_create_zone_status_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_zone_status_subscription: INCONC: Expected message not received"); } @@ -303,29 +333,23 @@ module LocationAPI_Functions { } // End of function f_create_zone_status_subscription function f_delete_zone_status_subscription( - in ZoneStatusSubscription p_zone_status_subscription + in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; - var HttpMessage v_response; - var charstring v_uri := regexp( - oct2char(unichar2oct(p_zone_status_subscription.links_.self_.href)), - "?+" & PX_LOC_API_AREA_SUB_URI & "/(?*)", - 0 - ); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & p_subscription_id, v_headers - ))); + ))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; } [] tc_ac.timeout { @@ -335,7 +359,8 @@ module LocationAPI_Functions { } // End of function f_delete_zone_status_subscription function f_create_user_area_subscription( - out UserAreaSubscription p_user_area_subscription + out UserAreaNotification p_user_area_notification, + out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -357,22 +382,31 @@ module LocationAPI_Functions { PX_RADIUS ), // AreaInfo PX_TRACKIMNG_ACCURACY // TrackingAccuracy - )))))); + )))))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_user_area_subscription( - mw_user_area_subscription( - PX_UE_DIST_SUB_CALLBACK_URI - )))))) -> value v_response { + mw_body_json_user_area_notification( + mw_user_area_notification( + // FIXME PX_UE_DIST_SUB_CALLBACK_URI + )))))) -> value v_response { tc_ac.stop; - // FIXME Extract HTTP Location header - p_user_area_subscription := v_response.response.body.json_body.userAreaSubscription; - log("f_create_user_area_subscription: INFO: IUT successfully responds to the subscription: ", p_user_area_subscription); + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_LOC_API_USERS_SUB_URI & "/(?*)", + 0 + ); + p_user_area_notification := v_response.response.body.json_body.userAreaNotification; + log("f_create_user_area_subscription: INFO: IUT successfully responds to the subscription: ", p_user_area_notification); + log("f_create_user_area_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_user_area_subscription: INCONC: Expected message not received"); @@ -382,21 +416,15 @@ module LocationAPI_Functions { } // End of function f_create_user_area_subscription function f_delete_user_area_subscription( - in UserAreaSubscription p_user_area_subscription + in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; - var HttpMessage v_response; - var charstring v_uri := regexp( - oct2char(unichar2oct(p_user_area_subscription.links_.self_.href)), - "?+" & PX_LOC_API_AREA_SUB_URI & "/(?*)", - 0 - ); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & p_subscription_id, v_headers ))); tc_ac.start; @@ -414,7 +442,8 @@ module LocationAPI_Functions { } // End of function f_delete_user_area_subscription function f_create_user_distance_subscription( - out UserDistanceSubscription p_user_distance_subscription + out UserDistanceNotification p_user_distance_notification, + out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -440,15 +469,24 @@ module LocationAPI_Functions { mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_user_distance_subscription( - mw_user_distance_subscription( - PX_UE_DIST_SUB_CALLBACK_URI + mw_body_json_user_distance_notification( + mw_user_distance_notification( + // FIXME PX_UE_DIST_SUB_CALLBACK_URI )))))) -> value v_response { tc_ac.stop; - // FIXME Extract HTTP Location header - p_user_distance_subscription := v_response.response.body.json_body.userDistanceSubscription; - log("f_create_user_distance_subscription: INFO: IUT successfully responds to the subscription: ", p_user_distance_subscription); + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_LOC_API_DISTANCE_SUB_URI & "/(?*)", + 0 + ); + p_user_distance_notification := v_response.response.body.json_body.userDistanceNotification; + log("f_create_user_distance_subscription: INFO: IUT successfully responds to the subscription: ", p_user_distance_notification); + log("f_create_user_distance_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_user_distance_subscription: INCONC: Expected message not received"); @@ -458,29 +496,23 @@ module LocationAPI_Functions { } // End of function f_create_user_distance_subscription function f_delete_user_distance_subscription( - in UserDistanceSubscription p_user_distance_subscription + charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; - var HttpMessage v_response; - var charstring v_uri := regexp( - oct2char(unichar2oct(p_user_distance_subscription.links_.self_.href)), - "?+" & PX_LOC_API_DISTANCE_SUB_URI & "/(?*)", - 0 - ); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI & "/" & p_subscription_id, v_headers - ))); + ))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; } [] tc_ac.timeout { diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn index 87c88ea..8d6672e 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn @@ -11,6 +11,8 @@ module LocationAPI_Pixits { modulepar Address PX_USER := "ue1"; + modulepar Address PX_USER_2 := "ue2"; + modulepar Address PX_USER_UNKNOWN := "acr:192.168.5.1.1"; modulepar ClientCorrelator PX_CLIENT_ID := "0123"; @@ -25,6 +27,8 @@ module LocationAPI_Pixits { modulepar ZoneId PX_ZONE_ID := "zone1"; + modulepar ZoneId PX_ZONE_ID_1 := "zone2"; + modulepar ZoneId PX_NON_EXISTENT_ZONE_ID := "zone51"; modulepar ResourceURL PX_RESOURCE_URL := "http://meep-loc-serv/etsi-013/location/v3/users/ue1"; @@ -41,10 +45,14 @@ module LocationAPI_Pixits { modulepar Address PX_IP_ADDRESS := "acr:10.0.0.3"; + modulepar Address PX_IP_ADDRESS_1 := "acr:10.0.0.10"; + modulepar CallbackReference PX_AREA_SUB_CALLBACK_URI := "http://clientApp.example.com/location_notifications/123456"; modulepar CallbackReference PX_UE_DIST_SUB_CALLBACK_URI := "http://clientApp.example.com/location_notifications/123456"; + modulepar CallbackReference PX_UE_NEW_SUB_CALLBACK_URI := "http://clientApp.example.com/new_location_notifications/123456"; + modulepar Address PX_UE_MONITORED_IP_ADDRESS := "acr:10.0.0.1"; modulepar Address PX_ACR_UNKNOWN_IP := "acr:10.0.0.254"; @@ -68,5 +76,11 @@ module LocationAPI_Pixits { modulepar CallbackReference PX_USERTRACK_SUB_CALLBACK_URI := ""; modulepar CallbackReference PX_TRAFFIC_SUB_CALLBACK_URI := ""; + + modulepar float PX_NOTIF_EXPIRY := 60.0; + + modulepar Json.UInteger PX_UPPER_NUM_USER_THRESHOLD := 10; + + modulepar Json.UInteger PX_LOWER_NUM_USER_THRESHOLD := 1; } // End of module LocationAPI_Pixits diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn index 4d824fc..e407685 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn @@ -158,6 +158,46 @@ module LocationAPI_Templates { resourceURL := p_resourceURL } // End of template mw_access_point_list + template (omit) AccessPointInfo m_access_point_info( + in AccessPointId p_accessPointId, + in ConnectionType p_connectionType, + in OperationStatus p_operationStatus, + in NumberOfUsers p_numberOfUsers, + in template (value) ResourceURL p_resourceURL, + in template (omit) LocationInfo p_locationInfo := omit, + in template (omit) InterestRealm p_interestRealm := omit, + in template (omit) DateTimeStamp p_timezone := omit + ) := { + accessPointId := p_accessPointId, + locationInfo := p_locationInfo, + connectionType := p_connectionType, + operationStatus := p_operationStatus, + numberOfUsers := p_numberOfUsers, + interestRealm := p_interestRealm, + timezone := p_timezone, + resourceURL := p_resourceURL + } // End of template m_access_point_info + + template (present) AccessPointInfo mw_access_point_info( + template (present) AccessPointId p_accessPointId := ?, + template (present) ConnectionType p_connectionType := ?, + template (present) OperationStatus p_operationStatus := ?, + template (present) NumberOfUsers p_numberOfUsers := ?, + template (present) ResourceURL p_resourceURL := ?, + template LocationInfo p_locationInfo := *, + template InterestRealm p_interestRealm := *, + template DateTimeStamp p_timezone := * + ) := { + accessPointId := p_accessPointId, + locationInfo := p_locationInfo, + connectionType := p_connectionType, + operationStatus := p_operationStatus, + numberOfUsers := p_numberOfUsers, + interestRealm := p_interestRealm, + timezone := p_timezone, + resourceURL := p_resourceURL + } // End of template mw_access_point_info + template (omit) Subscription m_subscription( in Json.String p_subscriptionType, in template (omit) Json.AnyURI p_href := omit @@ -190,6 +230,44 @@ module LocationAPI_Templates { resourceURL := p_resourceURL } // End of template mw_notification_subscription_list + template (omit) UserAreaNotification m_user_area_notification( + in template (value) Address p_address_, + in template (value) LocationEventType p_userLocationEvent, + in template (value) Links p_links_, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) LocationInfo p_locationInfo := omit, + in template (omit) CivicAddress p_civicInfo := omit, + in template (omit) RelativeLocationInfo p_relativeLocationInfo := omit + ) :={ + notificationType := "UserAreaNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + locationInfo := p_locationInfo, + civicInfo := p_civicInfo, + relativeLocationInfo := p_relativeLocationInfo, + userLocationEvent := p_userLocationEvent, + links_ := p_links_ + } // End of template m_user_area_notification + + template (present) UserAreaNotification mw_user_area_notification( + template (present) Address p_address_ := ?, + template (present) LocationEventType p_userLocationEvent := ?, + template (present) Links p_links_ := ?, + template TimeStamp p_timeStamp := *, + template LocationInfo p_locationInfo := *, + template CivicAddress p_civicInfo := *, + template RelativeLocationInfo p_relativeLocationInfo := * + ) :={ + notificationType := "UserAreaNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + locationInfo := p_locationInfo, + civicInfo := p_civicInfo, + relativeLocationInfo := p_relativeLocationInfo, + userLocationEvent := p_userLocationEvent, + links_ := p_links_ + } // End of template mw_user_area_notification + template (omit) UserLocationEventSubscription m_user_location_event_subscription( in CallbackReference p_callbackReference, in Address p_address := PX_USER, @@ -525,6 +603,206 @@ module LocationAPI_Templates { expiryDeadline := p_expiryDeadline } // End of template mw_user_distance_subscription + template (omit) UserDistanceNotification m_user_distance_notification( + in template (value) UserList p_monitoredUsers, + in template (value) DistanceCriteria p_distanceEvent, + in template (value) Links p_links_, + in template (omit) TimeStamp p_timeStamp := omit + ) := { + notificationType := "UserDistanceNotification", + timeStamp := p_timeStamp, + monitoredUsers := p_monitoredUsers, + distanceEvent := p_distanceEvent, + links_ := p_links_ + } // End of template m_user_distance_notification + + template (present) UserDistanceNotification mw_user_distance_notification( + template (present) UserList p_monitoredUsers := ?, + template (present) DistanceCriteria p_distanceEvent := ?, + template (present) Links p_links_ := ?, + template TimeStamp p_timeStamp := * + ) := { + notificationType := "UserDistanceNotification", + timeStamp := p_timeStamp, + monitoredUsers := p_monitoredUsers, + distanceEvent := p_distanceEvent, + links_ := p_links_ + } // End of template mw_user_distance_notification + + template (omit) UserLocationEventNotification m_user_location_event_notification( + in template (value) Address p_address_, + in template (value) LocationEventType p_userLocationEvent, + in template (value) Links p_links_, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) LocationInfo p_locationInfo := omit, + in template (omit) CivicAddress p_civicInfo := omit, + in template (omit) RelativeLocationInfo p_relativeLocationInfo := omit, + in template (omit) ZoneId p_zoneId := omit, + in template (omit) AccessPointId p_accessPointId := omit + ) :={ + notificationType := "UserLocationEventNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + userLocationEvent := p_userLocationEvent, + locationInfo := p_locationInfo, + civicInfo := p_civicInfo, + relativeLocationInfo := p_relativeLocationInfo, + zoneId := p_zoneId, + accessPointId := p_accessPointId, + links_ := p_links_ + } // End of template m_user_location_event_notification + + template (present) UserLocationEventNotification mw_user_location_event_notification( + template (present) Address p_address_ := ?, + template (present) LocationEventType p_userLocationEvent := ?, + template (present) Links p_links_ := ?, + template TimeStamp p_timeStamp := *, + template LocationInfo p_locationInfo := *, + template CivicAddress p_civicInfo := *, + template RelativeLocationInfo p_relativeLocationInfo := *, + template ZoneId p_zoneId := *, + template AccessPointId p_accessPointId := * + ) :={ + notificationType := "UserLocationEventNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + userLocationEvent := p_userLocationEvent, + locationInfo := p_locationInfo, + civicInfo := p_civicInfo, + relativeLocationInfo := p_relativeLocationInfo, + zoneId := p_zoneId, + accessPointId := p_accessPointId, + links_ := p_links_ + } // End of template mw_user_location_event_notification + + template (omit) UserLocationPeriodicNotification m_user_location_periodic_notification( + in template (value) Address p_address_, + in template (value) LocationEventType p_userLocationEvent, + in template (value) Links p_links_, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) LocationInfo p_locationInfo := omit, + in template (omit) CivicAddress p_civicInfo := omit, + in template (omit) RelativeLocationInfo p_relativeLocationInfo := omit, + in template (omit) ZoneId p_zoneId := omit, + in template (omit) AccessPointId p_accessPointId := omit, + in template (omit) Json.Bool p_isFinalNotification := omit + ) :={ + notificationType := "UserLocationPeriodicNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + userLocationEvent := p_userLocationEvent, + locationInfo := p_locationInfo, + civicInfo := p_civicInfo, + relativeLocationInfo := p_relativeLocationInfo, + zoneId := p_zoneId, + accessPointId := p_accessPointId, + isFinalNotification := p_isFinalNotification, + links_ := p_links_ + } // End of template m_user_location_periodic_notification + + template (present) UserLocationPeriodicNotification mw_user_location_periodic_notification( + template (present) Address p_address_ := ?, + template (present) LocationEventType p_userLocationEvent := ?, + template (present) Links p_links_ := ?, + template TimeStamp p_timeStamp := *, + template LocationInfo p_locationInfo := *, + template CivicAddress p_civicInfo := *, + template RelativeLocationInfo p_relativeLocationInfo := *, + template ZoneId p_zoneId := *, + template AccessPointId p_accessPointId := *, + template Json.Bool p_isFinalNotification := * + ) :={ + notificationType := "UserLocationPeriodicNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + userLocationEvent := p_userLocationEvent, + locationInfo := p_locationInfo, + civicInfo := p_civicInfo, + relativeLocationInfo := p_relativeLocationInfo, + zoneId := p_zoneId, + accessPointId := p_accessPointId, + isFinalNotification := p_isFinalNotification, + links_ := p_links_ + } // End of template mw_user_location_periodic_notification + + template (omit) ZoneLocationEventNotification m_zone_location_event_notification( + in template (value) Address p_address_, + in template (value) Links p_links_, + in template (value) LocationEventType p_userLocationEvent, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) ZoneId p_zoneId := omit + ) := { + notificationType := "ZoneLocationEventNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + userLocationEvent := p_userLocationEvent, + zoneId := p_zoneId, + links_ := p_links_ + } // End of template m_zone_location_event_notification + + template (present) ZoneLocationEventNotification mw_zone_location_event_notification( + template (present) Address p_address_ := ?, + template (present) Links p_links_ := ?, + template (present) LocationEventType p_userLocationEvent := ?, + template TimeStamp p_timeStamp := *, + template ZoneId p_zoneId := * + ) := { + notificationType := "ZoneLocationEventNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + userLocationEvent := p_userLocationEvent, + zoneId := p_zoneId, + links_ := p_links_ + } // End of template mw_zone_location_event_notification + + template (omit) ZoneStatusNotification m_zone_status_notification( + in template (value) Links p_links_, + in template (omit) UserNumEvent p_userNumEvent := omit, + in template (omit) OperationStatus p_operationStatus := omit, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) ZoneId p_zoneId := omit, + in template (omit) AccessPointId p_accessPointId := omit + ) := { + notificationType := "ZoneStatusNotification", + timeStamp := p_timeStamp, + userNumEvent := p_userNumEvent, + operationStatus := p_operationStatus, + zoneId := p_zoneId, + accessPointId := p_accessPointId, + links_ := p_links_ + } // End of template m_zone_status_notification + + template (present) ZoneStatusNotification mw_zone_status_notification( + template (present) Links p_links_ := ?, + template UserNumEvent p_userNumEvent := *, + template OperationStatus p_operationStatus := *, + template TimeStamp p_timeStamp := *, + template ZoneId p_zoneId := *, + template AccessPointId p_accessPointId := * + ) := { + notificationType := "ZoneStatusNotification", + timeStamp := p_timeStamp, + userNumEvent := p_userNumEvent, + operationStatus := p_operationStatus, + zoneId := p_zoneId, + accessPointId := p_accessPointId, + links_ := p_links_ + } // End of template mw_zone_status_notification + + template (value) TestNotification m_test_notification( + in template (value) LinksSubscription p_links_ + ) := { + notificationType := "TestNotification", + links_ := p_links_ + } // End of template m_test_notification + + template (present) TestNotification mw_test_notification( + template (present) LinksSubscription p_links_ := ? + ) := { + notificationType := "TestNotification", + links_ := p_links_ + } // End of template mw_test_notification + template (omit) AreaInfo m_area_info( in template (value) Shape p_shape, in template (value) Points p_points, diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn index 5f232e9..e5c9bad 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn @@ -702,7 +702,7 @@ module LocationAPI_TypesAndValues { */ type record NotificationSubscriptionList { Subscriptions subscription optional, - ResourceURL resourceURL + ResourceURL resourceURL } /** @@ -720,16 +720,16 @@ module LocationAPI_TypesAndValues { * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.4 Type: UserLocationEventSubscription */ type record UserLocationEventSubscription { - Json.String subscriptionType, - Json.String clientCorrelator optional, - CallbackReference callbackReference optional, - Json.Bool requestTestNotification optional, - WebsockNotifConfig websockNotifConfig optional, - Links links_ optional, - Address address_, - UserEventPara userEventPara optional, + Json.String subscriptionType, + Json.String clientCorrelator optional, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links_ optional, + Address address_, + UserEventPara userEventPara optional, LocationEventCriteria locationEventCriteria optional, - TimeStamp expiryDeadline optional + TimeStamp expiryDeadline optional } with { variant (links_) "name as '_links'"; variant (address_) "name as 'address'"; @@ -749,15 +749,15 @@ module LocationAPI_TypesAndValues { * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.5 Type: UserLocationPeriodicSubscription */ type record UserLocationPeriodicSubscription{ - Json.String subscriptionType, - Json.String clientCorrelator optional, - CallbackReference callbackReference optional, - Json.Bool requestTestNotification optional, + Json.String subscriptionType, + Json.String clientCorrelator optional, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, - Links links_ optional, - Address address_, - PeriodicEventInfo periodicEventInfo, - TimeStamp expiryDeadline optional + Links links_ optional, + Address address_, + PeriodicEventInfo periodicEventInfo, + TimeStamp expiryDeadline optional } with { variant (links_) "name as '_links'"; variant (address_) "name as 'address'"; @@ -770,7 +770,7 @@ module LocationAPI_TypesAndValues { * @see ETSI TS 129 572 V16.7.0 Clause 6.1.6.2.24 Type: PeriodicEventInfo */ type record PeriodicEventInfo { - ReportingAmount reportingAmount, + ReportingAmount reportingAmount, ReportingInterval reportingInterval } // End of type PeriodicEventInfo @@ -804,16 +804,16 @@ module LocationAPI_TypesAndValues { * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.6 Type: ZoneLocationEventSubscription */ type record ZoneLocationEventSubscription { - Json.String subscriptionType, - Json.String clientCorrelator optional, - CallbackReference callbackReference optional, - Json.Bool requestTestNotification optional, - WebsockNotifConfig websockNotifConfig optional, - Links links_ optional, - ZoneId zoneId, + Json.String subscriptionType, + Json.String clientCorrelator optional, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links_ optional, + ZoneId zoneId, LocationEventCriteria locationEventCriteria optional, - ReportingCtrl reportingCtrl optional, - TimeStamp expiryDeadline optional + ReportingCtrl reportingCtrl optional, + TimeStamp expiryDeadline optional } with { variant (links_) "name as '_links'"; } // End of type ZoneLocationEventSubscription @@ -837,20 +837,20 @@ module LocationAPI_TypesAndValues { * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.7 Type: ZoneStatusSubscription */ type record ZoneStatusSubscription { - Json.String subscriptionType, - Json.String clientCorrelator optional, - CallbackReference callbackReference optional, - Json.Bool requestTestNotification optional, + Json.String subscriptionType, + Json.String clientCorrelator optional, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, - Links links_ optional, - ZoneId zoneId, - Json.UInteger upperNumberOfUsersZoneThreshold optional, - Json.UInteger lowerNumberOfUsersZoneThreshold optional, - Json.UInteger upperNumberOfUsersAPThreshold optional, - Json.UInteger lowerNumberOfUsersAPThreshold optional, - OperationStatus operationStatus optional, - ReportingCtrl reportingCtrl optional, - TimeStamp expiryDeadline optional + Links links_ optional, + ZoneId zoneId, + Json.UInteger upperNumberOfUsersZoneThreshold optional, + Json.UInteger lowerNumberOfUsersZoneThreshold optional, + Json.UInteger upperNumberOfUsersAPThreshold optional, + Json.UInteger lowerNumberOfUsersAPThreshold optional, + OperationStatus operationStatus optional, + ReportingCtrl reportingCtrl optional, + TimeStamp expiryDeadline optional } with { variant (links_) "name as '_links'"; } // End of type ZoneStatusSubscription @@ -872,18 +872,18 @@ module LocationAPI_TypesAndValues { * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.8 Type: UserAreaSubscription */ type record UserAreaSubscription { - Json.String subscriptionType, - Json.String clientCorrelator optional, - CallbackReference callbackReference optional, - Json.Bool requestTestNotification optional, - WebsockNotifConfig websockNotifConfig optional, - Links links_ optional, - AreaInfo areaDefine, - Json.Number trackingAccuracy, + Json.String subscriptionType, + Json.String clientCorrelator optional, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links_ optional, + AreaInfo areaDefine, + Json.Number trackingAccuracy, LocationEventCriteria locationEventCriteria optional, - ReportingCtrl reportingCtrl optional, - Json.Bool reportingLocationReq optional, - TimeStamp expiryDeadline optional + ReportingCtrl reportingCtrl optional, + Json.Bool reportingLocationReq optional, + TimeStamp expiryDeadline optional } with { variant (links_) "name as '_links'"; } // End of type UserAreaSubscription @@ -908,20 +908,20 @@ module LocationAPI_TypesAndValues { * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.9 Type: UserDistanceSubscription */ type record UserDistanceSubscription { - Json.String subscriptionType, - Json.String clientCorrelator optional, - CallbackReference callbackReference optional, - Json.Bool requestTestNotification optional, + Json.String subscriptionType, + Json.String clientCorrelator optional, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, - Links links_ optional, - Json.AnyURI referenceAddress optional, - Json.AnyURIArray monitoredAddress, - Json.Number distance, - Json.Number trackingAccuracy, - DistanceCriteria criteria, - Json.Bool checkImmediate, - ReportingCtrl reportingCtrl optional, - TimeStamp expiryDeadline optional + Links links_ optional, + Json.AnyURI referenceAddress optional, + Json.AnyURIArray monitoredAddress, + Json.Number distance, + Json.Number trackingAccuracy, + DistanceCriteria criteria, + Json.Bool checkImmediate, + ReportingCtrl reportingCtrl optional, + TimeStamp expiryDeadline optional } with { variant (links_) "name as '_links'"; } // End of type UserDistanceSubscription @@ -943,7 +943,7 @@ module LocationAPI_TypesAndValues { * @desc Hyperlink related to the resource * @member Identifying the subscription for the test notification * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.3 Type: TestNotification - * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.4 Type: UserLoctiationEventNotification + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.4 Type: UserLocationEventNotification */ type record LinksSubscription { LinkType subscription @@ -961,23 +961,23 @@ module LocationAPI_TypesAndValues { * @member zoneId The identity of the zone * @member accessPointId The identity of the access point * @member _links Object containing hyperlinks related to the resource - * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.4 Type: UserLoctiationEventNotification - */ - type record UserLoctiationEventNotification { - Json.String notificationType, - TimeStamp timeStamp optional, - Address address_, - LocationEventType userLocationEvent, - LocationInfo locationInfo optional, - CivicAddress civicInfo optional, + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.4 Type: UserLocationEventNotification + */ + type record UserLocationEventNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Address address_, + LocationEventType userLocationEvent, + LocationInfo locationInfo optional, + CivicAddress civicInfo optional, RelativeLocationInfo relativeLocationInfo optional, - ZoneId zoneId optional, - AccessPointId accessPointId optional, - Links links_ + ZoneId zoneId optional, + AccessPointId accessPointId optional, + Links links_ } with { variant (links_) "name as '_links'"; variant (address_) "name as 'address'"; - } // End of type UserLoctiationEventNotification + } // End of type UserLocationEventNotification /** * @desc This type represents a notification from location server with regards to UE location periodic reporting. @@ -995,17 +995,17 @@ module LocationAPI_TypesAndValues { * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.5 Type: UserLocationPeriodicNotification */ type record UserLocationPeriodicNotification { - Json.String notificationType, - TimeStamp timeStamp optional, - Address address_, - LocationEventType userLocationEvent, - LocationInfo locationInfo optional, - CivicAddress civicInfo optional, + Json.String notificationType, + TimeStamp timeStamp optional, + Address address_, + LocationEventType userLocationEvent, + LocationInfo locationInfo optional, + CivicAddress civicInfo optional, RelativeLocationInfo relativeLocationInfo optional, - ZoneId zoneId optional, - AccessPointId accessPointId optional, - Json.Bool isFinalNotification optional, - Links links_ + ZoneId zoneId optional, + AccessPointId accessPointId optional, + Json.Bool isFinalNotification optional, + Links links_ } with { variant (links_) "name as '_links'"; variant (address_) "name as 'address'"; @@ -1022,12 +1022,12 @@ module LocationAPI_TypesAndValues { * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.6 Type: ZoneLocationEventNotification */ type record ZoneLocationEventNotification { - Json.String notificationType, - TimeStamp timeStamp optional, - Address address_, + Json.String notificationType, + TimeStamp timeStamp optional, + Address address_, LocationEventType userLocationEvent, - ZoneId zoneId optional, - Links links_ + ZoneId zoneId optional, + Links links_ } with { variant (links_) "name as '_links'"; variant (address_) "name as 'address'"; @@ -1078,14 +1078,14 @@ module LocationAPI_TypesAndValues { * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.8 Type: UserAreaNotification */ type record UserAreaNotification { - Json.String notificationType, - TimeStamp timeStamp optional, - Address address_, - LocationInfo locationInfo optional, - CivicAddress civicInfo optional, + Json.String notificationType, + TimeStamp timeStamp optional, + Address address_, + LocationInfo locationInfo optional, + CivicAddress civicInfo optional, RelativeLocationInfo relativeLocationInfo optional, - LocationEventType userLocationEvent, - Links links_ + LocationEventType userLocationEvent, + Links links_ } with { variant (links_) "name as '_links'"; variant (address_) "name as 'address'"; @@ -1101,11 +1101,11 @@ module LocationAPI_TypesAndValues { * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.9 Type: UserDistanceNotification */ type record UserDistanceNotification { - Json.String notificationType, - TimeStamp timeStamp optional, - UserList monitoredUsers, + Json.String notificationType, + TimeStamp timeStamp optional, + UserList monitoredUsers, DistanceCriteria distanceEvent, - Links links_ + Links links_ } with { variant (links_) "name as '_links'"; } // End of type UserDistanceNotification diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index f72b195..957ee15 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -42,6 +42,7 @@ module LibHttp_JsonMessageBodyTypes { UserList userList, // ETSI GS MEC 013 V3.1.1 Clause 6.2.5 Type: UserList LocationAPI_TypesAndValues.ZoneInfo zoneInfo, // ETSI GS MEC 013 V3.1.1 Clause 6.2.1 Zonal presence data types AccessPointList accessPointList, // ETSI GS MEC 013 V3.1.1 Clause 6.2.1 Zonal presence data types + AccessPointInfo accessPointInfo, // ETSI GS MEC 013 V3.1.1 Clause 6.2.1 Zonal presence data types NotificationSubscriptionList notificationSubscriptionList, // ETSI GS MEC 013 V3.1.1 Clause 6.3.3 Type: NotificationSubscriptionList UserLocationEventSubscription userLocationEventSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.4 Type: UserLocationEventSubscription UserLocationPeriodicSubscription userLocationPeriodicSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.5 Type: UserLocationPeriodicSubscription @@ -49,6 +50,13 @@ module LibHttp_JsonMessageBodyTypes { ZoneStatusSubscription zoneStatusSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.7 Type: ZoneStatusSubscription UserAreaSubscription userAreaSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.8 Type: UserAreaSubscription UserDistanceSubscription userDistanceSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.9 Type: UserDistanceSubscription + UserAreaNotification userAreaNotification, // ETSI GS MEC 013 V3.1.1 Clause 6.4.8 Type: UserAreaNotification + UserDistanceNotification userDistanceNotification, // ETSI GS MEC 013 V3.1.1 Clause 6.4.9 Type: UserDistanceNotification + UserLocationEventNotification userLocationEventNotification, // ETSI GS MEC 013 V3.1.1 Clause 6.4.4 Type: UserLocationEventNotification + UserLocationPeriodicNotification userLocationPeriodicNotification, // ETSI GS MEC 013 V3.1.1 Clause 6.4.5 Type: UserLocationPeriodicNotification + ZoneLocationEventNotification zoneLocationEventNotification, // ETSI GS MEC 013 V3.1.1 Clause 6.4.6 Type: ZoneLocationEventNotification + ZoneStatusNotification zoneStatusNotification, // ETSI GS MEC 013 V3.1.1 Clause 6.4.7 Type: ZoneStatusNotification + LocationAPI_TypesAndValues.TestNotification testNotification, // ETSI GS MEC 013 V3.1.1 Clause 6.4.3 Type: TestNotification TerminalDistance terminalDistance, LibMec_TypesAndValues.ProblemDetails problemDetails, UeIdentityTagInfo ueIdentityTagInfo, diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn index e27ee69..b504dd6 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -446,6 +446,18 @@ module LibHttp_JsonTemplates { accessPointList := p_access_point_list } // End of template mw_body_json_access_point_list + template (value) JsonBody m_body_json_access_point_info( + in template (value) AccessPointInfo p_access_point_info + ) := { + accessPointInfo := p_access_point_info + } // End of template m_body_json_access_point_info + + template (present) JsonBody mw_body_json_access_point_info( + template (present) AccessPointInfo p_access_point_info := ? + ) := { + accessPointInfo := p_access_point_info + } // End of template mw_body_json_access_point_info + template (value) JsonBody m_body_json_notification_subscription_list( in template (value) NotificationSubscriptionList p_notification_subscription_list ) := { @@ -542,6 +554,90 @@ module LibHttp_JsonTemplates { terminalDistance := p_terminal_distance } // End of template mw_body_json_terminal_distance + template (value) JsonBody m_body_json_user_area_notification( + in template (value) UserAreaNotification p_userAreaNotification + ) := { + userAreaNotification := p_userAreaNotification + } // End of template m_body_json_user_area_notification + + template (present) JsonBody mw_body_json_user_area_notification( + template (present) UserAreaNotification p_userAreaNotification := ? + ) := { + userAreaNotification := p_userAreaNotification + } // End of template mw_body_json_user_area_notification + + template (value) JsonBody m_body_json_user_distance_notification( + in template (value) UserDistanceNotification p_userDistanceNotification + ) := { + userDistanceNotification := p_userDistanceNotification + } // End of template m_body_json_user_distance_notification + + template (present) JsonBody mw_body_json_user_distance_notification( + template (present) UserDistanceNotification p_userDistanceNotification := ? + ) := { + userDistanceNotification := p_userDistanceNotification + } // End of template mw_body_json_user_distance_notification + + template (value) JsonBody m_body_json_user_location_event_notification( + in template (value) UserLocationEventNotification p_userLocationEventNotification + ) := { + userLocationEventNotification := p_userLocationEventNotification + } // End of template m_body_json_user_location_event_notification + + template (present) JsonBody mw_body_json_user_location_event_notification( + template (present) UserLocationEventNotification p_userLocationEventNotification := ? + ) := { + userLocationEventNotification := p_userLocationEventNotification + } // End of template mw_body_json_user_location_event_notification + + template (value) JsonBody m_body_json_user_location_periodic_notification( + in template (value) UserLocationPeriodicNotification p_userLocationPeriodicNotification + ) := { + userLocationPeriodicNotification := p_userLocationPeriodicNotification + } // End of template m_body_json_user_location_periodic_notification + + template (present) JsonBody mw_body_json_user_location_periodic_notification( + template (present) UserLocationPeriodicNotification p_userLocationPeriodicNotification := ? + ) := { + userLocationPeriodicNotification := p_userLocationPeriodicNotification + } // End of template mw_body_json_user_location_periodic_notification + + template (value) JsonBody m_body_json_zone_location_event_notification( + in template (value) ZoneLocationEventNotification p_zoneLocationEventNotification + ) := { + zoneLocationEventNotification := p_zoneLocationEventNotification + } // End of template m_body_json_zone_location_event_notification + + template (present) JsonBody mw_body_json_zone_location_event_notification( + template (present) ZoneLocationEventNotification p_zoneLocationEventNotification := ? + ) := { + zoneLocationEventNotification := p_zoneLocationEventNotification + } // End of template mw_body_json_zone_location_event_notification + + template (value) JsonBody m_body_json_zone_status_notification( + in template (value) ZoneStatusNotification p_zoneStatusNotification + ) := { + zoneStatusNotification := p_zoneStatusNotification + } // End of template m_body_json_zone_status_notification + + template (present) JsonBody mw_body_json_zone_status_notification( + template (present) ZoneStatusNotification p_zoneStatusNotification := ? + ) := { + zoneStatusNotification := p_zoneStatusNotification + } // End of template mw_body_json_zone_status_notification + + template (value) JsonBody m_body_json_test_notification( + in template (value) LocationAPI_TypesAndValues.TestNotification p_testNotification + ) := { + testNotification := p_testNotification + } // End of template m_body_json_test_notification + + template (present) JsonBody mw_body_json_test_notification( + template (present) LocationAPI_TypesAndValues.TestNotification p_testNotification := ? + ) := { + testNotification := p_testNotification + } // End of template mw_body_json_test_notification + } // End of group location_api group ue_identity_api { -- GitLab From 07a33b7eed8f33c68708572d96d952489bfcd3a7 Mon Sep 17 00:00:00 2001 From: garciay Date: Wed, 3 Jan 2024 15:06:10 +0100 Subject: [PATCH 42/58] TTF T027: TTCN-3 ATS MEC 013 finalized --- .../AtsMec_LocationAPI_TestCases.ttcn | 569 +++++++++++++++++- .../AtsMec_LocationAPI_TestControl.ttcn | 13 +- .../ttcn/LocationAPI_Functions.ttcn | 5 +- 3 files changed, 579 insertions(+), 8 deletions(-) diff --git a/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn index 46d16cc..e4f5762 100644 --- a/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn +++ b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn @@ -3584,7 +3584,573 @@ module AtsMec_LocationAPI_TestCases { } // End of group ueTestNot group ueZoneLook { - // TODO + + /** + * @desc Check that the IUT responds with a list zones when queried by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEZONELOOK_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ZoneSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_001_OK + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - Zone location Event + */ + testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneLocationEventNotification v_zone_location_event_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_location_event_subscription(v_zone_location_event_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "?event", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + -, + { + *, + mw_subscription( + "ZoneLocationEventSubscription", + v_zone_location_event_notification.links_.self_.href + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ZoneSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_location_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_01 + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - Zone Status + */ + testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "?status", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + -, + { + *, + mw_subscription( + "ZoneStatusSubscription", + v_zone_status_notification.links_.self_.href + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ZoneSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_status_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_02 + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - UE location Event and address + */ + testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneLocationEventNotification v_zone_location_event_notification_1, v_zone_location_event_notification_2; + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id_event_1, v_subscription_id_event_2; + var charstring v_subscription_id_status; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_location_event_subscription(v_zone_location_event_notification_1, v_subscription_id_event_1); + f_create_zone_location_event_subscription(v_zone_location_event_notification_2, v_subscription_id_event_2, PX_USER_2); + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id_status); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "?event&address=" & PX_USER_2, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + -, + { + *, + mw_subscription( + "ZoneLocationEventSubscription.", + v_zone_location_event_notification_2.links_.self_.href + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ZoneSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_location_event_subscription(v_subscription_id_event_1); + f_delete_zone_location_event_subscription(v_subscription_id_event_2); + f_delete_zone_status_subscription(v_subscription_id_status); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_03 + + /** + * @desc Check that the IUT responds with an error when inconsistent request was sent by a MEC Application - Invalid filter + */ + testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneLocationEventNotification v_zone_location_event_notification_1, v_zone_location_event_notification_2; + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id_event_1, v_subscription_id_event_2; + var charstring v_subscription_id_status; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_location_event_subscription(v_zone_location_event_notification_1, v_subscription_id_event_1); + f_create_zone_location_event_subscription(v_zone_location_event_notification_2, v_subscription_id_event_2, PX_USER_2); + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id_status); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "?event&address", // Invalid filter + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ZoneSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_location_event_subscription(v_subscription_id_event_1); + f_delete_zone_location_event_subscription(v_subscription_id_event_2); + f_delete_zone_status_subscription(v_subscription_id_status); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_BR + + /** + * @desc Check that the IUT responds with an error when inconsistent request was sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneLocationEventNotification v_zone_location_event_notification; + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id_event; + var charstring v_subscription_id_status; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_location_event_subscription(v_zone_location_event_notification, v_subscription_id_event); + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id_status); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "?event&address=" & PX_USER_2, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_location_event_subscription(v_subscription_id_event); + f_delete_zone_status_subscription(v_subscription_id_status); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_NF + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - Zone location Event + */ + testcase TC_MEC_MEC013_SRV_UEZONELOOK_003_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneLocationEventNotification v_zone_location_event_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_location_event_subscription(v_zone_location_event_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + -, + { + *, + mw_subscription( + "ZoneLocationEventSubscription.", + v_zone_location_event_notification.links_.self_.href + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct ZoneSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_location_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_003_OK_01 + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - Zone status Event + */ + testcase TC_MEC_MEC013_SRV_UEZONELOOK_003_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + -, + { + *, + mw_subscription( + "ZoneLocationEventSubscription.", + v_zone_status_notification.links_.self_.href + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct ZoneSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_status_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_003_OK_02 + + /** + * @desc Check that the IUT responds with an error when the non existing subscription is queried by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEZONELOOK_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_003_NF + } // End of group ueZoneLook group ueZoneSub { @@ -4058,7 +4624,6 @@ module AtsMec_LocationAPI_TestCases { testcase TC_MEC_MEC013_SRV_UEZONESUB_002_OK_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; var ZoneLocationEventNotification v_zone_location_event_notification; var charstring v_subscription_id; diff --git a/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn index 2a8ce72..81b4e68 100644 --- a/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn +++ b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn @@ -78,9 +78,15 @@ module AtsMec_LocationAPI_TestControl { execute(TC_MEC_MEC013_SRV_UETESTNOT_001_OK()); execute(TC_MEC_MEC013_SRV_UETESTNOT_002_OK()); - - - + execute(TC_MEC_MEC013_SRV_UEZONELOOK_001_OK()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_01()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_02()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_03()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_002_BR()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_002_NF()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_003_OK_01()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_003_OK_02()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_003_NF()); execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_01()); execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_02()); @@ -94,7 +100,6 @@ module AtsMec_LocationAPI_TestControl { execute(TC_MEC_MEC013_SRV_UEZONESUB_002_NF()); execute(TC_MEC_MEC013_SRV_UEZONESUB_003_OK()); execute(TC_MEC_MEC013_SRV_UEZONESUB_003_NF()); - } } } // End of 'control' statement diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn index 0177ba7..5823989 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn @@ -194,7 +194,8 @@ module LocationAPI_Functions { function f_create_zone_location_event_subscription( out ZoneLocationEventNotification p_zone_location_event_notification, - out charstring p_subscription_id + out charstring p_subscription_id, + in Address p_user := PX_USER ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -209,7 +210,7 @@ module LocationAPI_Functions { m_body_json_zone_location_event_subscription( m_zone_location_event_subscription( PX_CALLBACK_REF_URL, - -, + p_user, PX_ZONE_ID )))))); tc_ac.start; -- GitLab From 07baf01303f98810bd0a6677a4086431d689412b Mon Sep 17 00:00:00 2001 From: garciay Date: Fri, 5 Jan 2024 11:28:57 +0100 Subject: [PATCH 43/58] TTF T027: TTCN-3 ATS MEC 013 finalized --- .../AtsMec_UEidentityAPI_TestCases.ttcn | 75 ++++++------------- .../AtsMec_UEidentityAPI_TestControl.ttcn | 17 ++--- 2 files changed, 32 insertions(+), 60 deletions(-) diff --git a/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestCases.ttcn b/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestCases.ttcn index 9ef8643..7c4418c 100644 --- a/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestCases.ttcn +++ b/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestCases.ttcn @@ -1,5 +1,5 @@ /** - * @author ETSI / STF569 + * @author ETSI / STF569 / TTF T027 * @version $URL:$ * $ID:$ * @desc This module provides the MEC test cases. @@ -7,7 +7,7 @@ * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. - * @see ETSI GS MEC 003, ETSI GS MEC 014 V2.1.1 + * @see ETSI GS MEC 003, ETSI GS MEC 014 V3.1.1 */ module AtsMec_UEidentityAPI_TestCases { @@ -38,7 +38,6 @@ module AtsMec_UEidentityAPI_TestCases { /** * @desc Check that the IUT responds with the information on a UE Identity tag when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/UETAG/PlatUeIdentity.tplan2 */ testcase TC_MEC_MEC014_SRV_UETAG_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -61,11 +60,9 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")), + PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -78,7 +75,7 @@ module AtsMec_UEidentityAPI_TestCases { mw_body_json_ue_identity_tag_info( mw_ue_identity_tag_info( { *, mw_ue_identity_tag_item(PX_UE_IDENTITY_TAG), * } - )))))) { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a UeIdentityTag ***"); @@ -96,7 +93,6 @@ module AtsMec_UEidentityAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2 */ testcase TC_MEC_MEC014_SRV_UETAG_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -119,11 +115,9 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/invalid/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")), + PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/invalid/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -136,7 +130,7 @@ module AtsMec_UEidentityAPI_TestCases { mw_body_json_problem_details( mw_problem_details( -, -, 400 - )))))) { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); @@ -154,7 +148,6 @@ module AtsMec_UEidentityAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2 */ testcase TC_MEC_MEC014_SRV_UETAG_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -177,11 +170,9 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")), + PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -194,7 +185,7 @@ module AtsMec_UEidentityAPI_TestCases { mw_body_json_problem_details( mw_problem_details( -, -, 404 - )))))) { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); @@ -212,15 +203,14 @@ module AtsMec_UEidentityAPI_TestCases { /** * @desc Check that the IUT registers a tag (representing a UE) or a list of tags when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2 */ testcase TC_MEC_MEC014_SRV_UETAG_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_UE_IDENTITY_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_UE_IDENTITY_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -240,7 +230,7 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", + PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", v_headers, m_http_message_body_json( m_body_json_ue_identity_tag_info( @@ -251,12 +241,7 @@ module AtsMec_UEidentityAPI_TestCases { REGISTERED ) } - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -269,7 +254,7 @@ module AtsMec_UEidentityAPI_TestCases { mw_body_json_ue_identity_tag_info( mw_ue_identity_tag_info( { *, mw_ue_identity_tag_item(PX_UE_IDENTITY_TAG, REGISTERED), * } - )))))) { + )))))) { tc_ac.stop; if (f_check_user_register_state(-, v_headers) == 1) { @@ -292,7 +277,6 @@ module AtsMec_UEidentityAPI_TestCases { /** * @desc Check that the IUT responds with an error when an unauthorised request is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2 */ testcase TC_MEC_MEC014_SRV_UETAG_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -320,7 +304,7 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", + PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", v_headers, m_http_message_body_json( m_body_json_ue_identity_tag_info( @@ -331,12 +315,7 @@ module AtsMec_UEidentityAPI_TestCases { INVALID_STATE ) } - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -349,7 +328,7 @@ module AtsMec_UEidentityAPI_TestCases { mw_body_json_problem_details( mw_problem_details( -, -, 400 - ))))*/)) { + ))))*/)) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 403 Forbidden ***"); @@ -367,7 +346,6 @@ module AtsMec_UEidentityAPI_TestCases { /** * @desc Check that the IUT responds with ProblemDetails on information an invalid URI - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2 */ testcase TC_MEC_MEC014_SRV_UETAG_002_PF() runs on HttpComponent system HttpTestAdapter { // FIXME Which IE protocol should be invalid? // Local variables @@ -390,7 +368,7 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", + PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", v_headers, m_http_message_body_json( m_body_json_ue_identity_tag_info( @@ -401,12 +379,7 @@ module AtsMec_UEidentityAPI_TestCases { UNREGISTERED ) } - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -419,7 +392,7 @@ module AtsMec_UEidentityAPI_TestCases { mw_body_json_problem_details( mw_problem_details( -, -, 412 - )))))) { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 412 Precondition Failed ***"); @@ -465,7 +438,7 @@ module AtsMec_UEidentityAPI_TestCases { // httpPort.send( // m_http_request( // m_http_request_post( -// "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", +// PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", // v_headers, // m_http_message_body_json( // m_body_json_ue_identity_tag_info( @@ -543,7 +516,7 @@ module AtsMec_UEidentityAPI_TestCases { // httpPort.send( // m_http_request( // m_http_request_post( -// "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", +// PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", // v_headers, // m_http_message_body_json( // m_body_json_ue_identity_tag_info( diff --git a/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestControl.ttcn b/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestControl.ttcn index f324d06..97dcc2e 100644 --- a/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestControl.ttcn +++ b/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestControl.ttcn @@ -11,15 +11,14 @@ module AtsMec_UEidentityAPI_TestControl { control { - if (PICS_MEC_PLAT and PICS_SERVICES) { - if (PICS_UE_IDENTITY_API_SUPPORTED) { - execute(TC_MEC_MEC014_SRV_UETAG_001_OK()); - execute(TC_MEC_MEC014_SRV_UETAG_001_BR()); - execute(TC_MEC_MEC014_SRV_UETAG_001_NF()); - execute(TC_MEC_MEC014_SRV_UETAG_002_OK()); - execute(TC_MEC_MEC014_SRV_UETAG_002_BR()); - execute(TC_MEC_MEC014_SRV_UETAG_002_PF()); - } + if (PICS_MEC_PLAT and PICS_SERVICES and PICS_UE_IDENTITY_API_SUPPORTED) { + execute(TC_MEC_MEC014_SRV_UETAG_001_OK()); + execute(TC_MEC_MEC014_SRV_UETAG_001_BR()); + execute(TC_MEC_MEC014_SRV_UETAG_001_NF()); + + execute(TC_MEC_MEC014_SRV_UETAG_002_OK()); + execute(TC_MEC_MEC014_SRV_UETAG_002_BR()); + execute(TC_MEC_MEC014_SRV_UETAG_002_PF()); } } // End of 'control' statement -- GitLab From 92a6584ec85c57190686fcb1f4c3934b7c5ac2fa Mon Sep 17 00:00:00 2001 From: garciay Date: Fri, 5 Jan 2024 16:02:06 +0100 Subject: [PATCH 44/58] TTF T027: Start review MEC-028 --- .../AtsMec_WlanInformationAPI_TestCases.ttcn | 2204 +++--- ...AtsMec_WlanInformationAPI_TestControl.ttcn | 28 +- .../json/UEAppInterfaceApi.json | 1051 --- .../EdgePlatformApplicationEnablementAPI.json | 2529 ------- ttcn/LibMec/LocationAPI/json/LocationAPI.json | 4344 ----------- .../ttcn/LocationAPI_Functions.ttcn | 2 +- ttcn/LibMec/RnisAPI/json/RnisAPI.json | 6574 ----------------- .../json/BwManagementApi.json | 629 -- .../json/TrafficSteeringApi.json | 657 -- .../json/UEAppInterfaceAPI.json | 618 -- .../UEidentityAPI/json/UEidentityAPI.json | 310 - .../json/MEC030_V2XInformationService.yaml | 1568 ---- .../json/WlanInformationAPI.json | 2701 ------- .../ttcn/WlanInformationAPI_Functions.ttcn | 41 +- .../ttcn/WlanInformationAPI_Templates.ttcn | 16 + ttcn/LibMec/ttcn/LibMec_Pixits.ttcn | 54 +- 16 files changed, 1194 insertions(+), 22132 deletions(-) delete mode 100644 ttcn/LibMec/DeviceApplicationInterfaceAPI/json/UEAppInterfaceApi.json delete mode 100644 ttcn/LibMec/EdgePlatformApplicationEnablementAPI/json/EdgePlatformApplicationEnablementAPI.json delete mode 100644 ttcn/LibMec/LocationAPI/json/LocationAPI.json delete mode 100644 ttcn/LibMec/RnisAPI/json/RnisAPI.json delete mode 100644 ttcn/LibMec/TrafficManagementAPI/json/BwManagementApi.json delete mode 100644 ttcn/LibMec/TrafficManagementAPI/json/TrafficSteeringApi.json delete mode 100644 ttcn/LibMec/UEAppInterfaceAPI/json/UEAppInterfaceAPI.json delete mode 100644 ttcn/LibMec/UEidentityAPI/json/UEidentityAPI.json delete mode 100644 ttcn/LibMec/V2XInformationServiceAPI/json/MEC030_V2XInformationService.yaml delete mode 100644 ttcn/LibMec/WlanInformationAPI/json/WlanInformationAPI.json diff --git a/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn b/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn index 892b5d0..ff317d9 100644 --- a/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn +++ b/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn @@ -1,5 +1,5 @@ /** - * @author ETSI / TTF T012 + * @author ETSI / TTF T012 / TTF T027 * @version $URL:$ * $ID:$ * @desc This module provides the MEC test cases. @@ -7,7 +7,7 @@ * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. - * @see ETSI GS MEC 002, Draft ETSI GS MEC 028 V2.1.1 (2020-06) + * @see ETSI GS MEC 002, Draft ETSI GS MEC 028 V2.3.1 (2022-07) */ module AtsMec_WlanInformationAPI_TestCases { @@ -43,426 +43,227 @@ module AtsMec_WlanInformationAPI_TestCases { /** * @desc Check that the IUT responds with the list of WLAN Access Point - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ApInfo.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/ap/ap_information", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/ap/ap_information", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_ap_info_list - )))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ApInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ap_info_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ApInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_001_OK /** * @desc Check that the IUT responds with the list of WLAN Access Point filtered by the macId provided as query parameter - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ApInfo.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_002_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/ap/ap_information?filter=(eq," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/ap/ap_information?filter=(eq," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_ap_info_list - )))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ApInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ap_info_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ApInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_002_OK /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ApInfo.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_002_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/apId/ap_information?filter=(ee," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", // Invalid requery - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/apId/ap_information?filter=(ee," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", // Invalid requery + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_002_BR /** * @desc Check that the IUT responds with the list of Station Point - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/StationInfo.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_003_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/sta/sta_information", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/sta/sta_information", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_sta_info_list - )))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a StaInfo list ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_sta_info_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a StaInfo list ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_003_OK /** * @desc Check that the IUT responds with the list of Station Point filtered by the macId provided as query parameter - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/StationInfo.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_004_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/sta/sta_information?filter=(eq," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_sta_info_list - )))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a StaInfo list ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_004_OK - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/StationInfo.tplan2 - */ - testcase TC_MEC_MEC028_SRV_WAI_004_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/staId/sta_information?filter=(ee," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", // Invalid requery - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_004_BR - - /** - * @desc Check that the IUT responds with the requested list of subscription - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2 - */ - testcase TC_MEC_MEC028_SRV_WAI_005_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var AssocStaSubscription v_assoc_sta_subscription; // FIXME Use an array of 3 elements to get a list - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_wlan_subscription_link_list( - mw_subscription_link_list - ))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_assoc_sta_subscription(v_assoc_sta_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_005_OK - - /** - * @desc Check that the IUT responds with the requested list of subscription - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2 - */ - testcase TC_MEC_MEC028_SRV_WAI_006_OK() runs on HttpComponent system HttpTestAdapter { // Local variables - var AssocStaSubscription v_assoc_sta_subscription; var Headers v_headers; - var HttpMessage v_response; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration @@ -471,33 +272,27 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions?subscription_type=assoc_sta", + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/sta/sta_information?filter=(eq," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_wlan_subscription_link_list( - mw_subscription_link_list( - -, - ? - )))))) -> value v_response { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_sta_info_list + )))) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of AssocStaSubscription ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a StaInfo list ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -507,801 +302,998 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_assoc_sta_subscription(v_assoc_sta_subscription); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_006_OK + } // End of testcase TC_MEC_MEC028_SRV_WAI_004_OK /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2 */ - testcase TC_MEC_MEC028_SRV_WAI_006_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var AssocStaSubscription v_assoc_sta_subscription; - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + testcase TC_MEC_MEC028_SRV_WAI_004_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/staId/sta_information?filter=(ee," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", // Invalid requery + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/assoc_sta", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_004_BR - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; + /** + * @desc Check that the IUT responds with the requested list of subscription + */ + testcase TC_MEC_MEC028_SRV_WAI_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription, v_assoc_sta_subscription_1; + var Json.String v_subscription_id, v_subscription_id_1; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id); + f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id_1); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_wlan_subscription_link_list( + mw_subscription_link_list( + -, + { + *, + mw_subscription( + v_assoc_sta_subscription.links.self_.href, + "AssocStaSubscription" + ), + mw_subscription( + v_assoc_sta_subscription_1.links.self_.href, + "AssocStaSubscription" + ), * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_assoc_sta_subscription(v_subscription_id); + f_delete_assoc_sta_subscription(v_subscription_id_1); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_005_OK + + /** + * @desc Check that the IUT responds with the requested list of subscription when the MEC Platform is queried using a filter on subscription type + */ + testcase TC_MEC_MEC028_SRV_WAI_006_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions?subscription_type=assoc_sta", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_wlan_subscription_link_list( + mw_subscription_link_list( + -, + { + *, + mw_subscription( + v_assoc_sta_subscription.links.self_.href, + "AssocStaSubscription" + ), + * + } + )))))) { + tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of AssocStaSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_006_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC028_SRV_WAI_006_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id - // Postamble - f_delete_assoc_sta_subscription(v_assoc_sta_subscription); - f_cf_01_http_down(); + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/assoc_sta", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_006_BR /** * @desc Check that the IUT responds with an error when a request with not existing parameters is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_006_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/assoc_sta", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB, + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_006_NF - /*** - var charstring v_uri; - v_uri := regexp( - oct2char(unichar2oct(v_assoc_sta_subscription.links.self_.href)), - "?+(" & PX_ME_WLAN_URI & "?*)", - 0 - ); - ***/ - /** - * @desc Check that the IUT responds with the list of Station Point filtered by the macId provided as query parameter - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2 + * @desc Check that the IUT responds with a Notification Subscription */ testcase TC_MEC_MEC028_SRV_WAI_007_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions", - v_headers, - m_http_message_body_json( - m_body_json_assoc_sta_subscription( - m_assoc_sta_subscription( - PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, - m_ap_identity( - PX_MAC_ID - ), - -, -, -, - 10, // notificationPeriod - Table 6.3.2-1: Attributes of the AssocStaSubscription Note 2 - -, - m_time_stamp( - f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds - ))))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var Json.String v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_assoc_sta_subscription( + m_assoc_sta_subscription( + PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, + m_ap_identity( + PX_MAC_ID + ), + -, -, -, + 10, // notificationPeriod - Table 6.3.2-1: Attributes of the AssocStaSubscription Note 2 + -, + m_time_stamp( + f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_assoc_sta_subscription( - mw_assoc_sta_subscription( - PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, - -, -, -, - ? - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds to the subscription ***"); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_assoc_sta_subscription( + mw_assoc_sta_subscription( + PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, + -, -, -, + ? + )))))) -> value v_response { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_ME_WLAN_URI_SUB & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds to the subscription, SubscriptionId: ", v_subscription_id," ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_assoc_sta_subscription(v_response.response.body.json_body.assocStaSubscription); - f_cf_01_http_down(); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_007_OK /** * @desc Check that the IUT responds with an error when an invalid Subscription request is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_007_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions", - v_headers, - m_http_message_body_json( - m_body_json_assoc_sta_subscription( - m_assoc_sta_subscription_invalid( - PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, - m_ap_identity( - PX_MAC_ID - ))))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_assoc_sta_subscription( + m_assoc_sta_subscription_invalid( + PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, + m_ap_identity( + PX_MAC_ID + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_007_BR /** * @desc Check that the IUT responds with an error when a request with not existing parameters is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_007_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; + // Local variables + var Headers v_headers; - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions&filter=(eq,ap/macId,00:01:02:03:04:04)", - v_headers, - m_http_message_body_json( - m_body_json_assoc_sta_subscription( - m_assoc_sta_subscription( - PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, - m_ap_identity( - PX_MAC_ID - ))))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions&filter=(eq,ap/macId,00:01:02:03:04:04)", + v_headers, + m_http_message_body_json( + m_body_json_assoc_sta_subscription( + m_assoc_sta_subscription( + PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, + m_ap_identity( + PX_MAC_ID + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_007_NF /** * @desc Check that the IUT responds with the list of Subscription - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_008_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var AssocStaSubscription v_assoc_sta_subscription; - var Headers v_headers; - var HttpMessage v_response; - var charstring v_uri; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); - f_init_default_headers_list(-, -, v_headers); - v_uri := regexp( - oct2char(unichar2oct(v_assoc_sta_subscription.links.self_.href)), - "?+" & PX_ME_WLAN_URI & "/subscriptions/" & "(?*)", - 0 - ); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/" & v_uri, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_assoc_sta_subscription( - mw_assoc_sta_subscription( - v_assoc_sta_subscription.callbackReference, - -, - -, -, - v_assoc_sta_subscription.links - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_assoc_sta_subscription(v_assoc_sta_subscription); - f_cf_01_http_down(); + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_assoc_sta_subscription( + mw_assoc_sta_subscription( + v_assoc_sta_subscription.callbackReference, + -, + -, -, + v_assoc_sta_subscription.links + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_008_OK /** * @desc Check that the IUT responds with an error when a request for existing subscription with incorrect parameters is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_008_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var AssocStaSubscription v_assoc_sta_subscription; - var Headers v_headers; - var HttpMessage v_response; - var charstring v_uri := "unknown"; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } - // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/unknown", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/unknown", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_assoc_sta_subscription(v_assoc_sta_subscription); - f_cf_01_http_down(); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_008_NF /** * @desc Check that the IUT responds with a Notification Subscription when it is modified - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_009_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var AssocStaSubscription v_assoc_sta_subscription; - var Headers v_headers; - var HttpMessage v_response; - var charstring v_uri; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); - f_init_default_headers_list(-, -, v_headers); - v_uri := regexp( - oct2char(unichar2oct(v_assoc_sta_subscription.links.self_.href)), - "?+" & PX_ME_WLAN_URI & "/subscriptions/" & "(?*)", - 0 - ); - httpPort.send( - m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/" & v_uri, - v_headers, - m_http_message_body_json( - m_body_json_assoc_sta_subscription( - m_assoc_sta_subscription( - v_assoc_sta_subscription.callbackReference, - m_ap_identity( - PX_MAC_ID - ), - -, -, - v_assoc_sta_subscription.links, - 12, - m_time_stamp( - f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds - ))))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_assoc_sta_subscription( + m_assoc_sta_subscription( + v_assoc_sta_subscription.callbackReference, + m_ap_identity( + PX_MAC_ID + ), + -, -, + v_assoc_sta_subscription.links, + 12, + m_time_stamp( + f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_assoc_sta_subscription( - mw_assoc_sta_subscription( - v_assoc_sta_subscription.callbackReference, - ?, - -, -, - v_assoc_sta_subscription.links )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds to the AssocStatSubscription update ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_assoc_sta_subscription(v_response.response.body.json_body.assocStaSubscription); - f_cf_01_http_down(); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_assoc_sta_subscription( + mw_assoc_sta_subscription( + v_assoc_sta_subscription.callbackReference, + ?, + -, -, + v_assoc_sta_subscription.links + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds to the AssocStatSubscription update ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_009_OK /** * @desc Check that the IUT responds with an error when an invalid field is set in the subscription modification request - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_009_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var AssocStaSubscription v_assoc_sta_subscription; - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/unknown", - v_headers, - m_http_message_body_json( - m_body_json_assoc_sta_subscription( - m_assoc_sta_subscription( - v_assoc_sta_subscription.callbackReference, - m_ap_identity( - PX_MAC_ID - ), - -, -, - v_assoc_sta_subscription.links, - 12, - m_time_stamp( - f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds - ))))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_assoc_sta_subscription( + m_assoc_sta_subscription( + "", // No callback reference + m_ap_identity( + PX_MAC_ID + ), + -, -, + v_assoc_sta_subscription.links, + 12, + m_time_stamp( + f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds the correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_assoc_sta_subscription(v_assoc_sta_subscription); - f_cf_01_http_down(); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_009_BR + /** + * @desc Check that the IUT responds with an error when an unknown subscription modification request + */ + testcase TC_MEC_MEC028_SRV_WAI_009_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/unknown", + v_headers, + m_http_message_body_json( + m_body_json_assoc_sta_subscription( + m_assoc_sta_subscription( + v_assoc_sta_subscription.callbackReference, + m_ap_identity( + PX_MAC_ID + ), + -, -, + v_assoc_sta_subscription.links, + 12, + m_time_stamp( + f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds to the AssocStatSubscription update ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_009_NF + /** * @desc Check that the IUT responds with 204 when an existing subscription is correctly deleted - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_010_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var AssocStaSubscription v_assoc_sta_subscription; - var Headers v_headers; - var charstring v_uri; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); - f_init_default_headers_list(-, -, v_headers); - v_uri := regexp( - oct2char(unichar2oct(v_assoc_sta_subscription.links.self_.href)), - "?+(" & PX_ME_WLAN_URI & "?*)", - 0 - ); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & v_uri, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_010_OK /** * @desc Check that the IUT responds with an error when an not existing subscription cannot be deleted - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_010_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var AssocStaSubscription v_assoc_sta_subscription; - var Headers v_headers; - var charstring v_uri; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); - f_init_default_headers_list(-, -, v_headers); - v_uri := regexp( - oct2char(unichar2oct(v_assoc_sta_subscription.links.self_.href)), - "?+(" & PX_ME_WLAN_URI & "?*)", - 0 - ); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & v_uri & "_Invalid", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "unknown", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_assoc_sta_subscription(v_assoc_sta_subscription); - f_cf_01_http_down(); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_010_NF /** * @desc Check that the IUT sends a notification about WLAN event notification if the MEC service has an associated subscription and the event is generated - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/NotificationCallback.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_011_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var AssocStaSubscription v_assoc_sta_subscription; - var Headers v_headers; - var HttpMessage v_response; + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id; - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_notif_up(); - - // Test adapter configuration - - // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body - tc_wait.start; - alt { - [] httpPort_notif.receive( - mw_http_request( - mw_http_request_post( - -, - -, - mw_http_message_body_json( - mw_body_json_assoc_sta_subscription( - mw_assoc_sta_subscription( - PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, - -, - -, -, - ? - )))))) -> value v_response { - tc_wait.stop; - - f_init_default_headers_list(-, -, v_headers); - httpPort_notif.send( - m_http_response( - m_http_response_ok_no_body( - v_headers - ))); - log("*** " & testcasename() & ": PASS: IUT successfully sends notification ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_delete_assoc_sta_subscription(v_assoc_sta_subscription); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_assoc_sta_subscription(v_assoc_sta_subscription); - f_cf_01_http_notif_down(); + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_assoc_sta_subscription( + mw_assoc_sta_subscription( + PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, + -, + -, -, + ? + )))))) { + tc_wait.stop; + + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send( + m_http_response( + m_http_response_ok_no_body( + v_headers + ))); + log("*** " & testcasename() & ": PASS: IUT successfully sends notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_wait.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_notif_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_011_OK /** * @desc Check that the IUT responds with the list of WLAN Access Point - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_012_OK() runs on HttpComponent system HttpTestAdapter { // Local variables diff --git a/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestControl.ttcn b/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestControl.ttcn index 90b10bf..7f33626 100644 --- a/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestControl.ttcn +++ b/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestControl.ttcn @@ -11,9 +11,35 @@ module AtsMec_WlanInformationAPI_TestControl { control { - if (PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED) { + if (PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED) { execute(TC_MEC_MEC028_SRV_WAI_001_OK()); execute(TC_MEC_MEC028_SRV_WAI_002_OK()); + execute(TC_MEC_MEC028_SRV_WAI_002_BR()); + + execute(TC_MEC_MEC028_SRV_WAI_003_OK()); + execute(TC_MEC_MEC028_SRV_WAI_004_OK()); + execute(TC_MEC_MEC028_SRV_WAI_004_BR()); + + execute(TC_MEC_MEC028_SRV_WAI_005_OK()); + execute(TC_MEC_MEC028_SRV_WAI_006_OK()); + execute(TC_MEC_MEC028_SRV_WAI_006_BR()); + execute(TC_MEC_MEC028_SRV_WAI_006_NF()); + + execute(TC_MEC_MEC028_SRV_WAI_007_OK()); + execute(TC_MEC_MEC028_SRV_WAI_007_BR()); + execute(TC_MEC_MEC028_SRV_WAI_007_NF()); + + execute(TC_MEC_MEC028_SRV_WAI_008_OK()); + execute(TC_MEC_MEC028_SRV_WAI_008_NF()); + + execute(TC_MEC_MEC028_SRV_WAI_009_OK()); + execute(TC_MEC_MEC028_SRV_WAI_009_BR()); + execute(TC_MEC_MEC028_SRV_WAI_009_NF()); + + execute(TC_MEC_MEC028_SRV_WAI_010_OK()); + execute(TC_MEC_MEC028_SRV_WAI_010_NF()); + + execute(TC_MEC_MEC028_SRV_WAI_011_OK()); } } // End of 'control' statement diff --git a/ttcn/LibMec/DeviceApplicationInterfaceAPI/json/UEAppInterfaceApi.json b/ttcn/LibMec/DeviceApplicationInterfaceAPI/json/UEAppInterfaceApi.json deleted file mode 100644 index 6075bbc..0000000 --- a/ttcn/LibMec/DeviceApplicationInterfaceAPI/json/UEAppInterfaceApi.json +++ /dev/null @@ -1,1051 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "contact": { - "url": "https://forge.etsi.org/rep/mec/gs016-dev-app-api" - }, - "title": "ETSI GS MEC 016 Device application interface", - "version": "2.2.1", - "description": "The ETSI MEC ISG Device application interface API described using OpenAPI.", - "license": { - "name": "BSD-3-Clause", - "url": "https://forge.etsi.org/legal-matters" - } - }, - "externalDocs": { - "description": "ETSI GS MEC016 V2.2.1 Device application interface", - "url": "https://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/02.02.01_60/gs_MEC016v020201p.pdf" - }, - "servers": [ - { - "url": "https://localhost/dev_app/v1" - } - ], - "tags": [ - { - "name": "dev_app" - } - ], - "paths": { - "/app_list": { - "get": { - "tags": [ - "dev_app" - ], - "summary": "Get available application information.", - "description": "Used to query information about the available MEC applications.", - "operationId": "meAppListGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.appName" - }, - { - "$ref": "#/components/parameters/Query.appProvider" - }, - { - "$ref": "#/components/parameters/Query.appSoftVersion" - }, - { - "$ref": "#/components/parameters/Query.vendorId" - }, - { - "$ref": "#/components/parameters/Query.serviceCont" - } - ], - "responses": { - "200": { - "description": "The response body contains an array of the user applications available to the querying device application.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApplicationList" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - }, - "/app_contexts": { - "post": { - "tags": [ - "dev_app" - ], - "summary": "Creation of a new application context.", - "description": "Used to create a new application context. Upon success, the response contains entity body describing the created application context.", - "operationId": "devAppContextsGET", - "requestBody": { - "description": "Entity body in the request contains the Application Context as requested by the device application.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppContext" - } - } - } - }, - "parameters": [], - "responses": { - "201": { - "description": "The response body contains the Application Context as it was created by the MEC system, which includes the reference URI(s) of the associated user application instance(s). The URI of the resource created within the MEC system associated with the request, with its specific application context ID, shall be included in the 'Location' HTTP header of the response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppContext" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - }, - "callbacks": { - "notification": { - "{$request.body#/appContext.callbackReference}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification with content based on subscription type", - "operationId": "notificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InlineNotification" - }, - "example": { - "notificationType": "ApplicationContextDeleteNotification", - "contextId": "contextId123" - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - } - } - }, - "/app_contexts/{contextId}": { - "put": { - "tags": [ - "dev_app" - ], - "summary": "Updating the callbackReference and/or appLocation of an existing application context.", - "description": "Used to update the callback reference and/or application location constraints of an existing application context. Upon successful operation, the target resource is updated with the new application context information.", - "operationId": "devAppContextPUT", - "requestBody": { - "description": "Only the callbackReference and/or appLocation attribute values are allowed to be updated. Other attributes and their values shall remain untouched.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppContext" - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.contextId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - }, - "delete": { - "tags": [ - "dev_app" - ], - "summary": "Deletion of an existing application context.", - "description": "Used to delete the resource that represents the existing application context.", - "operationId": "devAppContextDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.contextId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - }, - "/obtain_app_loc_availability": { - "post": { - "tags": [ - "dev_app" - ], - "summary": "Obtain the location constraints for a new application context.", - "description": "Used to obtain the locations available for instantiation of a specific user application in the MEC system.", - "operationId": "appLocationAvailabilityPOST", - "requestBody": { - "description": "Entity body in the request contains the user application information for the MEC system to evaluate the locations available for instantiation of that application.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApplicationLocationAvailability" - } - } - } - }, - "parameters": [], - "responses": { - "200": { - "description": "The response body contains the locations available for instantiation of the requested user application in the MEC system.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApplicationLocationAvailability" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - } - }, - "components": { - "responses": { - "204": { - "description": "Upon success, a response 204 No Content without any response body is returned." - }, - "400": { - "description": "Bad Request : used to indicate that incorrect parameters were passed to the request.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized : used when the client did not submit credentials.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden : operation is not allowed given the current status of the resource.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "parameters": { - "Query.appName": { - "name": "appName", - "in": "query", - "description": "Name to identify the MEC application.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "maxLength": 32 - } - } - }, - "Query.appProvider": { - "name": "appProvider", - "in": "query", - "description": "Provider of the MEC application.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "maxLength": 32 - } - } - }, - "Query.appSoftVersion": { - "name": "appSoftVersion", - "in": "query", - "description": "Software version of the MEC application.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "maxLength": 32 - } - } - }, - "Query.vendorId": { - "name": "vendorId", - "in": "query", - "description": "Vendor identifier", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "maxLength": 32 - } - } - }, - "Query.serviceCont": { - "name": "serviceCont", - "in": "query", - "description": "Required service continuity mode for this application. Permitted values: 0 = SERVICE_CONTINUITY_NOT_REQUIRED. 1 = SERVICE_CONTINUITY_REQUIRED.", - "required": false, - "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ] - } - }, - "Path.contextId": { - "name": "contextId", - "in": "path", - "description": "Uniquely identifies the application context in the MEC system. It is assigned by the MEC system.", - "required": true, - "schema": { - "type": "string" - } - } - }, - "schemas": { - "AddressChangeNotification": { - "properties": { - "appInstanceId": { - "description": "Identifier of the user application instance.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "contextId": { - "description": "Uniquely identifies the application context in the MEC system.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "notificationType": { - "description": "Shall be set to \"AddressChangeNotification\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "referenceURI": { - "description": "Address of the user application. Used as the reference URI for the application. Assigned by the MEC system.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "URI" - } - }, - "required": [ - "notificationType", - "contextId", - "appInstanceId", - "referenceURI" - ], - "type": "object", - "x-etsi-ref": "6.4.2" - }, - "AppContext": { - "properties": { - "appAutoInstantiation": { - "description": "Provides indication to the MEC system that instantiation of the requested application is desired should a requested appLocation become available that was not at the time of the request.", - "type": "boolean", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Boolean" - }, - "appInfo": { - "description": "", - "properties": { - "appDId": { - "description": "Identifier of this MEC application descriptor. This attribute shall be globally unique. It is equivalent to the appDId defined in clause 6.2.1.2 of ETSI GS MEC 0102 [1]. It shall be present if the application is one in the ApplicationList.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "appDVersion": { - "description": "Identifies the version of the application descriptor. It is equivalent to the appDVersion defined in clause 6.2.1.2 of ETSI GS MEC 0102 [1].", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appDescription": { - "description": "Human readable description of the MEC application. The length of the value shall not exceed 128 characters.", - "type": "string", - "maxLength": 128, - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "appName": { - "description": "Name of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appProvider": { - "description": "Provider of the MEC application.\nThe length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appSoftVersion": { - "description": "Software version of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "appPackageSource": { - "description": "URI of the application package.\nIncluded 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 0102 [1].", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "userAppInstanceInfo": { - "description": "List of user application instance information.", - "items": { - "type": "object", - "properties": { - "appInstanceId": { - "description": "Identifier of the user application instance. It shall only be included in the response.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "appLocation": { - "$ref": "#/components/schemas/LocationConstraints" - }, - "referenceURI": { - "description": "Address of the user application instance. It shall only be included in the response.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - } - } - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "array (Structure inlined)" - } - }, - "required": [ - "appName", - "appProvider", - "appDVersion", - "userAppInstanceInfo" - ], - "type": "object", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "appLocationUpdates": { - "description": "Used by the device application to request to receive notifications at the callbackReference URI relating to location availability for user application instantiation.", - "type": "boolean", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Boolean" - }, - "associateDevAppId": { - "description": "Uniquely identifies the device application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "callbackReference": { - "description": "URI assigned by the device application to receive application lifecycle related notifications. Inclusion in the request implies the client supports the pub/sub mechanism and is capable of receiving notifications. This endpoint shall be maintained for the lifetime of the application context.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "contextId": { - "description": "Uniquely identifies the application context in the MEC system. Assigned by the MEC system and shall be present other than in a create request. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "associateDevAppId", - "appInfo" - ], - "type": "object", - "x-etsi-notes": "NOTE 1:\tIf a value of the attribute is included in the request, the same value shall be included in the response.\nNOTE 2:\tThe design of the current operation with callback reference assumes no web proxy between the entity that originates the notification and the entity that receives it.\nNOTE 3:\tThe language support for the application description may be limited.\nNOTE 4:\tAttribute appLocationUpdates and appAutoInstantiation shall not both be set to TRUE.", - "x-etsi-ref": "6.2.3" - }, - "ApplicationContextDeleteNotification": { - "properties": { - "contextId": { - "description": "Uniquely identifies the application context that has been deleted from the MEC system.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "notificationType": { - "description": "Shall be set to \"ApplicationContextDeleteNotification\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "notificationType", - "contextId" - ], - "type": "object", - "x-etsi-ref": "6.4.3" - }, - "ApplicationContextUpdateNotification": { - "properties": { - "contextId": { - "description": "Uniquely identifies the application context in the MEC system.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "notificationType": { - "description": "Shall be set to \"ApplicationContextUpdateNotification\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "userAppInstanceInfo": { - "description": "List of user application instance information.", - "items": { - "type": "object", - "properties": { - "appInstanceId": { - "description": "Identifier of the user application instance.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appLocation": { - "$ref": "#/components/schemas/LocationConstraints" - }, - "referenceURI": { - "description": "Address of the user application instance.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "URI" - } - } - }, - "minItems": 1, - "required": [ - "appInstanceId", - "referenceURI" - ], - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "array (Structure inlined)" - } - }, - "type": "object", - "required": [ - "notificationType", - "contextId", - "userAppInstanceInfo" - ], - "x-etsi-ref": "6.4.4" - }, - "ApplicationList": { - "properties": { - "appList": { - "description": "List of user applications available to the device application. As defined below.", - "items": { - "type": "object", - "properties": { - "appInfo": { - "description": "", - "properties": { - "appCharcs": { - "description": "Characteristics of the application. As defined below. The application characteristics relate to the system resources consumed by the application. A device application can use this information e.g. for estimating the cost of use of the application or for the expected user experience.", - "properties": { - "bandwidth": { - "description": "The required connection bandwidth in kbit/s for the use of the MEC application instance. ", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "uint32" - }, - "latency": { - "description": "The target round trip time in milliseconds supported by the MEC system for the MEC application instance.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "uint32" - }, - "memory": { - "description": "The maximum size in Mbytes of the memory resource expected to be used by the MEC application instance in the MEC system.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "uint32" - }, - "serviceCont": { - "description": "Required service continuity mode for this application. Permitted values: 0 = SERVICE_CONTINUITY_NOT_REQUIRED. 1 = SERVICE_CONTINUITY_REQUIRED.", - "enum": [ - 0, - 1 - ], - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Enum" - }, - "storage": { - "description": "The maximum size in Mbytes of the storage resource expected to be used by the MEC application instance in the MEC system.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "uint32" - } - }, - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "appDId": { - "description": "Identifier of this MEC application descriptor. It is equivalent to the appDId defined in clause 6.2.1.2 of ETSI GS MEC 0102 [1]. This attribute shall be globally unique.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appDVersion": { - "description": "Identifies the version of the application descriptor. It is equivalent to the appDVersion defined in clause 6.2.1.2 of ETSI GS MEC 0102 [1].", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appDescription": { - "description": "Human readable description of the MEC application (see note 2).", - "type": "string", - "maxLength": 128, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appLocation": { - "description": "Identifies the locations of the MEC application.", - "items": { - "$ref": "#/components/schemas/LocationConstraints" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "LocationConstraints" - }, - "appName": { - "description": "Name of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appProvider": { - "description": "Provider of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appSoftVersion": { - "description": "Software version of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "appDId", - "appName", - "appProvider", - "appSoftVersion", - "appDVersion", - "appDescription" - ], - "type": "object", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "vendorSpecificExt": { - "description": "Extension for vendor specific information (see note 1).", - "properties": { - "vendorId": { - "description": "Vendor identifier. The length of the value shall not exceed 32 characters. The rest of the structure of vendor specific extension is not defined.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "vendorId" - ], - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - } - } - }, - "minItems": 0, - "required": [ - "appInfo" - ], - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Array (Structure (inlined))" - } - }, - "type": "object", - "x-etsi-notes": "NOTE 1:\tThe vendor specific extension allows submitting information on the application lists that have been made available to the device application of the corresponding vendor.\nNOTE 2:\tThe language support may be limited. The length of the value shall not exceed 128 characters.", - "x-etsi-ref": "6.2.2" - }, - "ApplicationLocationAvailability": { - "properties": { - "appInfo": { - "description": "", - "properties": { - "appDVersion": { - "description": "Identifies the version of the application descriptor. It is equivalent to the appDVersion defined in clause 6.2.1.2 of ETSI GS MEC 0102 [1].", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appDescription": { - "description": "Human readable description of the MEC application. The length of the value shall not exceed 128 characters.", - "type": "string", - "maxLength": 128, - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "appName": { - "description": "Name of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appPackageSource": { - "description": "URI of the application package. Shall be included in the request. The application package shall comply with the definitions in clause 6.2.1.2 of ETSI GS MEC 0102 [1].", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "appProvider": { - "description": "Provider of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appSoftVersion": { - "description": "Software version of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "availableLocations": { - "description": "MEC application location constraints. ", - "items": { - "type": "object", - "properties": { - "appLocation": { - "$ref": "#/components/schemas/LocationConstraints" - } - } - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "array (Structure (inline))" - } - }, - "required": [ - "appName", - "appProvider", - "appDVersion" - ], - "type": "object", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "associateDevAppId": { - "description": "Uniquely identifies the device application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "associateDevAppId", - "appInfo" - ], - "type": "object", - "x-etsi-ref": "6.2.4" - }, - "ApplicationLocationAvailabilityNotification": { - "properties": { - "availableLocations": { - "description": "Locations available to the MEC application.", - "items": { - "type": "object", - "properties": { - "appLocation": { - "$ref": "#/components/schemas/LocationConstraints" - } - } - }, - "minItems": 1, - "required": [ - "appLocation" - ], - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "array (Structure (inline))" - }, - "contextId": { - "description": "Uniquely identifies the application context in the MEC system.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "notificationType": { - "description": "Shall be set to \"ApplicationLocationAvailabilityNotification\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "type": "object", - "required": [ - "notificationType", - "availableLocations" - ], - "x-etsi-ref": "6.4.5" - }, - "InlineNotification": { - "oneOf": [ - { - "$ref": "#/components/schemas/AddressChangeNotification" - }, - { - "$ref": "#/components/schemas/ApplicationContextDeleteNotification" - }, - { - "$ref": "#/components/schemas/ApplicationContextUpdateNotification" - }, - { - "$ref": "#/components/schemas/ApplicationLocationAvailabilityNotification" - } - ], - "discriminator": { - "propertyName": "notificationType" - } - }, - "LocationConstraints": { - "properties": { - "area": { - "$ref": "#/components/schemas/Polygon" - }, - "civicAddressElement": { - "description": "Zero or more elements comprising the civic address. Shall be absent if the \"area\" attribute is present.", - "items": { - "type": "object", - "properties": { - "caType": { - "description": "Describe the content type of caValue. The value of caType shall comply with section 3.4 of IETF RFC 4776 [6]. ", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "caValue": { - "description": "Content of civic address element corresponding to the caType. The format caValue shall comply with section 3.4 of IETF RFC 4776 [6].", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - } - }, - "minItems": 0, - "required": [ - "caType", - "caValue" - ], - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "array (Structure inlined)" - }, - "countryCode": { - "description": "The two-letter ISO 3166 [7] country code in capital letters. Shall be present in case the \"area\" attribute is absent. May be absent if the \"area\" attribute is present (see note).", - "type": "string", - "maxLength": 2, - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - } - }, - "type": "object", - "x-etsi-notes": "NOTE:\tIf both \"countryCode\" and \"area\" are present, no conflicts should exist between the values of these two attributes. In case of conflicts, the API producer (e.g. MEO, MEAO) shall disregard parts of the geographic area signalled by \"area\" that are outside the boundaries of the country signalled by \"countryCode\". If \"countryCode\" is absent, it is solely the \"area\" attribute that defines the location constraint.", - "x-etsi-ref": "6.5.2" - }, - "Polygon": { - "properties": { - "coordinates": { - "items": { - "items": { - "items": { - "type": "number", - "format": "float" - }, - "type": "array" - }, - "type": "array" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "array" - } - }, - "type": "object" - }, - "ProblemDetails": { - "properties": { - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "instance": { - "description": "A URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "status": { - "description": "The HTTP status code for this occurrence of the problem", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "title": { - "description": "A short, human-readable summary of the problem type", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "type": { - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - } - }, - "type": "object" - } - } - } -} diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/json/EdgePlatformApplicationEnablementAPI.json b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/json/EdgePlatformApplicationEnablementAPI.json deleted file mode 100644 index e6a3904..0000000 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/json/EdgePlatformApplicationEnablementAPI.json +++ /dev/null @@ -1,2529 +0,0 @@ -{ - "openapi": "3.0.2", - "servers": [ - { - "url": "http://127.0.0.1:8081/mp1/v1" - }, - { - "url": "https://127.0.0.1:8081/mp1/v1" - } - ], - "info": { - "title": "Mp1 API", - "version": "1.1.1", - "description": "The ETSI MEC ISG MEC011 Application Enablement 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 MEC011 Application Enablement API, V1.1.1", - "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/01.01.01_60/gs_mec011v010101p.pdf" - }, - "tags": [ - { - "name": "trafficRules" - }, - { - "name": "dnsRules" - }, - { - "name": "subscriptions" - }, - { - "name": "services" - }, - { - "name": "timing" - }, - { - "name": "transports" - }, - { - "name": "callbacks" - } - ], - "paths": { - "/applications/{appInstanceId}/dns_rules": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AppInstanceId" - } - ], - "get": { - "description": "This method retrieves information about all the DNS rules associated with a mobile edge application instance.", - "operationId": "ApplicationsDnsRules_GET", - "tags": [ - "trafficRules" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsDnsRules.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - }, - "/applications/{appInstanceId}/dns_rules/{dnsRuleId}": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AppInstanceId" - }, - { - "$ref": "#/components/parameters/Path.DnsRuleId" - } - ], - "get": { - "description": "This method retrieves information about a DNS rule associated with a mobile edge application instance.", - "operationId": "ApplicationsDnsRule_GET", - "tags": [ - "dnsRules" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsDnsRule.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "put": { - "description": "This method activates, de-activates or updates a traffic rule.", - "operationId": "ApplicationsDnsRule_PUT", - "tags": [ - "dnsRules" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsDnsRule.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - }, - "412": { - "$ref": "#/components/responses/Error.412" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/ApplicationsDnsRule" - } - } - }, - "/applications/{appInstanceId}/subscriptions": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AppInstanceId" - } - ], - "get": { - "description": "The GET method may be used to request information about all subscriptions for this requestor. Upon success, the response contains entity body with all the subscriptions for the requestor.", - "operationId": "ApplicationsSubscriptions_GET", - "tags": [ - "subscriptions" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsSubscriptions.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "post": { - "description": "The POST method may be used to create a new subscription. One example use case is to create a new subscription to the mobile edge service availability notifications. Upon success, the response contains entity body describing the created subscription.", - "operationId": "ApplicationsSubscriptions_POST", - "tags": [ - "subscriptions" - ], - "responses": { - "201": { - "$ref": "#/components/responses/ApplicationsSubscriptions.201" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/ApplicationsSubscriptions" - }, - "callbacks": { - "appTerminationNotification": { - "$ref": "#/components/callbacks/AppTerminationNotification" - }, - "serviceAvailabilityNotification": { - "$ref": "#/components/callbacks/ServiceAvailabilityNotification" - } - } - } - }, - "/applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AppInstanceId" - }, - { - "$ref": "#/components/parameters/Path.SubscriptionType" - }, - { - "$ref": "#/components/parameters/Path.SubscriptionId" - } - ], - "get": { - "description": "The GET method requests information about a subscription for this requestor. Upon success, the response contains entity body with the subscription for the requestor.", - "operationId": "ApplicationsSubscription_GET", - "tags": [ - "subscriptions" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsSubscription.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "delete": { - "description": "This method deletes a meMp1Subscription. This method is typically used in \"Unsubscribing from service availability event notifications\" procedure.", - "operationId": "ApplicationsSubscription_DELETE", - "tags": [ - "subscriptions" - ], - "responses": { - "204": { - "description": "No Content" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - }, - "/applications/{appInstanceId}/traffic_rules": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AppInstanceId" - } - ], - "get": { - "description": "This method retrieves information about all the traffic rules associated with a mobile edge application instance.", - "operationId": "ApplicationsTrafficRules_GET", - "tags": [ - "trafficRules" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsTrafficRules.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - }, - "/applications/{appInstanceId}/traffic_rules/{trafficRuleId}": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AppInstanceId" - }, - { - "$ref": "#/components/parameters/Path.TrafficRuleId" - } - ], - "get": { - "description": "This method retrieves information about all the traffic rules associated with a mobile edge application instance.", - "operationId": "ApplicationsTrafficRule_GET", - "tags": [ - "trafficRules" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsTrafficRule.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "put": { - "description": "This method retrieves information about all the traffic rules associated with a mobile edge application instance.", - "operationId": "ApplicationsTrafficRule_PUT", - "tags": [ - "trafficRules" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsTrafficRule.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - }, - "412": { - "$ref": "#/components/responses/Error.412" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/ApplicationsTrafficRule" - } - } - }, - "/services": { - "get": { - "description": "This method retrieves information about a list of meService resources. This method is typically used in \"service availability query\" procedure", - "operationId": "Services_GET", - "tags": [ - "services" - ], - "parameters": [ - { - "$ref": "#/components/parameters/Query.Ser_instance_id" - }, - { - "$ref": "#/components/parameters/Query.Ser_name" - }, - { - "$ref": "#/components/parameters/Query.Ser_category_id" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/Services.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "post": { - "description": "This method is used to create a meService resource. This method is typically used in \"service availability update and new service registration\" procedure", - "operationId": "Services_POST", - "tags": [ - "services" - ], - "responses": { - "201": { - "$ref": "#/components/responses/Services.201" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/Services.Post" - } - } - }, - "/services/{serviceId}": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.ServiceId" - } - ], - "get": { - "description": "This method retrieves information about a meService resource. This method is typically used in \"service availability query\" procedure", - "operationId": "ServicesServiceId_GET", - "tags": [ - "services" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ServicesServiceId.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "put": { - "description": "This method updates the information about a meService resource", - "operationId": "ServicesServiceId_PUT", - "tags": [ - "services" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ServicesServiceId.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - }, - "412": { - "$ref": "#/components/responses/Error.412" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/ServicesServiceId" - } - } - }, - "/timing/current_time": { - "get": { - "description": "This method retrieves the information of the platform's current time which corresponds to the get platform time procedure", - "operationId": "TimingCurrentTime_GET", - "tags": [ - "timing" - ], - "responses": { - "200": { - "$ref": "#/components/responses/TimingCurrentTime.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - }, - "/timing/timing_caps": { - "get": { - "description": "This method retrieves the information of the platform's timing capabilities which corresponds to the timing capabilities query", - "operationId": "TimingCaps_GET", - "tags": [ - "timing" - ], - "responses": { - "200": { - "$ref": "#/components/responses/TimingCaps.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - }, - "/transports": { - "get": { - "description": "This method retrieves information about a list of available transports. This method is typically used by a service-producing application to discover transports provided by the mobile edge platform in the \"transport information query\" procedure", - "operationId": "Transports_GET", - "tags": [ - "transports" - ], - "responses": { - "200": { - "$ref": "#/components/responses/Transports.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - } - }, - "components": { - "schemas": { - "Empty": { - "description": "Empty schema" - }, - "AppTerminationNotification.MaxGracefulTimeout": { - "description": "Maximum timeout value in seconds for graceful termination or graceful stop of an application instance.", - "type": "integer", - "format": "uint32", - "example": 10 - }, - "AppTerminationNotification.NotificationType": { - "description": "Shall be set to AppTerminationNotification.", - "type": "string", - "example": "AppTerminationNotification" - }, - "AppTerminationNotification": { - "description": "This type represents the information that the mobile edge platform notifies the subscribed application instance about the corresponding application instance termination/stop.", - "type": "object", - "required": [ - "notificationType", - "maxGracefulTimeout", - "_links" - ], - "properties": { - "notificationType": { - "$ref": "#/components/schemas/AppTerminationNotification.NotificationType" - }, - "maxGracefulTimeout": { - "$ref": "#/components/schemas/AppTerminationNotification.MaxGracefulTimeout" - }, - "_links": { - "$ref": "#/components/schemas/Subscription" - } - } - }, - "AppTerminationNotificationSubscription.AppInstanceId": { - "description": "It is used as the filtering criterion for the subscribed events.", - "type": "string", - "example": "ID1" - }, - "AppTerminationNotificationSubscription.CallbackReference": { - "description": "URI selected by the mobile edge application instance to receive notifications on the subscribed mobile edge application instance management information. This shall be included in both the request and the response.", - "type": "string", - "format": "uri" - }, - "AppTerminationNotificationSubscription": { - "description": "This type represents the information that the mobile edge platform notifies the subscribed application instance about the corresponding application instance termination/stop.", - "type": "object", - "required": [ - "subscriptionType", - "callbackReference", - "_links", - "appInstanceId" - ], - "properties": { - "subscriptionType": { - "$ref": "#/components/schemas/AppTerminationNotificationSubscription.SubscriptionType" - }, - "callbackReference": { - "$ref": "#/components/schemas/AppTerminationNotificationSubscription.CallbackReference" - }, - "_links": { - "$ref": "#/components/schemas/Self" - }, - "appInstanceId": { - "$ref": "#/components/schemas/AppTerminationNotificationSubscription.AppInstanceId" - } - } - }, - "AppTerminationNotificationSubscription.SubscriptionType": { - "description": "Shall be set to AppTerminationNotificationSubscription.", - "type": "string", - "example": "AppTerminationNotificationSubscription" - }, - "CategoryRef.Href": { - "description": "Reference of the catalogue", - "type": "string", - "example": "catItem1" - }, - "CategoryRef.Id": { - "description": "Unique identifier of the category", - "type": "string", - "example": "id12345" - }, - "CategoryRef.Name": { - "description": "Name of the category", - "type": "string", - "example": "RNI" - }, - "CategoryRef.Version": { - "description": "Category version", - "type": "string", - "example": "version1" - }, - "CategoryRef": { - "description": "This type represents the category reference", - "type": "object", - "required": [ - "href", - "id", - "name", - "version" - ], - "properties": { - "href": { - "$ref": "#/components/schemas/CategoryRef.Href" - }, - "id": { - "$ref": "#/components/schemas/CategoryRef.Id" - }, - "name": { - "$ref": "#/components/schemas/CategoryRef.Name" - }, - "version": { - "$ref": "#/components/schemas/CategoryRef.Version" - } - } - }, - "CurrentTime": { - "description": "This type represents the information provided by the mobile edge platform in response to the Get Platform Time Request message.", - "type": "object", - "required": [ - "nanoSeconds", - "seconds", - "timeSourceStatus" - ], - "properties": { - "seconds": { - "type": "integer", - "format": "uint32", - "description": "The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "example": 1577836800 - }, - "nanoSeconds": { - "type": "integer", - "format": "uint32", - "description": "The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "example": 0 - }, - "timeSourceStatus": { - "type": "string", - "enum": [ - "TRACEABLE", - "NONTRACEABLE" - ], - "description": "Platform Time Source status. 1 = TRACEABLE - time source is locked to the UTC time source. 2 = NONTRACEABLE - time source is not locked to the UTC time source", - "example": "TRACEABLE" - } - } - }, - "DestinationInterface.InterfaceType": { - "description": "Type of the interface", - "type": "string", - "enum": [ - "TUNNEL", - "MAC", - "IP" - ], - "example": "TUNNEL" - }, - "DestinationInterface.IpAddress": { - "description": "IP address of the remote destination", - "type": "string", - "example": "192.0.2.0" - }, - "DestinationInterface.MacAddress": { - "description": "Source address identifies the MAC address of the interface", - "type": "string", - "example": "02-00-00-00-00-00" - }, - "DestinationInterface": { - "description": "This type represents the destination interface.", - "type": "object", - "required": [ - "interfaceType" - ], - "properties": { - "interfaceType": { - "$ref": "#/components/schemas/DestinationInterface.InterfaceType" - }, - "tunnelInfo": { - "$ref": "#/components/schemas/TunnelInfo" - }, - "srcMacAddress": { - "$ref": "#/components/schemas/DestinationInterface.MacAddress" - }, - "dstMacAddress": { - "$ref": "#/components/schemas/DestinationInterface.MacAddress" - }, - "dstIpAddress": { - "$ref": "#/components/schemas/DestinationInterface.IpAddress" - } - } - }, - "DnsRule.DomainName": { - "description": "FQDN resolved by the DNS rule", - "type": "string", - "example": "www.example.com" - }, - "DnsRule.Id": { - "description": "Identifies the DNS Rule", - "type": "string", - "example": "dnsRule1" - }, - "DnsRule.IpAddress": { - "description": "IP address associated with the FQDN resolved by the DNS rule", - "type": "string", - "example": "192.0.2.0" - }, - "DnsRule.IpAddressType": { - "description": "IP address type", - "type": "string", - "enum": [ - "IP_V6", - "IP_V4" - ], - "example": "IP_V6" - }, - "DnsRule.State": { - "description": "DNS rule state", - "type": "string", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "example": "ACTIVE" - }, - "DnsRule.Ttl": { - "description": "Time to live value", - "type": "integer", - "format": "uint32", - "example": "?" - }, - "DnsRule": { - "description": "This type represents the general information of a DNS rule.", - "type": "object", - "required": [ - "dnsRuleId", - "domainName", - "ipAddressType", - "ipAddress", - "state" - ], - "properties": { - "dnsRuleId": { - "$ref": "#/components/schemas/DnsRule.Id" - }, - "domainName": { - "$ref": "#/components/schemas/DnsRule.DomainName" - }, - "ipAddressType": { - "$ref": "#/components/schemas/DnsRule.IpAddressType" - }, - "ipAddress": { - "$ref": "#/components/schemas/DnsRule.IpAddress" - }, - "ttl": { - "$ref": "#/components/schemas/DnsRule.Ttl" - }, - "state": { - "$ref": "#/components/schemas/DnsRule.State" - } - } - }, - "EndPointInfo.Address.Host": { - "description": "Host portion of the address", - "type": "string", - "example": "192.0.2.0" - }, - "EndPointInfo.Address_Port": { - "description": "Port portion of the address", - "type": "integer", - "format": "uint32", - "example": 8080 - }, - "EndPointInfo.Address": { - "description": "A IP address and port pair", - "type": "object", - "required": [ - "host", - "port" - ], - "properties": { - "host": { - "$ref": "#/components/schemas/EndPointInfo.Address.Host" - }, - "port": { - "$ref": "#/components/schemas/EndPointInfo.Address_Port" - } - } - }, - "EndPointInfo.Addresses": { - "description": "Entry point information of the service as one or more pairs of IP address and port", - "type": "object", - "required": [ - "addresses" - ], - "properties": { - "addresses": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/EndPointInfo.Address" - } - } - } - }, - "EndPointInfo.Alternative": { - "description": "Entry point information of the service in a format defined by an implementation, or in an external specification.", - "type": "object", - "required": [ - "alternative" - ], - "properties": { - "alternative": { - "type": "object" - } - } - }, - "EndPointInfo.Uri": { - "description": "Entry point information of the service", - "type": "string", - "format": "uri", - "example": "/meMp1/service/EntryPoint" - }, - "EndPointInfo.Uris": { - "description": "Entry point information of the service as string, formatted according to URI syntax", - "type": "object", - "required": [ - "uris" - ], - "properties": { - "uris": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/EndPointInfo.Uri" - } - } - } - }, - "LinkType": { - "description": "This type represents a type of link and may be referenced from data structures", - "type": "object", - "properties": { - "href": { - "$ref": "#/components/schemas/Href" - } - } - }, - "Href": { - "description": "URI referring to a resource", - "type": "string", - "format": "uri", - "example": "/meMp1/example" - }, - "Mp1SubscriptionLinkList.Links": { - "description": "Self-referring URI.", - "type": "object", - "required": [ - "self" - ], - "properties": { - "self": { - "$ref": "#/components/schemas/LinkType" - }, - "subscription": { - "description": "Subscription list", - "type": "array", - "items": { - "$ref": "#/components/schemas/Mp1SubscriptionLinkList.Subscription" - } - } - } - }, - "Mp1SubscriptionLinkList.Subscription": { - "description": "A link to a subscription.", - "type": "object", - "required": [ - "href", - "rel" - ], - "properties": { - "href": { - "$ref": "#/components/schemas/Href" - }, - "rel": { - "description": "The values are as defined in the \"subscriptionType\" attribute for each different Mp1 event subscription data type.", - "type": "string", - "enum": [ - "AppTerminationNotificationSubscription", - "SerAvailabilityNotificationSubscription" - ] - } - } - }, - "Mp1SubscriptionLinkList": { - "description": "This type represents a list of links related to currently existing subscriptions for a mobile edge application instance. This information is returned when sending a request to receive current subscriptions.", - "type": "object", - "required": [ - "_links" - ], - "properties": { - "_links": { - "$ref": "#/components/schemas/Mp1SubscriptionLinkList.Links" - } - } - }, - "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.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" - }, - "Problem.status": { - "type": "integer", - "format": "uint32", - "description": "The HTTP status code for this occurrence of the problem" - }, - "Problem.title": { - "type": "string", - "description": "A short, human-readable summary of the problem type" - }, - "Problem.type": { - "type": "string", - "format": "uri", - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type" - }, - "SecurityInfo.OAuth2Info.GrantTypes": { - "description": "List of supported OAuth 2.0 grant types", - "type": "string", - "enum": [ - "OAUTH2_AUTHORIZATION_CODE", - "OAUTH2_IMPLICIT_GRANT", - "OAUTH2_RESOURCE_OWNER", - "OAUTH2_CLIENT_CREDENTIALS" - ], - "example": "OAUTH2_CLIENT_CREDENTIALS" - }, - "SecurityInfo.OAuth2Info.TokenEndpoint": { - "description": "The token endpoint", - "type": "string", - "format": "uri", - "example": "/meMp1/security/TokenEndPoint" - }, - "SecurityInfo.OAuth2Info": { - "description": "Parameters related to use of OAuth 2.0", - "required": [ - "grantTypes", - "tokenEndpoint" - ], - "properties": { - "grantTypes": { - "description": "List of supported OAuth 2.0 grant types.", - "type": "array", - "minItems": 1, - "maxItems": 4, - "items": { - "$ref": "#/components/schemas/SecurityInfo.OAuth2Info.GrantTypes" - } - }, - "tokenEndpoint": { - "$ref": "#/components/schemas/SecurityInfo.OAuth2Info.TokenEndpoint" - } - }, - "type": "object" - }, - "SecurityInfo": { - "description": "This type represents security information related to a transport", - "type": "object", - "properties": { - "oAuth2Info": { - "$ref": "#/components/schemas/SecurityInfo.OAuth2Info" - } - } - }, - "Self": { - "description": "Self-referring URI.", - "type": "object", - "required": [ - "self" - ], - "properties": { - "self": { - "$ref": "#/components/schemas/LinkType" - } - }, - "readOnly": true - }, - "SerAvailabilityNotificationSubscription.CallbackReference": { - "description": "URI selected by the mobile edge application instance to receive notifications on the subscribed mobile edge service availability information. This shall be included in both the request and the response.", - "type": "string", - "format": "uri" - }, - "SerAvailabilityNotificationSubscription": { - "description": "This type represents a subscription to the notifications from the mobile edge platform regarding the availability of a mobile edge service or a list of mobile edge services.", - "type": "object", - "required": [ - "subscriptionType", - "callbackReference", - "_links", - "filteringCriteria" - ], - "properties": { - "subscriptionType": { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription.SubscriptionType" - }, - "callbackReference": { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription.CallbackReference" - }, - "_links": { - "$ref": "#/components/schemas/Self" - }, - "filteringCriteria": { - "$ref": "#/components/schemas/ServiceInfo" - } - } - }, - "SerAvailabilityNotificationSubscription.SubscriptionType": { - "description": "Shall be set to SerAvailabilityNotificationSubscription.", - "type": "string", - "example": "SerAvailabilityNotificationSubscription" - }, - "ServiceAvailabilityNotification": { - "description": "This type represents the service availability information.", - "type": "object", - "required": [ - "notificationType", - "services", - "_links" - ], - "properties": { - "notificationType": { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription.SubscriptionType" - }, - "services": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ServiceInfo" - } - }, - "_links": { - "$ref": "#/components/schemas/Subscription" - } - } - }, - "SerializerTypes": { - "description": "The enumeration SerializerTypes represents types of serializers", - "type": "string", - "enum": [ - "JSON", - "XML", - "PROTOBUF3" - ], - "example": "JSON" - }, - "ServiceInfo.SerInstanceId": { - "description": "Identifier of the service instance assigned by the MEPM / mobile edge platform.", - "type": "string", - "readOnly": true, - "example": "ServiceInstance123" - }, - "ServiceInfo.SerName": { - "description": "The name of the service. This is how the service producing mobile edge application identifies the service instance it produces.", - "type": "string", - "example": "ExampleService" - }, - "ServiceInfo.State": { - "description": "Contains the state", - "type": "string", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "example": "ACTIVE" - }, - "ServiceInfo.TransportId": { - "description": "Identifier of the platform-provided transport to be used by the service. Valid identifiers may be obtained using the \"Transport information query\" procedure. May be present in POST requests to signal the use of a platform-provided transport for the service, and shall be absent otherwise.", - "type": "string", - "writeOnly": true, - "example": "Rest1" - }, - "ServiceInfo.Version": { - "description": "Service version", - "type": "string", - "example": "ServiceVersion1" - }, - "ServiceInfo.Post": { - "description": "This type represents the general information of a mobile edge service.", - "type": "object", - "required": [ - "serName", - "version", - "state", - "serializer" - ], - "oneOf": [ - { - "required": [ - "transportId" - ] - }, - { - "required": [ - "transportInfo" - ] - } - ], - "properties": { - "serInstanceId": { - "$ref": "#/components/schemas/ServiceInfo.SerInstanceId" - }, - "serName": { - "$ref": "#/components/schemas/ServiceInfo.SerName" - }, - "serCategory": { - "$ref": "#/components/schemas/CategoryRef" - }, - "version": { - "$ref": "#/components/schemas/ServiceInfo.Version" - }, - "state": { - "$ref": "#/components/schemas/ServiceInfo.State" - }, - "transportId": { - "$ref": "#/components/schemas/ServiceInfo.TransportId" - }, - "transportInfo": { - "$ref": "#/components/schemas/TransportInfo" - }, - "serializer": { - "$ref": "#/components/schemas/SerializerTypes" - } - } - }, - "ServiceInfo": { - "description": "This type represents the general information of a mobile edge service.", - "type": "object", - "required": [ - "serName", - "version", - "state", - "transportInfo", - "serializer" - ], - "properties": { - "serInstanceId": { - "$ref": "#/components/schemas/ServiceInfo.SerInstanceId" - }, - "serName": { - "$ref": "#/components/schemas/ServiceInfo.SerName" - }, - "serCategory": { - "$ref": "#/components/schemas/CategoryRef" - }, - "version": { - "$ref": "#/components/schemas/ServiceInfo.Version" - }, - "state": { - "$ref": "#/components/schemas/ServiceInfo.State" - }, - "transportInfo": { - "$ref": "#/components/schemas/TransportInfo" - }, - "serializer": { - "$ref": "#/components/schemas/SerializerTypes" - } - } - }, - "Subscription": { - "description": "A link to the related subscription", - "type": "object", - "required": [ - "subscription" - ], - "properties": { - "subscription": { - "$ref": "#/components/schemas/LinkType" - } - } - }, - "TimingCaps.NtpServers.AuthenticationKeyNum": { - "description": "Authentication key number", - "type": "integer", - "format": "uint32", - "example": 1 - }, - "TimingCaps.NtpServers.AuthenticationOption": { - "description": "NTP authentication option", - "type": "string", - "enum": [ - "NONE", - "SYMMETRIC_KEY", - "AUTO_KEY" - ], - "example": "NONE" - }, - "TimingCaps.NtpServers.DelayReqMaxRate": { - "description": "Acceptable maximum rate of the Delay_Req messages in packets per second", - "type": "integer", - "format": "uint32", - "example": 10 - }, - "TimingCaps.NtpServers.LocalPriority": { - "description": "NTP server local priority", - "type": "integer", - "format": "uint32", - "example": 1 - }, - "TimingCaps.NtpServers.MaxPollingInterval": { - "description": "Maximum poll interval for NTP messages, in seconds as a power of two. Range 3...17", - "type": "integer", - "format": "uint32", - "example": 17 - }, - "TimingCaps.NtpServers.MinPollingInterval": { - "description": "Minimum poll interval for NTP messages, in seconds as a power of two. Range 3...17", - "type": "integer", - "format": "uint32", - "example": 3 - }, - "TimingCaps.NtpServers.NtpServerAddr": { - "description": "NTP server address", - "type": "string", - "example": "192.0.2.0" - }, - "TimingCaps.NtpServers.NtpServerAddrType": { - "description": "Address type of NTP server", - "type": "string", - "enum": [ - "IP_ADDRESS", - "DNS_NAME" - ], - "example": "IP_ADDRESS" - }, - "TimingCaps.NtpServers_PtpMasterIpAddress": { - "description": "PTP Master IP Address", - "type": "string", - "example": "192.0.2.0" - }, - "TimingCaps.NtpServers_PtpMasterLocalPriority": { - "description": "PTP Master local priority", - "type": "integer", - "format": "uint32", - "example": 1 - }, - "TimingCaps.NtpServers": { - "description": "NTP server detail.", - "type": "object", - "required": [ - "ntpServerAddrType", - "ntpServerAddr", - "minPollingInterval", - "maxPollingInterval", - "localPriority", - "authenticationOption", - "authenticationKeyNum" - ], - "properties": { - "ntpServerAddrType": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.NtpServerAddrType" - }, - "ntpServerAddr": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.NtpServerAddr" - }, - "minPollingInterval": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.MinPollingInterval" - }, - "maxPollingInterval": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.MaxPollingInterval" - }, - "localPriority": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.LocalPriority" - }, - "authenticationOption": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.AuthenticationOption" - }, - "authenticationKeyNum": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.AuthenticationKeyNum" - } - } - }, - "TimingCaps_PtpMasters": { - "description": "NTP server detail.", - "type": "object", - "required": [ - "ptpMasterIpAddress", - "ptpMasterLocalPriority", - "delayReqMaxRate" - ], - "properties": { - "ptpMasterIpAddress": { - "$ref": "#/components/schemas/TimingCaps.NtpServers_PtpMasterIpAddress" - }, - "ptpMasterLocalPriority": { - "$ref": "#/components/schemas/TimingCaps.NtpServers_PtpMasterLocalPriority" - }, - "delayReqMaxRate": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.DelayReqMaxRate" - } - } - }, - "TimingCaps.TimeStamp": { - "description": "time", - "type": "object", - "required": [ - "nanoSeconds", - "seconds" - ], - "properties": { - "seconds": { - "type": "integer", - "format": "uint32", - "description": "The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "example": 1577836800 - }, - "nanoSeconds": { - "type": "integer", - "format": "uint32", - "description": "The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "example": 0 - } - } - }, - "TimingCaps": { - "description": "This type represents the information provided by the mobile edge platform in response to the Timing capabilities Query message.", - "type": "object", - "properties": { - "timeStamp": { - "$ref": "#/components/schemas/TimingCaps.TimeStamp" - }, - "ntpServers": { - "description": "Available NTP servers", - "type": "array", - "items": { - "$ref": "#/components/schemas/TimingCaps.NtpServers" - } - }, - "ptpMasters": { - "description": "Available PTP Masters", - "type": "array", - "items": { - "$ref": "#/components/schemas/TimingCaps_PtpMasters" - } - } - } - }, - "TrafficFilter.Address": { - "description": "Identify the traffic ip address.", - "type": "string", - "example": "192.168.1.1" - }, - "TrafficFilter.DSCP": { - "description": "Used to match all IPv4 packets that have the same Differentiated Services Code Point (DSCP)", - "type": "integer", - "format": "uint32", - "example": 0 - }, - "TrafficFilter.Port": { - "description": "A port", - "type": "string", - "example": "8080" - }, - "TrafficFilter.Protocol": { - "description": "Protocol of the traffic filter", - "type": "string", - "example": "?" - }, - "TrafficFilter.QCI": { - "description": "Used to match all packets that have the same Quality Class Indicator (QCI).", - "type": "integer", - "format": "uint32", - "example": 1 - }, - "TrafficFilter.TC": { - "description": "Used to match all IPv6 packets that have the same Traffic Class.", - "type": "integer", - "format": "uint32", - "example": 1 - }, - "TrafficFilter.Token": { - "description": "Used for token based traffic rule", - "type": "string", - "example": "?" - }, - "TrafficFilter.TunnelAddress": { - "description": "Used for GTP tunnel based traffic rule", - "type": "string", - "example": "?" - }, - "TrafficFilter.TunnelPort": { - "description": "Used for GTP tunnel based traffic rule", - "type": "string", - "example": "?" - }, - "TrafficFilter": { - "description": "This type represents the traffic filter.", - "type": "object", - "properties": { - "srcAddress": { - "description": "An IP address or a range of IP address. For IPv4, the IP address could be an IP address plus mask, or an individual IP address, or a range of IP addresses. For IPv6, the IP address could be an IP prefix, or a range of IP prefixes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.Address" - } - }, - "dstAddress": { - "description": "An IP address or a range of IP address. For IPv4, the IP address could be an IP address plus mask, or an individual IP address, or a range of IP addresses. For IPv6, the IP address could be an IP prefix, or a range of IP prefixes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.Address" - } - }, - "srcPort": { - "description": "A port or a range of ports", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.Port" - } - }, - "dstPort": { - "description": "A port or a range of ports", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.Port" - } - }, - "protocol": { - "description": "Specify the protocol of the traffic filter", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.Protocol" - } - }, - "token": { - "description": "Used for token based traffic rule", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.Token" - } - }, - "srcTunnelAddress": { - "description": "Used for GTP tunnel based traffic rule", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.TunnelAddress" - } - }, - "tgtTunnelAddress": { - "description": "Used for GTP tunnel based traffic rule", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.TunnelAddress" - } - }, - "srcTunnelPort": { - "description": "Used for GTP tunnel based traffic rule", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.TunnelPort" - } - }, - "dstTunnelPort": { - "description": "Used for GTP tunnel based traffic rule", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.TunnelPort" - } - }, - "qCI": { - "$ref": "#/components/schemas/TrafficFilter.QCI" - }, - "dSCP": { - "$ref": "#/components/schemas/TrafficFilter.DSCP" - }, - "tC": { - "$ref": "#/components/schemas/TrafficFilter.TC" - } - } - }, - "TrafficRule.Action": { - "description": "The action of the ME host data plane when a packet matches the trafficFilter", - "type": "string", - "enum": [ - "DROP", - "FORWARD_DECAPSULATED", - "FORWARD_AS_IS", - "PASSTHROUGH", - "DUPLICATE_DECAPSULATED", - "DUPLICATE_AS_IS" - ], - "example": "DROP" - }, - "TrafficRule.FilterType": { - "description": "Definition of filter per FLOW or PACKET. If flow the filter match UE->EPC packet and the reverse packet is handled in the same context", - "type": "string", - "enum": [ - "FLOW", - "PACKET" - ], - "example": "FLOW" - }, - "TrafficRule.Id": { - "description": "Identify the traffic rule.", - "type": "string", - "example": "TrafficRule1" - }, - "TrafficRule_Priority": { - "description": "Priority of this traffic rule. If traffic rule conflicts, the one with higher priority take precedence", - "type": "integer", - "format": "uint32", - "example": 1 - }, - "TrafficRule.State": { - "description": "Contains the traffic rule state", - "type": "string", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "example": "ACTIVE" - }, - "TrafficRule": { - "description": "This type represents the general information of a traffic rule.", - "type": "object", - "required": [ - "trafficRuleId", - "filterType", - "priority", - "trafficFilter", - "action", - "state" - ], - "properties": { - "trafficRuleId": { - "$ref": "#/components/schemas/TrafficRule.Id" - }, - "filterType": { - "$ref": "#/components/schemas/TrafficRule.FilterType" - }, - "priority": { - "$ref": "#/components/schemas/TrafficRule_Priority" - }, - "trafficFilter": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter" - } - }, - "action": { - "$ref": "#/components/schemas/TrafficRule.Action" - }, - "dstInterface": { - "$ref": "#/components/schemas/DestinationInterface" - }, - "state": { - "$ref": "#/components/schemas/TrafficRule.State" - } - } - }, - "TransportInfo.Description": { - "description": "Human-readable description of this transport", - "type": "string", - "example": "REST API" - }, - "TransportInfo.Id": { - "description": "The identifier of this transport", - "type": "string", - "example": "TransId12345" - }, - "TransportInfo.ImplSpecificInfo": { - "description": "Additional implementation specific details of the transport", - "type": "object" - }, - "TransportInfo.Name": { - "description": "The name of this transport", - "type": "string", - "example": "REST" - }, - "TransportInfo.Protocol": { - "description": "The name of the protocol used. Shall be set to HTTP for a REST API.", - "type": "string", - "example": "HTTP" - }, - "TransportInfo.Version": { - "description": "The version of the protocol used", - "type": "string", - "example": "2.0" - }, - "TransportInfo": { - "description": "This type represents the general information of a mobile edge service.", - "type": "object", - "required": [ - "id", - "name", - "type", - "protocol", - "version", - "endpoint", - "security" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/TransportInfo.Id" - }, - "name": { - "$ref": "#/components/schemas/TransportInfo.Name" - }, - "description": { - "$ref": "#/components/schemas/TransportInfo.Description" - }, - "type": { - "$ref": "#/components/schemas/TransportTypes" - }, - "protocol": { - "$ref": "#/components/schemas/TransportInfo.Protocol" - }, - "version": { - "$ref": "#/components/schemas/TransportInfo.Version" - }, - "endpoint": { - "description": "This type represents information about a transport endpoint", - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/EndPointInfo.Uris" - }, - { - "$ref": "#/components/schemas/EndPointInfo.Addresses" - }, - { - "$ref": "#/components/schemas/EndPointInfo.Alternative" - } - ] - }, - "security": { - "$ref": "#/components/schemas/SecurityInfo" - }, - "implSpecificInfo": { - "$ref": "#/components/schemas/TransportInfo.ImplSpecificInfo" - } - } - }, - "TransportTypes": { - "description": "The enumeration TransportTypes represents types of transports", - "type": "string", - "enum": [ - "REST_HTTP", - "MB_TOPIC_BASED", - "MB_ROUTING", - "MB_PUBSUB", - "RPC", - "RPC_STREAMING", - "WEBSOCKET" - ], - "example": "REST_HTTP" - }, - "TunnelInfo.TunnelDstAddress": { - "description": "Destination address of the tunnel", - "type": "string", - "example": "?" - }, - "TunnelInfo.TunnelSrcAddress": { - "description": "Source address of the tunnel", - "type": "string", - "example": "?" - }, - "TunnelInfo.TunnelType": { - "description": "This type represents the tunnel information.", - "type": "string", - "enum": [ - "GTP_U", - "GRE" - ], - "example": "GTP_U" - }, - "TunnelInfo": { - "description": "This type represents the tunnel information.", - "type": "object", - "required": [ - "tunnelType" - ], - "properties": { - "tunnelType": { - "$ref": "#/components/schemas/TunnelInfo.TunnelType" - }, - "tunnelDstAddress": { - "$ref": "#/components/schemas/TunnelInfo.TunnelDstAddress" - }, - "tunnelSrcAddress": { - "$ref": "#/components/schemas/TunnelInfo.TunnelSrcAddress" - } - } - } - }, - "parameters": { - "Path.AppInstanceId": { - "name": "appInstanceId", - "description": "Represents a mobile edge application instance. Note that the appInstanceId is allocated by the mobile edge platform manager.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - "Path.DnsRuleId": { - "name": "dnsRuleId", - "description": "Represents a DNS rule.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - "Path.SubscriptionId": { - "name": "subscriptionId", - "description": "Represents a subscription to the notifications from the mobile edge platform.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - "Path.SubscriptionType": { - "name": "subscriptionType", - "description": "Represents a subscription type to the notifications from the mobile edge platform.", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "AppTerminationNotificationSubscription", - "SerAvailabilityNotificationSubscription" - ] - } - }, - "Path.ServiceId": { - "name": "serviceId", - "description": "Represents a mobile edge service instance.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - "Path.TrafficRuleId": { - "name": "trafficRuleId", - "description": "Represents a traffic rule.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - "Query.Ser_category_id": { - "name": "ser_category_id", - "description": "A mobile edge application instance may use ser_category_id as an input parameter to query the availability of a list of mobile edge service instances in a serCategory. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present.", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - "Query.Ser_instance_id": { - "name": "ser_instance_id", - "description": "A mobile edge application instance may use multiple ser_instance_ids as an input parameter to query the availability of a list of mobile edge service instances. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present.", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.Ser_name": { - "name": "ser_name", - "description": "A mobile edge application instance may use multiple ser_names as an input parameter to query the availability of a list of mobile edge service instances. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present.", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "responses": { - "ApplicationsDnsRules.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/DnsRule" - } - }, - "examples": { - "DnsRules": { - "$ref": "#/components/examples/DnsRules" - } - } - } - }, - "links": { - "getIndividualMeDNSRule": { - "$ref": "#/components/links/GetIndividualMeDNSRule" - }, - "putIndividualMeDNSRule": { - "$ref": "#/components/links/PutIndividualMeDNSRule" - } - } - }, - "ApplicationsDnsRule.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DnsRule" - }, - "examples": { - "DnsRule": { - "$ref": "#/components/examples/DnsRule" - } - } - } - } - }, - "ApplicationsSubscriptions.200": { - "description": "Upon success, a response body containing the list of links to the requested subscriptions is returned.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Mp1SubscriptionLinkList" - } - } - }, - "links": { - "getIndividualMeMp1SubscriptionLinkList": { - "$ref": "#/components/links/GetIndividualMeMp1SubscriptionLinkList" - }, - "delIndividualMeMp1SubscriptionLinkList": { - "$ref": "#/components/links/DelIndividualMeMp1SubscriptionLinkList" - } - } - }, - "ApplicationsSubscriptions.201": { - "description": "Entity body in the request contains a subscription to the mobile edge service availability notifications that is to be created.", - "headers": { - "location": { - "description": "The resource URI of the created resource", - "schema": { - "type": "string", - "format": "uri" - } - } - }, - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/AppTerminationNotificationSubscription" - }, - { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription" - } - ] - } - } - }, - "links": { - "getIndividualMeMp1Subscription": { - "$ref": "#/components/links/GetIndividualMeMp1Subscription" - }, - "delIndividualMeMp1Subscription": { - "$ref": "#/components/links/DelIndividualMeMp1Subscription" - } - } - }, - "ApplicationsSubscription.200": { - "description": "Upon success, a response body containing the requested subscription is returned.", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/AppTerminationNotificationSubscription" - }, - { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription" - } - ] - } - } - } - }, - "ApplicationsTrafficRules.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/TrafficRule" - } - }, - "examples": { - "TrafficRules": { - "$ref": "#/components/examples/TrafficRules" - } - } - } - }, - "links": { - "getIndividualMeTrafficRule": { - "$ref": "#/components/links/GetIndividualMeTrafficRule" - }, - "putIndividualMeTrafficRule": { - "$ref": "#/components/links/PutIndividualMeTrafficRule" - } - } - }, - "ApplicationsTrafficRule.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TrafficRule" - }, - "examples": { - "TrafficRule": { - "$ref": "#/components/examples/TrafficRule" - } - } - } - } - }, - "Services.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/ServiceInfo" - } - }, - "examples": { - "ServiceInfoList": { - "$ref": "#/components/examples/ServiceInfoList" - } - } - } - }, - "links": { - "getIndividualMeService": { - "$ref": "#/components/links/GetIndividualMeService" - }, - "putIndividualMeService": { - "$ref": "#/components/links/PutIndividualMeService" - } - } - }, - "Services.201": { - "description": "Upon success, the HTTP response shall include a Location HTTP header that contains the resource URI of the created resource.", - "headers": { - "location": { - "description": "The resource URI of the created resource", - "schema": { - "type": "string", - "format": "uri" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServiceInfo" - }, - "examples": { - "ServiceInfo": { - "$ref": "#/components/examples/ServiceInfo" - } - } - } - }, - "links": { - "getIndividualMeService": { - "$ref": "#/components/links/GetIndividualMeService" - }, - "putIndividualMeService": { - "$ref": "#/components/links/PutIndividualMeService" - } - } - }, - "ServicesServiceId.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServiceInfo" - }, - "examples": { - "ServiceInfo": { - "$ref": "#/components/examples/ServiceInfo" - } - } - } - } - }, - "TimingCurrentTime.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CurrentTime" - } - } - } - }, - "TimingCaps.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TimingCaps" - } - } - } - }, - "Transports.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/TransportInfo" - } - } - } - }, - "links": { - "getTransportInfo": { - "$ref": "#/components/links/GetTransportInfo" - } - } - }, - "Error.400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - }, - "Error.403": { - "description": "Forbidden", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "Error.404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - }, - "Error.412": { - "description": "Precondition Failed", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - } - }, - "requestBodies": { - "ApplicationsDnsRule": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DnsRule" - } - } - }, - "description": "The updated state is included in the entity body of the request.", - "required": true - }, - "ApplicationsSubscriptions": { - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/AppTerminationNotificationSubscription" - }, - { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription" - } - ] - } - } - }, - "description": "Entity body in the request contains a subscription to the mobile edge application termination notifications that is to be created.", - "required": true - }, - "ApplicationsTrafficRule": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TrafficRule" - } - } - }, - "description": "One or more updated attributes that are allowed to be changed", - "required": true - }, - "Services": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServiceInfo" - } - } - }, - "description": "New ServiceInfo with updated \"state\" is included as entity body of the request", - "required": true - }, - "Services.Post": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServiceInfo.Post" - } - } - }, - "description": "New ServiceInfo with updated \"state\" is included as entity body of the request", - "required": true - }, - "ServicesServiceId": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServiceInfo" - } - } - }, - "description": "New ServiceInfo with updated \"state\" is included as entity body of the request", - "required": true - }, - "AppTerminationNotification": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppTerminationNotification" - } - } - } - }, - "ServiceAvailabilityNotification": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServiceAvailabilityNotification" - } - } - } - } - }, - "callbacks": { - "AppTerminationNotification": { - "{$request.body#/callbackReference}": { - "post": { - "description": "Represents the information that the MEP notifies the subscribed application instance about the corresponding application instance termination/stop", - "operationId": "AppTerminationNotification_POST", - "tags": [ - "callback" - ], - "requestBody": { - "$ref": "#/components/requestBodies/AppTerminationNotification" - }, - "responses": { - "200": { - "description": "Expected responses from callback consumer, if it accepts the callback" - } - } - } - } - }, - "ServiceAvailabilityNotification": { - "{$request.body#/callbackReference}": { - "post": { - "description": "'Represents the service availability information that is used in the following cases - when the MEC platform announces the newly available\n services to the authorized relevant MEC applications (e.g. \n the applications that indicate the services as \"optional\" \n or \"required\") that are subscribed to the corresponding \n service availability notifications\n- when the MEC platform notifies the authorized relevant applications that are subscribed to the corresponding service availability notifications about the service availability changes.'", - "operationId": "ServiceAvailabilityNotification_POST", - "tags": [ - "callback" - ], - "requestBody": { - "$ref": "#/components/requestBodies/ServiceAvailabilityNotification" - }, - "responses": { - "200": { - "description": "Expected responses from callback consumer, if it accepts the callback" - } - } - } - } - } - }, - "links": { - "GetIndividualMeService": { - "operationId": "ServicesServiceId_GET", - "description": "The `serviceId` value returned in the response can be used as the `serviceId` parameter in `GET /services/{serviceId}`", - "parameters": { - "serviceId": "$response.body#/serviceId" - } - }, - "PutIndividualMeService": { - "operationId": "ServicesServiceId_PUT", - "description": "The `serviceId` value returned in the response can be used as the `serviceId` parameter in `PUT /services/{serviceId}`", - "parameters": { - "serviceId": "$response.body#/serviceId" - } - }, - "GetIndividualMeDNSRule": { - "operationId": "ApplicationsDnsRule_GET", - "description": "The `dnsRuleId` value returned in the response can be used as the `dnsRuleId` parameter in `GET /applications/{appInstanceId}/dns_rules/{dnsRuleId}`", - "parameters": { - "dnsRuleId": "$response.body#/dnsRuleId" - } - }, - "PutIndividualMeDNSRule": { - "operationId": "ApplicationsDnsRule_PUT", - "description": "The `dnsRuleId` value returned in the response can be used as the `dnsRuleId` parameter in `PUT /applications/{appInstanceId}/dns_rules/{dnsRuleId}`", - "parameters": { - "dnsRuleId": "$response.body#/dnsRuleId" - } - }, - "GetIndividualMeTrafficRule": { - "operationId": "ApplicationsTrafficRule_GET", - "description": "The `trafficRuleId` value returned in the response can be used as the `trafficRuleId` parameter in `GET /applications/{appInstanceId}/traffic_rules/{trafficRuleId}`", - "parameters": { - "trafficRuleId": "$response.body#/trafficRuleId" - } - }, - "PutIndividualMeTrafficRule": { - "operationId": "ApplicationsTrafficRule_PUT", - "description": "The `trafficRuleId` value returned in the response can be used as the `trafficRuleId` parameter in `PUT /applications/{appInstanceId}/traffic_rules/{trafficRuleId}`", - "parameters": { - "trafficRuleId": "$response.body#/trafficRuleId" - } - }, - "GetTransportInfo": { - "operationId": "AppServices_POST", - "description": "The `id` value returned in the response can be used as the `transportId` parameter in `POST /applications/{appInstanceId}/services`. The first transport is provided as the link as wildcards are not supported", - "parameters": { - "transportId": "$response.body#/0/id" - } - }, - "GetIndividualMeMp1Subscription": { - "operationId": "ApplicationsSubscription_GET", - "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}`", - "parameters": { - "description": "regex = \\/mp1\\/v1\\/applications\\/.*\\/subscriptions\\/.*\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", - "subscriptionId": "TBC" - } - }, - "DelIndividualMeMp1Subscription": { - "operationId": "ApplicationsSubscription_DELETE", - "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `DELETE /applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}`", - "parameters": { - "description": "regex = \\/mp1\\/v1\\/applications\\/.*\\/subscriptions\\/.*\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", - "subscriptionId": "TBC" - } - }, - "GetIndividualMeMp1SubscriptionLinkList": { - "operationId": "ApplicationsSubscription_GET", - "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}`", - "parameters": { - "description": "regex = \\/mp1\\/v1\\/applications\\/.*\\/subscriptions\\/.*\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", - "subscriptionId": "TBC" - } - }, - "DelIndividualMeMp1SubscriptionLinkList": { - "operationId": "ApplicationsSubscription_DELETE", - "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `DELETE /applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}`", - "parameters": { - "description": "regex = \\/mp1\\/v1\\/applications\\/.*\\/subscriptions\\/.*\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", - "subscriptionId": "TBC" - } - } - }, - "examples": { - "DnsRule": { - "value": { - "dnsRuleId": "DnsRule1", - "domainName": "www.example.com", - "ipAddressType": "IP_V4", - "ipAddress": "146.241.7.3", - "ttl": 300, - "state": "ACTIVE" - } - }, - "DnsRules": { - "value": [ - { - "dnsRuleId": "DnsRule1", - "domainName": "www.example.com", - "ipAddressType": "IP_V4", - "ipAddress": "146.241.7.3", - "ttl": 300, - "state": "ACTIVE" - } - ] - }, - "ServiceInfo": { - "value": { - "serInstanceId": "ServiceInstance123", - "serName": "ExampleService", - "serCategory": { - "href": "catItem1", - "id": "id12345", - "name": "RNI", - "version": "version1" - }, - "version": "ServiceVersion1", - "state": "ACTIVE", - "transportInfo": { - "id": "TransId12345", - "name": "REST", - "description": "REST API", - "type": "REST_HTTP", - "protocol": "HTTP", - "version": "2.0", - "endpoint": { - "uris": [ - "/meMp1/service/EntryPoint" - ] - }, - "security": { - "oAuth2Info": { - "grantTypes": [ - "OAUTH2_CLIENT_CREDENTIALS" - ], - "tokenEndpoint": "/meMp1/security/TokenEndPoint" - } - } - }, - "serializer": "JSON" - } - }, - "ServiceInfoList": { - "value": [ - { - "serInstanceId": "ServiceInstance123", - "serName": "ExampleService", - "serCategory": { - "href": "catItem1", - "id": "id12345", - "name": "RNI", - "version": "version1" - }, - "version": "ServiceVersion1", - "state": "ACTIVE", - "transportInfo": { - "id": "TransId12345", - "name": "REST", - "description": "REST API", - "type": "REST_HTTP", - "protocol": "HTTP", - "version": "2.0", - "endpoint": { - "addresses": [ - { - "host": "192.0.2.0", - "port": 8080 - } - ] - }, - "security": { - "oAuth2Info": { - "grantTypes": [ - "OAUTH2_CLIENT_CREDENTIALS" - ], - "tokenEndpoint": "/meMp1/security/TokenEndPoint" - } - } - }, - "serializer": "JSON" - } - ] - }, - "TrafficRule": { - "value": { - "trafficRuleId": "TrafficRule123", - "serName": "ExampleService", - "filterType": "FLOW", - "priority": 1, - "trafficFilter": [ - { - "srcAddress": [ - "192.168.2.0/24", - "192.168.3.0/24" - ], - "dstAddress": [ - "192.127.4.100/32" - ], - "dstPort": [ - "80" - ] - } - ], - "action": "FORWARD_DECAPSULATED", - "dstInterface": { - "interfaceType": "IP", - "dstIpAddress": "20.1.1.1" - }, - "state": "ACTIVE" - } - }, - "TrafficRules": { - "value": [ - { - "trafficRuleId": "TrafficRule123", - "serName": "ExampleService", - "filterType": "FLOW", - "priority": 1, - "trafficFilter": [ - { - "srcAddress": [ - "192.168.2.0/24", - "192.168.3.0/24" - ], - "dstAddress": [ - "192.127.4.100/32" - ], - "dstPort": [ - "80" - ] - } - ], - "action": "FORWARD_DECAPSULATED", - "dstInterface": { - "interfaceType": "IP", - "dstIpAddress": "20.1.1.1" - }, - "state": "ACTIVE" - } - ] - } - } - } -} \ No newline at end of file diff --git a/ttcn/LibMec/LocationAPI/json/LocationAPI.json b/ttcn/LibMec/LocationAPI/json/LocationAPI.json deleted file mode 100644 index 5a483d7..0000000 --- a/ttcn/LibMec/LocationAPI/json/LocationAPI.json +++ /dev/null @@ -1,4344 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "contact": { - "url": "https://forge.etsi.org/rep/mec/gs013-location-api" - }, - "title": "ETSI GS MEC 013 - Location API", - "version": "2.1.1", - "description": "The ETSI MEC ISG MEC013 Location API described using OpenAPI.", - "license": { - "name": "BSD-3-Clause", - "url": "https://forge.etsi.org/legal-matters" - } - }, - "externalDocs": { - "description": "ETSI MEC013 V2.1.1 Location API", - "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/013/02.01.01_60/gs_mec013v020101p.pdf" - }, - "servers": [ - { - "url": "https://localhost/location/v2" - } - ], - "tags": [ - { - "name": "location" - } - ], - "paths": { - "/queries/distance": { - "get": { - "tags": [ - "location" - ], - "summary": "UE Distance Lookup of a specific UE", - "description": "UE Distance Lookup between terminals or a terminal and a location", - "operationId": "distanceGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.Requester" - }, - { - "$ref": "#/components/parameters/Query.AddressMandatory" - }, - { - "$ref": "#/components/parameters/Query.Latitude" - }, - { - "$ref": "#/components/parameters/Query.Longitude" - } - ], - "responses": { - "200": { - "description": "Successful response to a distance request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "terminalDistance": { - "$ref": "#/components/schemas/TerminalDistance" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "queries" - } - }, - "/queries/users": { - "get": { - "tags": [ - "location" - ], - "summary": "UE Location Lookup of a specific UE or group of UEs", - "description": "UE Location Lookup of a specific UE or group of UEs", - "operationId": "usersGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.ZoneId" - }, - { - "$ref": "#/components/parameters/Query.AccessPointId" - }, - { - "$ref": "#/components/parameters/Query.Address" - } - ], - "responses": { - "200": { - "description": "Successful response to users request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userList": { - "$ref": "#/components/schemas/UserList" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "queries" - } - }, - "/queries/zones": { - "get": { - "tags": [ - "location" - ], - "summary": "Zones information Lookup", - "description": "Used to get a list of identifiers for zones authorized for use by the application.", - "operationId": "zonesGET", - "responses": { - "200": { - "description": "Successful response to zones request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zoneList": { - "$ref": "#/components/schemas/ZoneList" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "queries" - } - }, - "/queries/zones/{zoneId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Zones information Lookup", - "description": "Used to get the information for an authorized zone for use by the application.", - "operationId": "zonesGetById", - "parameters": [ - { - "$ref": "#/components/parameters/Path.ZoneId" - } - ], - "responses": { - "200": { - "description": "Successful response to an access point Id request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zoneInfo": { - "$ref": "#/components/schemas/ZoneInfo" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "queries" - } - }, - "/queries/zones/{zoneId}/accessPoints": { - "get": { - "tags": [ - "location" - ], - "summary": "Radio Node Location Lookup", - "description": "Radio Node Location Lookup to retrieve a list of radio nodes associated to a zone.", - "operationId": "apGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.ZoneId" - }, - { - "$ref": "#/components/parameters/Query.InterestRealm" - } - ], - "responses": { - "200": { - "description": "Successful response to an access point Id request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "accessPointList": { - "$ref": "#/components/schemas/AccessPointList" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "queries" - } - }, - "/queries/zones/{zoneId}/accessPoints/{accessPointId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Radio Node Location Lookup", - "description": "Radio Node Location Lookup to retrieve a radio node associated to a zone.", - "operationId": "apByIdGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.ZoneId" - }, - { - "$ref": "#/components/parameters/Path.AccessPointId" - } - ], - "responses": { - "200": { - "description": "Successful response to an access point Id request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "accessPointInfo": { - "$ref": "#/components/schemas/AccessPointInfo" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "queries" - } - }, - "/subscriptions/area/circle": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieves all active subscriptions to area change notifications", - "description": "This operation is used for retrieving all active subscriptions to area change notifications.", - "operationId": "areaCircleSubListGET", - "responses": { - "200": { - "description": "Response to retrieve area subscriptions", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "notificationSubscriptionList" - ], - "properties": { - "notificationSubscriptionList": { - "$ref": "#/components/schemas/NotificationSubscriptionList" - } - }, - "example": { - "notificationSubscriptionList": { - "circleNotificationSubscription": [ - { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "checkImmediate": true, - "enteringLeavingCriteria": "Entering", - "frequency": 10, - "latitude": -80.88, - "longitude": 41.277, - "radius": 500, - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/area/circle/subscription123" - } - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/area/circle" - } - } - } - } - } - } - } - }, - "post": { - "tags": [ - "location" - ], - "summary": "Creates a subscription for area change notification", - "description": "Creates a subscription to the Location Service for an area change notification.", - "operationId": "areaCircleSubPOST", - "requestBody": { - "description": "Subscription to be created", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "circleNotificationSubscription": { - "$ref": "#/components/schemas/CircleNotificationSubscription" - } - }, - "example": { - "circleNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "checkImmediate": true, - "enteringLeavingCriteria": "Entering", - "frequency": 10, - "latitude": -80.88, - "longitude": 41.277, - "radius": 500, - "trackingAccuracy": 10 - } - } - } - } - } - }, - "responses": { - "201": { - "description": "Successful subscription", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "circleNotificationSubscription": { - "$ref": "#/components/schemas/CircleNotificationSubscription" - } - }, - "example": { - "circleNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "checkImmediate": true, - "enteringLeavingCriteria": "Entering", - "frequency": 10, - "latitude": -80.88, - "longitude": 41.277, - "radius": 500, - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/area/circle/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "callbacks": { - "notification": { - "{$request.body#/circleNotificationSubscription.callbackReference.notifyURL}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification from Location service, content based on subscription type", - "operationId": "circleNotificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "subscriptionNotification": { - "$ref": "#/components/schemas/SubscriptionNotification" - } - }, - "example": { - "subscriptionNotification": { - "enteringLeavingCriteria": "Entering", - "isFinalNotification": "false,", - "link": { - "rel": "CircleNotificationSubscription", - "href": "http://meAppServer.example.com/location/v2/subscriptions/area/circle/sub123" - }, - "terminalLocation": { - "address": "acr:10.0.0.1", - "currentLocation": { - "accuracy": 100, - "altitude": 1001, - "latitude": -80.86302, - "longitude": 41.277306, - "timestamp": { - "seconds": 1483231138, - "nanoSeconds\"": 0 - } - }, - "locationRetrievalStatus": "Retrieved" - } - } - } - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/area/circle/{subscriptionId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieve subscription information", - "description": "Get subscription information.", - "operationId": "areaCircleSubGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "circleNotificationSubscription" - ], - "properties": { - "circleNotificationSubscription": { - "$ref": "#/components/schemas/CircleNotificationSubscription" - } - }, - "example": { - "circleNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "checkImmediate": true, - "enteringLeavingCriteria": "Entering", - "frequency": 10, - "latitude": -80.88, - "longitude": 41.277, - "radius": 500, - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/area/circle/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "put": { - "tags": [ - "location" - ], - "summary": "Updates a subscription information", - "description": "Updates a subscription.", - "operationId": "areaCircleSubPUT", - "requestBody": { - "description": "Subscription to be modified", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "circleNotificationSubscription": { - "$ref": "#/components/schemas/CircleNotificationSubscription" - } - }, - "example": { - "circleNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "checkImmediate": true, - "enteringLeavingCriteria": "Entering", - "frequency": 10, - "latitude": -80.88, - "longitude": 41.277, - "radius": 500, - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/area/circle/subscription123" - } - } - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "circleNotificationSubscription": { - "$ref": "#/components/schemas/CircleNotificationSubscription" - } - }, - "example": { - "circleNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "checkImmediate": true, - "enteringLeavingCriteria": "Entering", - "frequency": 10, - "latitude": -80.88, - "longitude": 41.277, - "radius": 500, - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/area/circle/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "412": { - "$ref": "#/components/responses/412" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "delete": { - "tags": [ - "location" - ], - "summary": "Cancel a subscription", - "description": "Method to delete a subscription.", - "operationId": "areaCircleSubDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/distance": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieves all active subscriptions to distance change notifications", - "description": "This operation is used for retrieving all active subscriptions to a distance change notifications.", - "operationId": "distanceSubListGET", - "responses": { - "200": { - "description": "Response to retrieve area subscriptions", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "notificationSubscriptionList" - ], - "properties": { - "notificationSubscriptionList": { - "$ref": "#/components/schemas/NotificationSubscriptionList" - } - }, - "example": { - "notificationSubscriptionList": { - "distanceNotificationSubscription": [ - { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "monitoredAddress": [ - "acr:10.0.0.1", - "acr:10.0.0.2" - ], - "checkImmediate": true, - "criteria": "AllWithinDistance", - "distance": 100, - "frequency": 10, - "referenceAddress": "acr:10.0.0.3", - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/distance/sub123" - } - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/distance" - } - } - } - } - } - } - } - }, - "post": { - "tags": [ - "location" - ], - "summary": "Creates a subscription for distance change notification", - "description": "Creates a subscription to the Location Service for a distance change notification.", - "operationId": "distanceSubPOST", - "requestBody": { - "description": "Subscription to be created", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "distanceNotificationSubscription": { - "$ref": "#/components/schemas/DistanceNotificationSubscription" - } - }, - "example": { - "distanceNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "monitoredAddress": [ - "acr:10.0.0.1", - "acr:10.0.0.2" - ], - "checkImmediate": true, - "criteria": "AllWithinDistance", - "distance": 100, - "frequency": 10, - "referenceAddress": "acr:10.0.0.3", - "trackingAccuracy": 10 - } - } - } - } - } - }, - "responses": { - "201": { - "description": "Successful subscription", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "distanceNotificationSubscription": { - "$ref": "#/components/schemas/DistanceNotificationSubscription" - } - }, - "example": { - "distanceNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "monitoredAddress": [ - "acr:10.0.0.1", - "acr:10.0.0.2" - ], - "checkImmediate": true, - "criteria": "AllWithinDistance", - "distance": 100, - "frequency": 10, - "referenceAddress": "acr:10.0.0.3", - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/distance/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "callbacks": { - "notification": { - "{$request.body#/distanceNotificationSubscription.callbackReference.notifyURL}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification from Location service, content based on subscription type", - "operationId": "distanceNotificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "subscriptionNotification": { - "$ref": "#/components/schemas/SubscriptionNotification" - } - }, - "example": { - "subscriptionNotification": { - "distanceCriteria": "AllWithinDistance", - "isFinalNotification": "false,", - "link": { - "rel": "DistanceNotificationSubscription", - "href": "http://meAppServer.example.com/location/v2/subscriptions/distance/sub123" - }, - "terminalLocation": [ - { - "address": "acr:10.0.0.1", - "currentLocation": { - "accuracy": 100, - "altitude": 1001, - "latitude": -80.86302, - "longitude": 41.277306, - "timestamp": { - "seconds": 1483231138, - "nanoSeconds\"": 0 - } - }, - "locationRetrievalStatus": "Retrieved" - }, - { - "address": "acr:10.0.0.2", - "currentLocation": { - "accuracy": 100, - "altitude": 1001, - "latitude": -80.86301, - "longitude": 41.277306, - "timestamp": { - "seconds": 1483231138, - "nanoSeconds\"": 0 - } - }, - "locationRetrievalStatus": "Retrieved" - } - ] - } - } - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/distance/{subscriptionId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieve subscription information", - "description": "Get subscription information.", - "operationId": "distanceSubGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "distanceNotificationSubscription" - ], - "properties": { - "distanceNotificationSubscription": { - "$ref": "#/components/schemas/DistanceNotificationSubscription" - } - }, - "example": { - "distanceNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "monitoredAddress": [ - "acr:10.0.0.1", - "acr:10.0.0.2" - ], - "checkImmediate": true, - "criteria": "AllWithinDistance", - "distance": 100, - "frequency": 10, - "referenceAddress": "acr:10.0.0.3", - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/distance/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "put": { - "tags": [ - "location" - ], - "summary": "Updates a subscription information", - "description": "Updates a subscription.", - "operationId": "distanceSubPUT", - "requestBody": { - "description": "Subscription to be modified", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "distanceNotificationSubscription": { - "$ref": "#/components/schemas/DistanceNotificationSubscription" - } - }, - "example": { - "distanceNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "monitoredAddress": [ - "acr:10.0.0.1", - "acr:10.0.0.2" - ], - "checkImmediate": true, - "criteria": "AllWithinDistance", - "distance": 100, - "frequency": 10, - "referenceAddress": "acr:10.0.0.3", - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/distance/subscription123" - } - } - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "distanceNotificationSubscription": { - "$ref": "#/components/schemas/DistanceNotificationSubscription" - } - }, - "example": { - "distanceNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "monitoredAddress": [ - "acr:10.0.0.1", - "acr:10.0.0.2" - ], - "checkImmediate": true, - "criteria": "AllWithinDistance", - "distance": 100, - "frequency": 10, - "referenceAddress": "acr:10.0.0.3", - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/distance/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "412": { - "$ref": "#/components/responses/412" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "delete": { - "tags": [ - "location" - ], - "summary": "Cancel a subscription", - "description": "Method to delete a subscription.", - "operationId": "distanceSubDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/periodic": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieves all active subscriptions to periodic notifications", - "description": "This operation is used for retrieving all active subscriptions to periodic notifications.", - "operationId": "periodicSubListGET", - "responses": { - "200": { - "description": "Response to retrieve area subscriptions", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "notificationSubscriptionList" - ], - "properties": { - "notificationSubscriptionList": { - "$ref": "#/components/schemas/NotificationSubscriptionList" - } - }, - "example": { - "notificationSubscriptionList": { - "periodicNotificationSubscription": [ - { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "frequency": 10, - "requestedAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/periodic/subscription123" - } - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/periodic" - } - } - } - } - } - } - } - }, - "post": { - "tags": [ - "location" - ], - "summary": "Creates a subscription for periodic notification", - "description": "Creates a subscription to the Location Service for a periodic notification.", - "operationId": "periodicSubPOST", - "requestBody": { - "description": "Subscription to be created", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "periodicNotificationSubscription": { - "$ref": "#/components/schemas/PeriodicNotificationSubscription" - } - }, - "example": { - "periodicNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "frequency": 10, - "requestedAccuracy": 10 - } - } - } - } - } - }, - "responses": { - "201": { - "description": "Successful subscription", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "periodicNotificationSubscription": { - "$ref": "#/components/schemas/PeriodicNotificationSubscription" - } - }, - "example": { - "periodicNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "frequency": 10, - "requestedAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/periodic/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "callbacks": { - "notification": { - "{$request.body#/periodicNotificationSubscription.callbackReference.notifyURL}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification from Location service, content based on subscription type", - "operationId": "periodicNotificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "subscriptionNotification": { - "$ref": "#/components/schemas/SubscriptionNotification" - } - }, - "example": { - "subscriptionNotification": { - "isFinalNotification": "false,", - "link": { - "rel": "PeriodicNotificationSubscription", - "href": "http://meAppServer.example.com/location/v2/subscriptions/periodic/sub123" - }, - "terminalLocation": { - "address": "acr:10.0.0.1", - "currentLocation": { - "accuracy": 100, - "altitude": 1001, - "latitude": -80.86302, - "longitude": 41.277306, - "timestamp": { - "seconds": 1483231138, - "nanoSeconds\"": 0 - } - }, - "locationRetrievalStatus": "Retrieved" - } - } - } - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/periodic/{subscriptionId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieve subscription information", - "description": "Get subscription information.", - "operationId": "periodicSubGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "periodicNotificationSubscription" - ], - "properties": { - "periodicNotificationSubscription": { - "$ref": "#/components/schemas/PeriodicNotificationSubscription" - } - }, - "example": { - "periodicNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "frequency": 10, - "requestedAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/periodic/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "put": { - "tags": [ - "location" - ], - "summary": "Updates a subscription information", - "description": "Updates a subscription.", - "operationId": "periodicSubPUT", - "requestBody": { - "description": "Subscription to be modified", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "periodicNotificationSubscription": { - "$ref": "#/components/schemas/PeriodicNotificationSubscription" - } - }, - "example": { - "periodicNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "frequency": 10, - "requestedAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/periodic/subscription123" - } - } - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "periodicNotificationSubscription": { - "$ref": "#/components/schemas/PeriodicNotificationSubscription" - } - }, - "example": { - "periodicNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "frequency": 10, - "requestedAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/periodic/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "412": { - "$ref": "#/components/responses/412" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "delete": { - "tags": [ - "location" - ], - "summary": "Cancel a subscription", - "description": "Method to delete a subscription.", - "operationId": "periodicSubDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/userTracking": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieves all active subscriptions to user tracking notifications", - "description": "This operation is used for retrieving all active subscriptions to user tracking notifications.", - "operationId": "userTrackingSubListGET", - "responses": { - "200": { - "description": "Response to retrieve user tracking subscriptions", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "notificationSubscriptionList" - ], - "properties": { - "notificationSubscriptionList": { - "$ref": "#/components/schemas/NotificationSubscriptionList" - } - }, - "example": { - "notificationSubscriptionList": { - "userTrackingSubscription": [ - { - "clientCorrelator": "0123", - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/userTracking/subscription123", - "callbackReference": { - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:192.0.2.1", - "userEventCriteria": [ - "Transferring" - ] - }, - { - "clientCorrelator": "0124", - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/userTracking/subscription124", - "callbackReference": { - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:192.0.2.2", - "userEventCriteria": [ - "Transferring" - ] - } - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/userTracking" - } - } - } - } - } - } - } - }, - "post": { - "tags": [ - "location" - ], - "summary": "Creates a subscription for user tracking notification", - "description": "Creates a subscription to the Location Service for user tracking change notification.", - "operationId": "userTrackingSubPOST", - "requestBody": { - "description": "Subscription to be created", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userTrackingSubscription": { - "$ref": "#/components/schemas/UserTrackingSubscription" - } - }, - "example": { - "userTrackingSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "address": "acr:10.0.0.1", - "userEventCriteria": [ - "Transferring" - ] - } - } - } - } - } - }, - "responses": { - "201": { - "description": "Successful subscription", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userTrackingSubscription": { - "$ref": "#/components/schemas/UserTrackingSubscription" - } - }, - "example": { - "userTrackingSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "address": "acr:10.0.0.1", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/userTracking/sub123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "callbacks": { - "notification": { - "{$request.body#/userTrackingSubscription.callbackReference.notifyURL}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification from Location service, content based on subscription type", - "operationId": "userTrackingNotificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zonalPresenceNotification": { - "$ref": "#/components/schemas/ZonalPresenceNotification" - } - }, - "example": { - "zonalPresenceNotification": { - "clientCorrelator": "0123", - "zoneId": "zone01", - "address": "acr:10.0.0.1", - "userEventType": "Transferring", - "currentAccessPointId": "ap2", - "previousAccessPointId": "ap1", - "timestamp": { - "seconds": 1483231138, - "nanoseconds": 0 - }, - "link": { - "rel": "UserTrackingSubscription", - "href": "http://meAppServer.example.com/location/v2/subscriptions/userTracking/sub123" - } - } - } - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/userTracking/{subscriptionId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieve subscription information", - "description": "Get subscription information.", - "operationId": "userTrackingSubGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "userTrackingSubscription" - ], - "properties": { - "userTrackingSubscription": { - "$ref": "#/components/schemas/UserTrackingSubscription" - } - }, - "example": { - "userTrackingSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "address": "acr:10.0.0.1", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/userTracking/sub123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "put": { - "tags": [ - "location" - ], - "summary": "Updates a subscription information", - "description": "Updates a subscription.", - "operationId": "userTrackingSubPUT", - "requestBody": { - "description": "Subscription to be modified", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userTrackingSubscription": { - "$ref": "#/components/schemas/UserTrackingSubscription" - } - }, - "example": { - "userTrackingSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "address": "acr:10.0.0.1", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/userTracking/sub123" - } - } - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userTrackingSubscription": { - "$ref": "#/components/schemas/UserTrackingSubscription" - } - } - }, - "example": { - "userTrackingSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "address": "acr:10.0.0.1", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/userTracking/sub123" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "412": { - "$ref": "#/components/responses/412" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "delete": { - "tags": [ - "location" - ], - "summary": "Cancel a subscription", - "description": "Method to delete a subscription.", - "operationId": "userTrackingSubDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/zonalTraffic": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieves all active subscriptions to zonal traffic notifications", - "description": "This operation is used for retrieving all active subscriptions to zonal traffic change notifications.", - "operationId": "zonalTrafficSubListGET", - "responses": { - "200": { - "description": "Response to retrieve zonal traffic subscriptions", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "notificationSubscriptionList" - ], - "properties": { - "notificationSubscriptionList": { - "$ref": "#/components/schemas/NotificationSubscriptionList" - } - }, - "example": { - "notificationSubscriptionList": { - "zonalTrafficSubscription": [ - { - "clientCorrelator": "0123", - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic/subscription123", - "callbackReference": { - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "zoneId": "zone01", - "userEventCriteria": [ - "Transferring" - ] - }, - { - "clientCorrelator": "0124", - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic/subscription124", - "callbackReference": { - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "zoneId": "zone02", - "userEventCriteria": [ - "Transferring" - ] - } - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic" - } - } - } - } - } - } - } - }, - "post": { - "tags": [ - "location" - ], - "summary": "Creates a subscription for zonal traffic notification", - "description": "Creates a subscription to the Location Service for zonal traffic change notification.", - "operationId": "zonalTrafficSubPOST", - "requestBody": { - "description": "Subscription to be created", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zonalTrafficSubscription": { - "$ref": "#/components/schemas/ZonalTrafficSubscription" - } - }, - "example": { - "zonalTrafficSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "userEventCriteria": [ - "Transferring" - ] - } - } - } - } - } - }, - "responses": { - "201": { - "description": "Successful subscription", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zonalTrafficSubscription": { - "$ref": "#/components/schemas/ZonalTrafficSubscription" - } - }, - "example": { - "zonalTrafficSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic/sub123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "callbacks": { - "notification": { - "{$request.body#/zonalTrafficSubscription.callbackReference.notifyURL}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification from Location service, content based on subscription type", - "operationId": "zonalTrafficNotificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zonalPresenceNotification": { - "$ref": "#/components/schemas/ZonalPresenceNotification" - } - }, - "example": { - "zonalPresenceNotification": { - "clientCorrelator": "0123", - "zoneId": "zone01", - "address": "acr:10.0.0.1", - "userEventType": "Transferring", - "currentAccessPointId": "ap2", - "previousAccessPointId": "ap1", - "timestamp": { - "seconds": 1483231138, - "nanoseconds": 0 - }, - "link": { - "rel": "ZonalTrafficSubscription", - "href": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic/sub123" - } - } - } - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/zonalTraffic/{subscriptionId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieve subscription information", - "description": "Get subscription information.", - "operationId": "zonalTrafficSubGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "zonalTrafficSubscription" - ], - "properties": { - "zonalTrafficSubscription": { - "$ref": "#/components/schemas/ZonalTrafficSubscription" - } - }, - "example": { - "zonalTrafficSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic/sub123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "put": { - "tags": [ - "location" - ], - "summary": "Updates a subscription information", - "description": "Updates a subscription.", - "operationId": "zonalTrafficSubPUT", - "requestBody": { - "description": "Subscription to be modified", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zonalTrafficSubscription": { - "$ref": "#/components/schemas/ZonalTrafficSubscription" - } - }, - "example": { - "zonalTrafficSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic/sub123" - } - } - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zonalTrafficSubscription": { - "$ref": "#/components/schemas/ZonalTrafficSubscription" - } - } - }, - "example": { - "zonalTrafficSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic/sub123" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "412": { - "$ref": "#/components/responses/412" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "delete": { - "tags": [ - "location" - ], - "summary": "Cancel a subscription", - "description": "Method to delete a subscription.", - "operationId": "zonalTrafficSubDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/zoneStatus": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieves all active subscriptions to zone status notifications", - "description": "This operation is used for retrieving all active subscriptions to zone status change notifications.", - "operationId": "zoneStatusSubListGET", - "responses": { - "200": { - "description": "Response to retrieve zone status subscriptions", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "notificationSubscriptionList" - ], - "properties": { - "notificationSubscriptionList": { - "$ref": "#/components/schemas/NotificationSubscriptionList" - } - }, - "example": { - "notificationSubscriptionList": { - "zoneStatusSubscription": [ - { - "clientCorrelator": "0123", - "resourceURL": "http://example.com/exampleAPI/location/v2/subscriptions/zoneStatus/subscription123", - "callbackReference": { - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "zoneId": "zone01", - "numberOfUsersZoneThreshold": 500, - "operationStatus": [ - "Serviceable" - ] - } - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zoneStatus" - } - } - } - } - } - } - } - }, - "post": { - "tags": [ - "location" - ], - "summary": "Creates a subscription for zone status notification", - "description": "Creates a subscription to the Location Service for zone status change notification.", - "operationId": "zoneStatusSubPOST", - "requestBody": { - "description": "Subscription to be created", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zoneStatusSubscription": { - "$ref": "#/components/schemas/ZoneStatusSubscription" - } - }, - "example": { - "zoneStatusSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "numberOfUsersZoneThreshold": 500, - "operationStatus": [ - "Serviceable" - ] - } - } - } - } - } - }, - "responses": { - "201": { - "description": "Successful subscription", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zoneStatusSubscription": { - "$ref": "#/components/schemas/ZoneStatusSubscription" - } - }, - "example": { - "zoneStatusSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "numberOfUsersZoneThreshold": 500, - "operationStatus": [ - "Serviceable" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zoneStatus/sub123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "callbacks": { - "notification": { - "{$request.body#/zoneStatusSubscription.callbackReference.notifyURL}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification from Location service, content based on subscription type", - "operationId": "zoneStatusNotificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zoneStatusNotification": { - "$ref": "#/components/schemas/ZoneStatusNotification" - } - }, - "example": { - "zoneStatusNotification": { - "clientCorrelator": "0123", - "zoneId": "zone01", - "accessPointId": "poa1", - "operationStatus": "Serviceable", - "numberOfUsersInZone": "20", - "numberOfUsersInAP": "12", - "timestamp": { - "seconds": 1483231138, - "nanoseconds": 0 - }, - "link": { - "rel": "ZoneStatusSubscription", - "href": "http://meAppServer.example.com/location/v2/subscriptions/zoneStatus/sub123" - } - } - } - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/zoneStatus/{subscriptionId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieve subscription information", - "description": "Get subscription information.", - "operationId": "zoneStatusSubGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "zoneStatusSubscription" - ], - "properties": { - "zoneStatusSubscription": { - "$ref": "#/components/schemas/ZoneStatusSubscription" - } - }, - "example": { - "zoneStatusSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "numberOfUsersZoneThreshold": 500, - "operationStatus": [ - "Serviceable" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zoneStatus/sub123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "put": { - "tags": [ - "location" - ], - "summary": "Updates a subscription information", - "description": "Updates a subscription.", - "operationId": "zoneStatusSubPUT", - "requestBody": { - "description": "Subscription to be modified", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zoneStatusSubscription": { - "$ref": "#/components/schemas/ZoneStatusSubscription" - } - }, - "example": { - "zoneStatusSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "numberOfUsersZoneThreshold": 500, - "operationStatus": [ - "Serviceable" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zoneStatus/sub123" - } - } - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zoneStatusSubscription": { - "$ref": "#/components/schemas/ZoneStatusSubscription" - } - } - }, - "example": { - "zoneStatusSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "numberOfUsersZoneThreshold": 500, - "operationStatus": [ - "Serviceable" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zoneStatus/sub123" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "412": { - "$ref": "#/components/responses/412" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "delete": { - "tags": [ - "location" - ], - "summary": "Cancel a subscription", - "description": "Method to delete a subscription.", - "operationId": "zoneStatusSubDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - } - } - }, - "components": { - "responses": { - "200": { - "description": "OK" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request : used to indicate that incorrect parameters were passed to the request.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized : used when the client did not submit credentials.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden : operation is not allowed given the current status of the resource.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable : used to indicate that the server cannot provide the any of the content formats supported by the client.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed : used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts when using PUT", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "414": { - "description": "URI Too Long : used to indicate that the server is refusing to process the request because the request URI is longer than the server is willing or able to process.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type : used to indicate that the server or the client does not support the content type of the entity body.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity : used to indicate that the server understands the content type of the request entity and that the syntax of the request entity is correct but that the server is unable to process the contained instructions. This error condition can occur if an JSON request body is syntactically correct but semantically incorrect, for example if the target area for the request is considered too large. This error condition can also occur if the capabilities required by the request are not supported.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - }, - "example": { - "application/problem+json": { - "type": "https://meAppServer.example.com/rni/v2/probs/too-many targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - } - }, - "429": { - "description": "Too Many Requests : used when a rate limiter has triggered.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "parameters": { - "Path.AccessPointId": { - "name": "accessPointId", - "in": "path", - "description": "Identifier of access Point", - "required": true, - "schema": { - "type": "string" - }, - "x-exportParamName": "AccessPointId" - }, - "Path.SubscrId": { - "name": "subscriptionId", - "in": "path", - "description": "Subscription Identifier, specifically the \"self\" returned in the subscription request", - "required": true, - "schema": { - "type": "string", - "format": "uri" - }, - "x-exportParamName": "SubscriptionId" - }, - "Path.ZoneId": { - "name": "zoneId", - "in": "path", - "description": "Indentifier of zone", - "required": true, - "schema": { - "type": "string" - }, - "x-exportParamName": "ZoneId" - }, - "Query.AccessPointId": { - "name": "accessPointId", - "in": "query", - "description": "Identifier of access point", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "x-exportParamName": "AccessPointId" - }, - "Query.Address": { - "name": "address", - "in": "query", - "description": "address of users (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "x-exportParamName": "Address" - }, - "Query.AddressMandatory": { - "name": "address", - "in": "query", - "description": "address of users (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "x-exportParamName": "AddressMandatory" - }, - "Query.InterestRealm": { - "name": "interestRealm", - "in": "query", - "description": "Interest realm of access point (e.g. geographical area, a type of industry etc.).", - "required": false, - "schema": { - "type": "string" - }, - "x-exportParamName": "InterestRealm" - }, - "Query.Latitude": { - "name": "latitude", - "in": "query", - "description": "Latitude geo position", - "required": false, - "schema": { - "type": "number", - "format": "float" - }, - "x-exportParamName": "Latitude" - }, - "Query.Longitude": { - "name": "longitude", - "in": "query", - "description": "Longitude geo position", - "required": false, - "schema": { - "type": "number", - "format": "float" - }, - "x-exportParamName": "Longitude" - }, - "Query.Requester": { - "name": "requester", - "in": "query", - "description": "Entity that is requesting the information", - "required": false, - "schema": { - "type": "string" - }, - "x-exportParamName": "Requester" - }, - "Query.ZoneId": { - "name": "zoneId", - "in": "query", - "description": "Identifier of zone", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "x-exportParamName": "ZoneId" - } - }, - "schemas": { - "AccessPointInfo": { - "description": "A type containing access point information.", - "properties": { - "accessPointId": { - "description": "Identifier of access point.", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - }, - "connectionType": { - "$ref": "#/components/schemas/ConnectionType" - }, - "interestRealm": { - "description": "Interest realm of access point.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "locationInfo": { - "$ref": "#/components/schemas/LocationInfo" - }, - "numberOfUsers": { - "description": "Number of users currently on the access point.", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "integer" - }, - "operationStatus": { - "$ref": "#/components/schemas/OperationStatus" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "timezone": { - "description": "Time zone of access point.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "dateTimeStamp" - } - }, - "required": [ - "accessPointId", - "connectionType", - "operationStatus", - "numberOfUsers", - "resourceURL" - ], - "type": "object" - }, - "AccessPointList": { - "description": "A type containing list of access points.", - "properties": { - "accessPoint": { - "description": "Collection of the access point information list.", - "items": { - "$ref": "#/components/schemas/AccessPointInfo" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "AccessPointInfo" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "zoneId": { - "description": "Identifier of zone", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "zoneId", - "resourceURL" - ], - "type": "object" - }, - "CallbackReference": { - "properties": { - "callbackData": { - "description": "Data the application can register with the server when subscribing to notifications, and that are passed back unchanged in each of the related notifications. These data can be used by the application in the processing of the notification, e.g. for correlation purposes.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "notificationFormat": { - "$ref": "#/components/schemas/NotificationFormat" - }, - "notifyURL": { - "description": "Notify Callback URL", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "anyURI" - } - }, - "required": [ - "notifyURL" - ], - "type": "object" - }, - "CircleNotificationSubscription": { - "description": "A type containing data for notifications, when the area is defined as a circle.", - "properties": { - "address": { - "description": "Address of terminals to monitor (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)", - "items": { - "type": "string" - }, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "anyURI" - }, - "callbackReference": { - "$ref": "#/components/schemas/CallbackReference" - }, - "checkImmediate": { - "description": "Check location immediately after establishing notification.", - "type": "boolean", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "boolean" - }, - "clientCorrelator": { - "description": "A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "count": { - "description": "Maximum number of notifications per individual address. For no maximum, either do not include this element or specify a value of zero. Default value is 0.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "int" - }, - "duration": { - "description": "Period of time (in seconds) notifications are provided for. If set to “0” (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "int" - }, - "enteringLeavingCriteria": { - "$ref": "#/components/schemas/EnteringLeavingCriteria" - }, - "frequency": { - "description": "Maximum frequency (in seconds) of notifications per subscription (can also be considered minimum time between notifications).", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "int" - }, - "latitude": { - "description": "Latitude of center point.", - "format": "float", - "type": "number", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "float" - }, - "link": { - "description": "Link to other resources that are in relationship with the resource.", - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Link" - }, - "longitude": { - "description": "Longitude of center point.", - "format": "float", - "type": "number", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "float" - }, - "radius": { - "description": "Radius circle around center point in meters.", - "format": "float", - "type": "number", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "float" - }, - "requester": { - "description": "Identifies the entity that is requesting the information (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "trackingAccuracy": { - "description": "Number of meters of acceptable error in tracking distance.", - "format": "float", - "type": "number", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "float" - } - }, - "required": [ - "callbackReference", - "address", - "latitude", - "longitude", - "radius", - "trackingAccuracy", - "enteringLeavingCriteria", - "checkImmediate", - "frequency" - ], - "type": "object" - }, - "ConnectionType": { - "description": "The connection type for the access point", - "enum": [ - "Femto", - "LTE-femto", - "Smallcell", - "LTE-smallcell", - "Wifi", - "Pico", - "Micro", - "Macro", - "Wimax", - "Unknown" - ], - "type": "string" - }, - "DistanceCriteria": { - "enum": [ - "AllWithinDistance", - "AnyWithinDistance", - "AllBeyondDistance", - "AnyBeyondDistance" - ], - "type": "string" - }, - "DistanceNotificationSubscription": { - "description": "A type containing data for distance subscription, with reference to other devices.", - "properties": { - "callbackReference": { - "$ref": "#/components/schemas/CallbackReference" - }, - "checkImmediate": { - "description": "Check location immediately after establishing notification.", - "type": "boolean", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "boolean" - }, - "clientCorrelator": { - "description": "A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "count": { - "description": "Maximum number of notifications per individual address. For no maximum, either do not include this element or specify a value of zero. Default value is 0.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "int" - }, - "criteria": { - "$ref": "#/components/schemas/DistanceCriteria" - }, - "distance": { - "description": "Distance between devices that shall be monitored.", - "format": "float", - "type": "number", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "float" - }, - "duration": { - "description": "Period of time (in seconds) notifications are provided for. If set to “0” (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "int" - }, - "frequency": { - "description": "Maximum frequency (in seconds) of notifications per subscription (can also be considered minimum time between notifications).", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "int" - }, - "link": { - "description": "Link to other resources that are in relationship with the resource.", - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Link" - }, - "monitoredAddress": { - "description": "Contains addresses of devices to monitor (e.g., 'sip' URI, 'tel' URI, 'acr' URI)", - "items": { - "type": "string" - }, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "anyURI" - }, - "referenceAddress": { - "description": "Indicates address of each device that will be used as reference devices from which the distances towards monitored devices indicated in the Addresses will be monitored (e.g., 'sip' URI, 'tel' URI, 'acr' URI)", - "items": { - "type": "string" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "anyURI" - }, - "requester": { - "description": "Identifies the entity that is requesting the information (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "trackingAccuracy": { - "description": "Number of meters of acceptable error in tracking distance.", - "format": "float", - "type": "number", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "float" - } - }, - "required": [ - "callbackReference", - "monitoredAddress", - "distance", - "trackingAccuracy", - "criteria", - "checkImmediate", - "frequency" - ], - "type": "object" - }, - "EnteringLeavingCriteria": { - "enum": [ - "Entering", - "Leaving" - ], - "type": "string" - }, - "Link": { - "description": "Link to other resources", - "properties": { - "href": { - "description": "URI", - "format": "anyURI", - "type": "string" - }, - "rel": { - "description": "Describes the relationship between the URI and the resource.", - "type": "string" - } - }, - "required": [ - "rel", - "href" - ], - "type": "object" - }, - "LocationInfo": { - "properties": { - "accuracy": { - "description": "Horizontal accuracy / (semi-major) uncertainty of location provided in meters, as defined in [14]. Present only if \"shape\" equals 4, 5 or 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "accuracyAltitude": { - "description": "Altitude accuracy / uncertainty of location provided in meters, as defined in [14]. Present only if \"shape\" equals 3 or 4", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "accuracySemiMinor": { - "description": "Horizontal accuracy / (semi-major) uncertainty of location provided in meters, as defined in [14]. Present only if \"shape\" equals 4, 5 or 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "altitude": { - "description": "Location altitude relative to the WGS84 ellipsoid surface.", - "format": "float", - "type": "number", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Float" - }, - "confidence": { - "description": "Confidence by which the position of a target entity is known to be within the shape description, expressed as a percentage and defined in [14]. Present only if \"shape\" equals 1, 4 or 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "includedAngle": { - "description": "Present only if \"shape\" equals 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "innerRadius": { - "description": "Present only if \"shape\" equals 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "latitude": { - "description": "Location latitude, expressed in the range -90° to +90°. Cardinality greater than one only if \"shape\" equals 7.", - "items": { - "format": "float", - "type": "number" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "Float" - }, - "longitude": { - "description": "Location longitude, expressed in the range -180° to +180°. Cardinality greater than one only if \"shape\" equals 7.", - "items": { - "format": "float", - "type": "number" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "Float" - }, - "offsetAngle": { - "description": "Present only if \"shape\" equals 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "orientationMajorAxis": { - "description": "Angle of orientation of the major axis, expressed in the range 0° to 180°, as defined in [14]. Present only if \"shape\" equals 4 or 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "shape": { - "description": "Shape information, as detailed in [14], associated with the reported location coordinate:

1 = ELLIPSOID_ARC

2 = ELLIPSOID_POINT

3 = ELLIPSOID_POINT_ALTITUDE

4 = ELLIPSOID_POINT_ALTITUDE_UNCERT_ELLIPSOID

5 = ELLIPSOID_POINT_UNCERT_CIRCLE

6 = ELLIPSOID_POINT_UNCERT_ELLIPSE

7 = POLYGON", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Enum_inlined" - }, - "timestamp": { - "$ref": "#/components/schemas/TimeStamp" - }, - "uncertaintyRadius": { - "description": "Present only if \"shape\" equals 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "velocity": { - "description": "Structure with attributes relating to the target entity’s velocity, as defined in [14].", - "properties": { - "bearing": { - "description": "Bearing, expressed in the range 0° to 360°, as defined in [14].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "horizontalSpeed": { - "description": "Horizontal speed, expressed in km/h and defined in [14].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "uncertainty": { - "description": "Horizontal uncertainty, as defined in [14]. Present only if \"velocityType\" equals 3 or 4", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "velocityType": { - "description": "Velocity information, as detailed in [14], associated with the reported location coordinate:

1 = HORIZONTAL

2 = HORIZONTAL_VERTICAL

3 = HORIZONTAL_UNCERT

4 = HORIZONTAL_VERTICAL_UNCERT", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Enum_inlined" - }, - "verticalSpeed": { - "description": "Vertical speed, expressed in km/h and defined in [14]. Present only if \"velocityType\" equals 2 or 4", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Int" - }, - "verticalUncertainty": { - "description": "Vertical uncertainty, as defined in [14]. Present only if \"velocityType\" equals 4", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - } - }, - "required": [ - "velocityType", - "bearing", - "horizontalSpeed" - ], - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - } - }, - "required": [ - "latitude", - "longitude", - "shape" - ], - "type": "object", - "x-etsi-ref": "6.5.3" - }, - "NotificationFormat": { - "enum": [ - "XML", - "JSON" - ], - "type": "string" - }, - "NotificationSubscriptionList": { - "properties": { - "circleNotificationSubscription": { - "description": "Collection of CircleNotificationSubscription elements, see note 2.", - "items": { - "$ref": "#/components/schemas/CircleNotificationSubscription" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0.. N", - "x-etsi-mec-origin-type": "CircleNotificationSubscription" - }, - "distanceNotificationSubscription": { - "description": "Collection of DistanceNotificationSubscription elements, see note 2.", - "items": { - "$ref": "#/components/schemas/DistanceNotificationSubscription" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0.. N", - "x-etsi-mec-origin-type": "DistanceNotificationSubscription" - }, - "periodicNotificationSubscription": { - "description": "Collection of PeriodicNotificationSubscription elements, see note 2.", - "items": { - "$ref": "#/components/schemas/PeriodicNotificationSubscription" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0.. N", - "x-etsi-mec-origin-type": "PeriodicNotificationSubscription" - }, - "resourceURL": { - "description": "Self-referring URL, see note 1.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "AnyURI" - }, - "userTrackingSubscription": { - "description": "Collection of UserTrackingSubscription elements, see note 1.", - "items": { - "$ref": "#/components/schemas/UserTrackingSubscription" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0.. N", - "x-etsi-mec-origin-type": "UserTrackingSubscription" - }, - "zonalTrafficSubscription": { - "description": "Collection of ZonalTrafficSubscription elements, see note 1.", - "items": { - "$ref": "#/components/schemas/ZonalTrafficSubscription" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0.. N", - "x-etsi-mec-origin-type": "ZonalTrafficSubscription" - }, - "zoneStatusSubscription": { - "description": "Collection of ZoneStatusSubscription elements, see note 1.", - "items": { - "$ref": "#/components/schemas/ZoneStatusSubscription" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0.. N", - "x-etsi-mec-origin-type": "ZoneStatusSubscription" - } - }, - "required": [ - "resourceURL" - ], - "type": "object", - "x-etsi-notes": "NOTE 1:\tAs specified in [5], clause 5.2.2.8.\nNOTE 2: \tAs specified in [6], clause 5.2.2.7.", - "x-etsi-ref": "6.3.3" - }, - "OperationStatus": { - "enum": [ - "Serviceable", - "Unserviceable", - "Unknown" - ], - "type": "string" - }, - "PeriodicNotificationSubscription": { - "description": "A type containing data for periodic subscription.", - "properties": { - "address": { - "description": "Address of terminals to monitor (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)", - "items": { - "type": "string" - }, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "anyURI" - }, - "callbackReference": { - "$ref": "#/components/schemas/CallbackReference" - }, - "clientCorrelator": { - "description": "A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "duration": { - "description": "Period of time (in seconds) notifications are provided for. If set to “0” (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "int" - }, - "frequency": { - "description": "Maximum frequency (in seconds) of notifications (can also be considered minimum time between notifications) per subscription.", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "int" - }, - "link": { - "description": "Link to other resources that are in relationship with the resource.", - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Link" - }, - "requestedAccuracy": { - "description": "Accuracy of the provided distance in meters.", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "int" - }, - "requester": { - "description": "Identifies the entity that is requesting the information (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - } - }, - "required": [ - "callbackReference", - "address", - "requestedAccuracy", - "frequency" - ], - "type": "object" - }, - "ProblemDetails": { - "properties": { - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "instance": { - "description": "A URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "status": { - "description": "The HTTP status code for this occurrence of the problem", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "title": { - "description": "A short, human-readable summary of the problem type", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "type": { - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - } - }, - "type": "object" - }, - "RetrievalStatus": { - "enum": [ - "Retrieved", - "NotRetrieved", - "Error" - ], - "type": "string" - }, - "ServiceError": { - "description": "used to indicate a notification termination or cancellation.", - "properties": { - "messageId": { - "description": "Message identifier, either with prefix SVC or with prefix POL", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - }, - "text": { - "description": "Message text, with replacement variables marked with %n, where n is an index into the list of elements, starting at 1", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - }, - "variables": { - "description": "Variables to substitute into text string", - "items": { - "type": "string" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "messageId", - "text" - ], - "type": "object" - }, - "SubscriptionCancellationNotification": { - "description": "A type containing the subscription cancellation notification.", - "properties": { - "address": { - "description": "Address of terminal if the error applies to an individual terminal.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "callbackData": { - "description": "CallbackData if passed by the application in the receiptRequest element during the associated subscription operation", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "link": { - "description": "Link to other resources that are in relationship with the resource.", - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Link" - }, - "reason": { - "$ref": "#/components/schemas/ServiceError" - } - }, - "required": [ - "terminalLocation" - ], - "type": "object" - }, - "SubscriptionNotification": { - "description": "A type containing the notification subscription.", - "properties": { - "callbackData": { - "description": "CallbackData if passed by the application in the receiptRequest element during the associated subscription operation", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "distanceCriteria": { - "$ref": "#/components/schemas/DistanceCriteria" - }, - "enteringLeavingCriteria": { - "$ref": "#/components/schemas/EnteringLeavingCriteria" - }, - "isFinalNotification": { - "description": "Set to true if it is a final notification about location change.", - "type": "boolean", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "boolean" - }, - "link": { - "description": "Link to other resources that are in relationship with the resource.", - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Link" - }, - "terminalLocation": { - "description": "Collection of the terminal locations.", - "items": { - "$ref": "#/components/schemas/TerminalLocation" - }, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "TerminalLocation" - } - }, - "required": [ - "terminalLocation" - ], - "type": "object" - }, - "TerminalDistance": { - "description": "A type containing information about the distance from a terminal to a location or between two terminals, in addition the accuracy and a timestamp of the information are provided.", - "properties": { - "accuracy": { - "description": "Accuracy of the provided distance in meters", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "integer" - }, - "distance": { - "description": "Distance from terminal to a location or between two terminals specified in meters", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "integer" - }, - "timestamp": { - "$ref": "#/components/schemas/TimeStamp" - } - }, - "required": [ - "distance" - ], - "type": "object" - }, - "TerminalLocation": { - "description": "A type containing device address, retrieval status and location information.", - "properties": { - "address": { - "description": "Address of the terminal to which the location information applies (e.g., 'sip' URI, 'tel' URI, 'acr' URI).", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "currentLocation": { - "$ref": "#/components/schemas/LocationInfo" - }, - "errorInformation": { - "$ref": "#/components/schemas/ServiceError" - }, - "locationRetrievalStatus": { - "$ref": "#/components/schemas/RetrievalStatus" - } - }, - "required": [ - "address", - "locationRetrievalStatus" - ], - "type": "object" - }, - "TerminalLocationList": { - "description": "Collection of the terminal locations.", - "items": { - "$ref": "#/components/schemas/TerminalLocation" - }, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "TerminalLocation" - }, - "TimeStamp": { - "properties": { - "nanoSeconds": { - "description": "The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "seconds": { - "description": "The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "required": [ - "seconds", - "nanoSeconds" - ], - "type": "object", - "x-etsi-ref": "6.5.2" - }, - "UserEventType": { - "enum": [ - "Entering", - "Leaving", - "Transferring" - ], - "type": "string" - }, - "UserInfo": { - "properties": { - "accessPointId": { - "description": "The identity of the access point the user is currently on, see note 1.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "address": { - "description": "Address of user (e.g. 'sip' URI, 'tel' URI, 'acr' URI) currently on the access point, see note 1.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "AnyURI" - }, - "ancillaryInfo": { - "description": "Reserved for future use.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "contextLocationInfo": { - "description": "Contextual information of a user location (e.g. aisle, floor, room number, etc.).", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "locationInfo": { - "$ref": "#/components/schemas/LocationInfo" - }, - "resourceURL": { - "description": "Self-referring URL, see note 1.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "timestamp": { - "$ref": "#/components/schemas/TimeStamp" - }, - "zoneId": { - "description": "The identity of the zone the user is currently within, see note 1.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "address", - "accessPointId", - "zoneId", - "resourceURL", - "timestamp" - ], - "type": "object", - "x-etsi-notes": "NOTE 1:\tAs specified in [5], clause 5.2.2.7.\nNOTE 2: \tAs specified in [5], clause 5.2.2.5.", - "x-etsi-ref": "6.2.2" - }, - "UserList": { - "description": "A type containing list of users.", - "properties": { - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "user": { - "description": "Collection of the zone information list.", - "items": { - "$ref": "#/components/schemas/UserInfo" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "UserInfo" - } - }, - "required": [ - "resourceURL" - ], - "type": "object" - }, - "UserTrackingSubscription": { - "description": "A type containing user tracking subscription.", - "properties": { - "address": { - "description": "Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) to monitor", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "callbackReference": { - "$ref": "#/components/schemas/CallbackReference" - }, - "clientCorrelator": { - "description": "A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "userEventCriteria": { - "description": "List of user event values to generate notifications for (these apply to address specified). If this element is missing, a notification is requested to be generated for any change in user event.", - "items": { - "$ref": "#/components/schemas/UserEventType" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "UserEventType" - } - }, - "required": [ - "callbackReference", - "address" - ], - "type": "object" - }, - "ZonalPresenceNotification": { - "description": "A type containing zonal presence notification", - "properties": { - "address": { - "description": "Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) to monitor", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "callbackData": { - "description": "CallBackData if passed by the application during the associated ZonalTrafficSubscription and UserTrackingSubscription operation. See [REST_NetAPI_Common].", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "currentAccessPointId": { - "description": "Identifier of access point.", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - }, - "interestRealm": { - "description": "Interest realm of access point (e.g. geographical area, a type of industry etc.).", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "link": { - "description": "Link to other resources that are in relationship with this notification. The server SHOULD include a link to the related subscription. No other links are required or suggested by this specification", - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Link" - }, - "previousAccessPointId": { - "description": "Identifier of access point.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "timestamp": { - "$ref": "#/components/schemas/TimeStamp" - }, - "userEventType": { - "$ref": "#/components/schemas/UserEventType" - }, - "zoneId": { - "description": "Identifier of zone", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "zoneId", - "address", - "userEventType", - "currentAccessPointId", - "timestamp" - ], - "type": "object" - }, - "ZonalTrafficSubscription": { - "description": "A type containing zonal traffic subscription", - "properties": { - "callbackReference": { - "$ref": "#/components/schemas/CallbackReference" - }, - "clientCorrelator": { - "description": "A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "duration": { - "description": "Period (in seconds) of time notifications are provided for. If set to \"0\" (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications. This element MAY be given by the client during resource creation in order to signal the desired lifetime of the subscription. The server MUST return in this element the period of time for which the subscription will still be valid.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "unsignedInt" - }, - "interestRealm": { - "description": "Interest realm of access point (e.g. geographical area, a type of industry etc.).", - "items": { - "type": "string" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "string" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "userEventCriteria": { - "description": "List of user event values to generate notifications for (these apply to zone identifier or all interest realms within zone identifier specified). If this element is missing, a notification is requested to be generated for any change in user event.", - "items": { - "$ref": "#/components/schemas/UserEventType" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "UserEventType" - }, - "zoneId": { - "description": "Identifier of zone", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "callbackReference", - "zoneId" - ], - "type": "object" - }, - "ZoneInfo": { - "description": "A type containing zone information.", - "properties": { - "numberOfAccessPoints": { - "description": "The number of access points within the zone", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "unsignedInt" - }, - "numberOfUnserviceableAccessPoints": { - "description": "Number of inoperable access points within the zone.", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "unsignedInt" - }, - "numberOfUsers": { - "description": "The number of users currently on the access point.", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "unsignedInt" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "zoneId": { - "description": "Identifier of zone", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "zoneId", - "numberOfAccessPoints", - "numberOfUnserviceableAccessPoints", - "numberOfUsers", - "resourceURL" - ], - "type": "object" - }, - "ZoneList": { - "description": "A type containing a list of zones.", - "properties": { - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "zone": { - "description": "Collection of the zone information list.", - "items": { - "$ref": "#/components/schemas/ZoneInfo" - }, - "type": "array" - } - }, - "required": [ - "resourceURL" - ], - "type": "object" - }, - "ZoneStatusNotification": { - "description": "A type containing zone status notification.", - "properties": { - "accessPointId": { - "description": "Identifier of an access point.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "callbackData": { - "description": "CallBackData if passed by the application during the associated ZoneStatusSubscription operation. See [REST_NetAPI_Common].", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "link": { - "description": "Link to other resources that are in relationship with this notification. The server SHOULD include a link to the related subscription. No other links are required or suggested by this specification", - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Link" - }, - "numberOfUsersInAP": { - "description": "This element shall be present when ZoneStatusSubscription includes numberOfUsersAPThreshold element and the number of users in an access point exceeds the threshold defined in the subscription.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "unsignedInt" - }, - "numberOfUsersInZone": { - "description": "This element shall be present when ZoneStatusSubscription includes numberOfUsersZoneThreshold element and the number of users in a zone exceeds the threshold defined in this subscription.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "unsignedInt" - }, - "operationStatus": { - "$ref": "#/components/schemas/OperationStatus" - }, - "timestamp": { - "$ref": "#/components/schemas/TimeStamp" - }, - "zoneId": { - "description": "Identifier of zone", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "zoneId", - "timestamp" - ], - "type": "object" - }, - "ZoneStatusSubscription": { - "description": "A type containing zone status subscription.", - "properties": { - "callbackReference": { - "$ref": "#/components/schemas/CallbackReference" - }, - "clientCorrelator": { - "description": "A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "numberOfUsersAPThreshold": { - "description": "Threshold number of users in an access point which if crossed shall cause a notification", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "unsignedInt" - }, - "numberOfUsersZoneThreshold": { - "description": "Threshold number of users in a zone which if crossed shall cause a notification", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "unsignedInt" - }, - "operationStatus": { - "description": "List of operation status values to generate notifications for (these apply to all access points within a zone).", - "items": { - "$ref": "#/components/schemas/OperationStatus" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "OperationStatus" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "zoneId": { - "description": "Identifier of zone", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "callbackReference", - "zoneId" - ], - "type": "object" - } - } - } -} diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn index 5823989..9f5531f 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn @@ -223,7 +223,7 @@ module LocationAPI_Functions { mw_zone_location_event_notification( // FIXME )))))) -> value v_response { - tc_ac.stop; + tc_ac.stop; // Extract HTTP Location header var charstring_list v_subscription_id; diff --git a/ttcn/LibMec/RnisAPI/json/RnisAPI.json b/ttcn/LibMec/RnisAPI/json/RnisAPI.json deleted file mode 100644 index a6c7ee5..0000000 --- a/ttcn/LibMec/RnisAPI/json/RnisAPI.json +++ /dev/null @@ -1,6574 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "description": "The ETSI MEC ISG MEC012 Radio Network Information API described using OpenAPI", - "version": "1.1.1", - "title": "RNI API", - "license": { - "name": "ETSI Forge copyright notice", - "url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt" - } - }, - "externalDocs": { - "description": "ETSI GS MEC012 Radio Network Information API, V1.1.1", - "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/012/01.01.01_60/gs_mec012v010101p.pdf" - }, - "host": "127.0.0.1:8081", - "basePath": "/rni/v1", - "schemes": [ - "http", - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "security": [ - { - "OauthSecurity": [ - "all" - ] - } - ], - "securityDefinitions": { - "OauthSecurity": { - "type": "oauth2", - "flow": "application", - "tokenUrl": "https://oauth.exampleAPI/token", - "scopes": { - "all": "Single oauth2 scope for API" - } - } - }, - "parameters": { - "Body.CellChangeSubscriptionPost": { - "name": "CellChangeSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to cell change notifications based on the\n filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "CellChangeSubscription": { - "$ref": "#/definitions/CellChangeSubscriptionPost" - } - } - } - }, - "Body.CellChangeSubscription": { - "name": "CellChangeSubscription", - "in": "body", - "description": "Use to creates a subscription to cell change notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "CellChangeSubscription": { - "$ref": "#/definitions/CellChangeSubscription" - } - } - } - }, - "Body.S1BearerSubscriptionPost": { - "name": "S1BearerSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to S1 Bearer notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "S1BearerSubscription": { - "$ref": "#/definitions/S1BearerSubscriptionPost" - } - } - } - }, - "Body.S1BearerSubscription": { - "name": "S1BearerSubscription", - "in": "body", - "description": "Use to creates a subscription to S1 Bearer notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "S1BearerSubscription": { - "$ref": "#/definitions/S1BearerSubscription" - } - } - } - }, - "Body.MeasTaSubscriptionPost": { - "name": "MeasTaSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to UE Timing Advance notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "MeasTaSubscription": { - "$ref": "#/definitions/MeasTaSubscriptionPost" - } - } - } - }, - "Body.MeasTaSubscription": { - "name": "MeasTaSubscription", - "in": "body", - "description": "Use to creates a subscription to UE Timing Advance notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "MeasTaSubscription": { - "$ref": "#/definitions/MeasTaSubscription" - } - } - } - }, - "Body.MeasRepUeSubscriptionPost": { - "name": "MeasRepUeSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to UE measurement report notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "MeasRepUeSubscription": { - "$ref": "#/definitions/MeasRepUeSubscriptionPost" - } - } - } - }, - "Body.MeasRepUeSubscription": { - "name": "MeasRepUeSubscription", - "in": "body", - "description": "Use to creates a subscription to UE measurement report notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "MeasRepUeSubscription": { - "$ref": "#/definitions/MeasRepUeSubscription" - } - } - } - }, - "Body.RabEstSubscriptionPost": { - "name": "RabEstSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to RAB establishment notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "RabEstSubscription": { - "$ref": "#/definitions/RabEstSubscriptionPost" - } - } - } - }, - "Body.RabEstSubscription": { - "name": "RabEstSubscription", - "in": "body", - "description": "Use to creates a subscription to RAB establishment notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "RabEstSubscription": { - "$ref": "#/definitions/RabEstSubscription" - } - } - } - }, - "Body.RabModSubscriptionPost": { - "name": "RabEstSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to RAB Modification notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "RabModSubscription": { - "$ref": "#/definitions/RabModSubscriptionPost" - } - } - } - }, - "Body.RabModSubscription": { - "name": "RabEstSubscription", - "in": "body", - "description": "Use to creates a subscription to RAB Modification notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "RabModSubscription": { - "$ref": "#/definitions/RabModSubscription" - } - } - } - }, - "Body.RabRelSubscriptionPost": { - "name": "RabRelSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to RAB Release notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "RabRelSubscription": { - "$ref": "#/definitions/RabRelSubscriptionPost" - } - } - } - }, - "Body.RabRelSubscription": { - "name": "RabRelSubscription", - "in": "body", - "description": "Use to creates a subscription to RAB Release notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "RabRelSubscription": { - "$ref": "#/definitions/RabRelSubscription" - } - } - } - }, - "Body.CaReConfSubscriptionPost": { - "name": "CaReConfSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to Carrier Aggregation Reconfiguration notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "CaReConfSubscription": { - "$ref": "#/definitions/CaReConfSubscriptionPost" - } - } - } - }, - "Body.CaReConfSubscription": { - "name": "CaReConfSubscription", - "in": "body", - "description": "Use to creates a subscription to Carrier Aggregation Reconfiguration notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "CaReConfSubscription": { - "$ref": "#/definitions/CaReConfSubscription" - } - } - } - }, - "Path.subscrId": { - "name": "subscriptionId", - "in": "path", - "description": "Subscription Id, specifically the \"self\" returned in the subscription request", - "required": true, - "type": "string", - "format": "uri" - }, - "Query.AppInsId": { - "name": "app_ins_id", - "in": "query", - "description": "Application instance identifier", - "required": false, - "type": "string" - }, - "Query.AppInsIdArr": { - "name": "app_ins_id", - "in": "query", - "description": "Application instance identifier", - "required": true, - "type": "array", - "items": { - "type": "string" - } - }, - "Query.UeIpv4Address": { - "name": "ue_ipv4_address", - "in": "query", - "description": "Comma separated list of IE IPv4 addresses as defined for the type for AssociateId", - "required": false, - "type": "array", - "items": { - "type": "string" - } - }, - "Query.UeIpv6Address": { - "name": "ue_ipv6_address", - "in": "query", - "description": "Comma separated list of IE IPv6 addresses as defined for the type for AssociateId", - "required": false, - "type": "array", - "items": { - "type": "string" - } - }, - "Query.NatedIpAddress": { - "name": "nated_ip_address", - "in": "query", - "description": "Comma separated list of IE NATed IP addresses as defined for the type for AssociateId", - "required": false, - "type": "array", - "items": { - "type": "string" - } - }, - "Query.GtpTeId": { - "name": "gtp_teid", - "in": "query", - "description": "Comma separated list of GTP TEID addresses as defined for the type for AssociateId", - "required": false, - "type": "array", - "items": { - "type": "string" - } - }, - "Query.CellId": { - "name": "cell_id", - "in": "query", - "description": "E-UTRAN Cell Identity as a bit string (size (28)), as defined in ETSI TS 136 413", - "required": false, - "type": "array", - "items": { - "type": "string" - } - }, - "Query.ErabGbrDl": { - "name": "erab_gbr_dl", - "in": "query", - "description": "Guaranteed downlink E-RAB Bit Rate as defined in ETSI TS 123 401", - "required": false, - "type": "integer", - "format": "uint32" - }, - "Query.ErabGbrUl": { - "name": "erab_gbr_ul", - "in": "query", - "description": "Guaranteed uplink E-RAB Bit Rate as defined in ETSI TS 123 401", - "required": false, - "type": "integer", - "format": "uint32" - }, - "Query.ErabId": { - "name": "erab_id", - "in": "query", - "description": "E-RAB identifier", - "required": false, - "type": "integer", - "format": "uint32" - }, - "Query.ErabIdArr": { - "name": "erab_id", - "in": "query", - "description": "E-RAB identifier", - "required": false, - "type": "array", - "items": { - "type": "integer", - "format": "uint32" - } - }, - "Query.ErabMbrDl": { - "name": "erab_mbr_dl", - "in": "query", - "description": "Maximum downlink E-RAB Bit Rate as defined in ETSI TS 123 401", - "required": false, - "type": "integer", - "format": "uint32" - }, - "Query.ErabMbrUl": { - "name": "erab_mbr_ul", - "in": "query", - "description": "Maximum uplink E-RAB Bit Rate as defined in ETSI TS 123 401", - "required": false, - "type": "integer", - "format": "uint32" - }, - "Query.Qci": { - "name": "qci", - "in": "query", - "description": "QoS Class Identifier as defined in ETSI TS 123 401", - "required": false, - "type": "integer", - "format": "uint32" - }, - "Query.TempUeId": { - "name": "temp_ue_id", - "in": "query", - "description": "The temporary identifier allocated for the specific UE as defined in ETSI TS 136 413", - "required": false, - "type": "array", - "items": { - "type": "string" - } - } - }, - "paths": { - "/resources/rab_info": { - "get": { - "description": "Gets information on existing E-RABs that are associated with a specific mobile edge application instance", - "operationId": "rab_infoGET", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Query.AppInsId" - }, - { - "$ref": "#/parameters/Query.CellId" - }, - { - "$ref": "#/parameters/Query.UeIpv4Address" - }, - { - "$ref": "#/parameters/Query.UeIpv6Address" - }, - { - "$ref": "#/parameters/Query.NatedIpAddress" - }, - { - "$ref": "#/parameters/Query.GtpTeId" - }, - { - "$ref": "#/parameters/Query.ErabId" - }, - { - "$ref": "#/parameters/Query.Qci" - }, - { - "$ref": "#/parameters/Query.ErabMbrDl" - }, - { - "$ref": "#/parameters/Query.ErabMbrUl" - }, - { - "$ref": "#/parameters/Query.ErabGbrDl" - }, - { - "$ref": "#/parameters/Query.ErabGbrUl" - } - ], - "responses": { - "200": { - "description": "Successful response to rab_info request", - "schema": { - "type": "object", - "required": [ - "RabInfo" - ], - "properties": { - "RabInfo": { - "$ref": "#/definitions/RabInfo" - } - } - }, - "examples": { - "application/json": { - "RabInfo": { - "timeStamp": { - "seconds": 1577836800, - "nanoSeconds": 0 - }, - "appInId": "01", - "requestId": "01", - "cellUserInfo": { - "ecgi": { - "plmn": { - "mcc": "001", - "mnc": "01" - }, - "cellId": "0x800000A" - }, - "ueInfo": { - "associateId": null, - "type": "1", - "value": "192.0.2.0", - "erabInfo": { - "erabId": 10 - }, - "erabQosParameters": { - "qci": 7, - "qosInformation": { - "erabMbrDl": 10, - "erabMbrUl": 10, - "erabGbrDl": 10, - "erabGbrUl": 10 - } - } - } - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/resources/plmn_info": { - "get": { - "description": "Gets the information on Mobile Network(s) that are associated with a specific mobile edge application instance", - "operationId": "plmn_infoGET", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Query.AppInsIdArr" - } - ], - "responses": { - "200": { - "description": "Successful response to rab_info request", - "schema": { - "type": "object", - "properties": { - "PlmnInfo": { - "$ref": "#/definitions/PlmnInfo" - } - } - }, - "examples": { - "application/json": { - "PlmnInfo": { - "timeStamp": { - "seconds": 1577836800, - "nanoSeconds": 0 - }, - "appInId": "01", - "ecgi": { - "plmn": { - "mcc": "001", - "mnc": "01" - }, - "cellId": "0x800000A" - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/resources/s1_bearer_info": { - "get": { - "description": "Gets information on existing E-RABs that are associated with a specific mobile edge application instance", - "operationId": "s1_bearer_infoGET", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Query.TempUeId" - }, - { - "$ref": "#/parameters/Query.UeIpv4Address" - }, - { - "$ref": "#/parameters/Query.UeIpv6Address" - }, - { - "$ref": "#/parameters/Query.NatedIpAddress" - }, - { - "$ref": "#/parameters/Query.GtpTeId" - }, - { - "$ref": "#/parameters/Query.CellId" - }, - { - "$ref": "#/parameters/Query.ErabIdArr" - } - ], - "responses": { - "200": { - "description": "Successful response to s1_bearer_info request", - "schema": { - "type": "object", - "required": [ - "S1BearerInfo" - ], - "properties": { - "S1BearerInfo": { - "$ref": "#/definitions/S1BearerInfo" - } - } - }, - "examples": { - "application/json": { - "S1BearerInfo": { - "timeStamp": { - "seconds": 1577836800, - "nanoSeconds": 0 - }, - "s1UeInfo": [ - { - "tempUeId": { - "mmec": "0", - "mtmsi": "1234" - }, - "associateId": [ - { - "type": "1", - "value": "192.0.2.0" - }, - { - "type": "3", - "value": "198.51.100.0" - } - ], - "ecgi": { - "plmn": { - "mcc": "001", - "mnc": "01" - }, - "cellId": "0x800000A" - }, - "s1BearerInfoDetailed": [ - { - "erabId": 1, - "s1EnbInfo": { - "ipAddress": "192.0.2.0", - "tunnelId": "1111" - }, - "sGwInfo": { - "ipAddress": "192.0.2.1", - "tunnelId": "2222" - } - } - ] - }, - { - "tempUeId": { - "mmec": "0", - "mtmsi": "1234" - }, - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "ecgi": { - "plmn": { - "mcc": "001", - "mnc": "01" - }, - "cellId": "0x800000B" - }, - "s1BearerInfoDetailed": [ - { - "erabId": 2, - "s1EnbInfo": { - "ipAddress": "192.0.2.0", - "tunnelId": "3333" - }, - "sGwInfo": { - "ipAddress": "192.0.2.1", - "tunnelId": "4444" - } - } - ] - } - ] - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/": { - "get": { - "description": "The GET method can be used to request information about the subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/cell_change/77777", - "subscriptionType": "CELL_CHANGE" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/MeasTa/77777", - "subscriptionType": "MEAS_TIMING_ADVANCE" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/cell_change": { - "get": { - "description": "The GET method can be used to request information about the cell_change subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_cc_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors cell_change subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/cell_change", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/cell_change/77777", - "subscriptionType": "CELL_CHANGE" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/cell_change/77778", - "subscriptionType": "CELL_CHANGE" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to cell change notifications from Radio Network Information Service", - "operationId": "CellChange_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.CellChangeSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to response to UE cell change notifications", - "schema": { - "type": "object", - "properties": { - "CellChangeSubscription": { - "$ref": "#/definitions/CellChangeSubscription" - } - } - }, - "examples": { - "application/json": { - "CellChangeSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/cell_change/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/cell_change/sub123" - }, - "filterCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "appInsId": "01", - "trigger": 6, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/cell_change/{subscriptionId}": { - "get": { - "description": "Get cell change subscription information", - "operationId": "CellChange_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding cell change notifications", - "schema": { - "type": "object", - "required": [ - "CellChangeSubscription" - ], - "properties": { - "CellChangeSubscription": { - "$ref": "#/definitions/CellChangeSubscription" - } - } - }, - "examples": { - "application/json": { - "CellChangeSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/cell_change/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/cell_change/sub123" - }, - "filterCriteria": { - "appInsId": "01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "hoStatus": 3 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to cell change notifications from Radio Network Information Service", - "operationId": "CellChange_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.CellChangeSubscription" - }, - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to cell change notifications", - "schema": { - "type": "object", - "properties": { - "CellChangeSubscription": { - "$ref": "#/definitions/CellChangeSubscription" - } - } - }, - "examples": { - "application/json": { - "CellChangeSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/cell_change/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/cell_change/sub123" - }, - "filterCriteria": { - "appInsId": "01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "hoStatus": 3 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "CellChange_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/s1_bearer": { - "get": { - "description": "The GET method can be used to request information about the s1_bearer subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_s1_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors s1_bearer subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/s1_bearer", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/s1_bearer/77777", - "subscriptionType": "S1_BEARER" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/s1_bearer/77778", - "subscriptionType": "S1_BEARER" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to S1 bearer notifications from Radio Network Information Service", - "operationId": "S1BearerSubscription_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.S1BearerSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to response to S1 Bearer notifications", - "schema": { - "type": "object", - "properties": { - "S1BearerSubscription": { - "$ref": "#/definitions/S1BearerSubscription" - } - } - }, - "examples": { - "application/json": { - "S1BearerSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/s1_bearer/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/s1_bearer/sub123" - }, - "eventType": 1, - "s1BearerSubscriptionCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "erabId": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/s1_bearer/{subscriptionId}": { - "get": { - "description": "Gets a subscription to S1 bearer notifications from Radio Network Information Service", - "operationId": "S1BearerSubscription_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to S1 Bearer notifications", - "schema": { - "type": "object", - "properties": { - "S1BearerSubscription": { - "$ref": "#/definitions/S1BearerSubscription" - } - } - }, - "examples": { - "application/json": { - "S1BearerSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/s1_bearer/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/s1_bearer/sub123" - }, - "eventType": 1, - "s1BearerSubscriptionCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "erabId": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to S1 bearer notifications from Radio Network Information Service", - "operationId": "S1BearerSubscription_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - }, - { - "$ref": "#/parameters/Body.S1BearerSubscription" - } - ], - "responses": { - "200": { - "description": "Successful subscription update to response to S1 Bearer notifications", - "schema": { - "type": "object", - "properties": { - "S1BearerSubscription": { - "$ref": "#/definitions/S1BearerSubscription" - } - } - }, - "examples": { - "application/json": { - "S1BearerSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/s1_bearer/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/s1_bearer/sub123" - }, - "eventType": 1, - "s1BearerSubscriptionCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "erabId": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "S1Bearer_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/ta": { - "get": { - "description": "The GET method can be used to request information about the ta subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_ta_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors ta subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ta", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/ta/77777", - "subscriptionType": "MEAS_REPORT_UE" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/ta/77778", - "subscriptionType": "MEAS_REPORT_UE" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to UE Timing Advance notifications from Radio Network Information Service", - "operationId": "MeasTa_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.MeasTaSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to response to UE Timing Advance notifications", - "schema": { - "type": "object", - "properties": { - "MeasTaSubscription": { - "$ref": "#/definitions/MeasTaSubscription" - } - } - }, - "examples": { - "application/json": { - "MeasTaSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/ta/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ta/sub123" - }, - "filterCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "appInsId": "01", - "trigger": 6, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/ta/{subscriptionId}": { - "get": { - "description": "Gets UE Timing Advance subscription information from Radio Network Information Service", - "operationId": "MeasTa_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding UE Timing Advance notifications", - "schema": { - "type": "object", - "required": [ - "MeasTaSubscription" - ], - "properties": { - "MeasTaSubscription": { - "$ref": "#/definitions/MeasTaSubscription" - } - } - }, - "examples": { - "application/json": { - "MeasTaSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/ta/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ta/sub123" - }, - "filterCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "appInsId": "01", - "trigger": 6, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to UE Timing Advance notifications from Radio Network Information Service", - "operationId": "MeasTa_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - }, - { - "$ref": "#/parameters/Body.MeasTaSubscription" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to UE Timing Advance notifications", - "schema": { - "type": "object", - "properties": { - "MeasTaSubscription": { - "$ref": "#/definitions/MeasTaSubscription" - } - } - }, - "examples": { - "application/json": { - "MeasTaSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/ta/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ta/sub123" - }, - "filterCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "appInsId": "01", - "trigger": 6, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "MeasTa_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/meas_rep_ue": { - "get": { - "description": "The GET method can be used to request information about the meas_rep_ue subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_mr_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors meas_rep_ue subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/meas_rep_ue", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/meas_rep_ue/77777", - "subscriptionType": "MEAS_REPORT_UE" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/meas_rep_ue/77778", - "subscriptionType": "MEAS_REPORT_UE" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to UE measurement report notifications from Radio Network Information Service", - "operationId": "MeasRepUe_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.MeasRepUeSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to response to UE measurement report notifications", - "schema": { - "type": "object", - "properties": { - "MeasRepUeSubscription": { - "$ref": "#/definitions/MeasRepUeSubscription" - } - } - }, - "examples": { - "application/json": { - "MeasRepUeSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/meas_rep_ue/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/meas_rep_ue/sub123" - }, - "filterCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "appInsId": "01", - "trigger": 6, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/meas_rep_ue/{subscriptionId}": { - "get": { - "description": "Gets a subscription to UE measurement report notifications from Radio Network Information Service", - "operationId": "MeasRepUe_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to UE measurement report notifications", - "schema": { - "type": "object", - "required": [ - "MeasRepUeSubscription" - ], - "properties": { - "MeasRepUeSubscription": { - "$ref": "#/definitions/MeasRepUeSubscription" - } - } - }, - "examples": { - "application/json": { - "MeasRepUeSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/meas_rep_ue/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/meas_rep_ue/sub123" - }, - "filterCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "appInsId": "01", - "trigger": 6, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to UE measurement report notifications from Radio Network Information Service", - "operationId": "MeasRepUeReport_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - }, - { - "$ref": "#/parameters/Body.MeasRepUeSubscription" - } - ], - "responses": { - "200": { - "description": "Successful update subscription to response to UE measurement report notifications", - "schema": { - "type": "object", - "properties": { - "MeasRepUeSubscription": { - "$ref": "#/definitions/MeasRepUeSubscription" - } - } - }, - "examples": { - "application/json": { - "MeasRepUeSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/meas_rep_ue/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/meas_rep_ue/sub123" - }, - "filterCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "appInsId": "01", - "trigger": 6, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "MeasRepUe_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content. Successful deletion of UE Measurment Report subscription" - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/rab_est": { - "get": { - "description": "The GET method can be used to request information about the rab_est subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_re_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors rab_est subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_est", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/rab_est/77777", - "subscriptionType": "RAB_ESTABLISHMENT" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/rab_est/77778", - "subscriptionType": "RAB_ESTABLISHMENT" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to RAB establishment notifications from Radio Network Information Service", - "operationId": "RabEstSubscription_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.RabEstSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to RAB establishment notifications", - "schema": { - "type": "object", - "properties": { - "RabEstSubscription": { - "$ref": "#/definitions/RabEstSubscription" - } - } - }, - "examples": { - "application/json": { - "RabEstSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_est/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_est/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/rab_est/{subscriptionId}": { - "get": { - "description": "Gets a subscription to RAB establishment notifications from Radio Network Information Service", - "operationId": "RabEstSubscription_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding RAB establishment notifications", - "schema": { - "type": "object", - "required": [ - "RabEstSubscription" - ], - "properties": { - "RabEstSubscription": { - "$ref": "#/definitions/RabEstSubscription" - } - } - }, - "examples": { - "application/json": { - "RabEstSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_est/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_est/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to RAB establishment notifications from Radio Network Information Service", - "operationId": "RabEstSubscription_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - }, - { - "$ref": "#/parameters/Body.RabEstSubscription" - } - ], - "responses": { - "200": { - "description": "Successful subscription update to RAB establishment notifications", - "schema": { - "type": "object", - "properties": { - "RabEstSubscription": { - "$ref": "#/definitions/RabEstSubscription" - } - } - }, - "examples": { - "application/json": { - "RabEstSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_est/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_est/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "RabEst_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content. Successful deletion of Rab Establishment subscription" - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/rab_mod": { - "get": { - "description": "The GET method can be used to request information about the rab_mod subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_rm_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors rab_mod subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_mod", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/rab_mod/77777", - "subscriptionType": "RAB_MODIFICATION" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/rab_mod/77778", - "subscriptionType": "RAB_MODIFICATION" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to RAB Modification notifications from Radio Network Information Service", - "operationId": "RabModSubscription_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.RabModSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to RAB Modification notifications", - "schema": { - "type": "object", - "properties": { - "RabModSubscription": { - "$ref": "#/definitions/RabModSubscription" - } - } - }, - "examples": { - "application/json": { - "RabModSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_mod/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_mod/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/rab_mod/{subscriptionId}": { - "get": { - "description": "Gets a subscription to RAB Modification notifications from Radio Network Information Service", - "operationId": "RabModSubscription_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding RAB Modification notifications", - "schema": { - "type": "object", - "required": [ - "RabModSubscription" - ], - "properties": { - "RabModSubscription": { - "$ref": "#/definitions/RabModSubscription" - } - } - }, - "examples": { - "application/json": { - "RabModSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_mod/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_mod/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to RAB Modification notifications from Radio Network Information Service", - "operationId": "RabModSubscription_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - }, - { - "$ref": "#/parameters/Body.RabModSubscription" - } - ], - "responses": { - "200": { - "description": "Successful subscription update to RAB Modification notifications", - "schema": { - "type": "object", - "properties": { - "RabModSubscription": { - "$ref": "#/definitions/RabModSubscription" - } - } - }, - "examples": { - "application/json": { - "RabModSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_mod/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_mod/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "RabMod_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content. Successful deletion of Rab Modification subscription" - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/rab_rel": { - "get": { - "description": "The GET method can be used to request information about the rab_rel subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_rr_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors rab_rel subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_rel", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/rab_rel/77777", - "subscriptionType": "RAB_RELEASE" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/rab_rel/77778", - "subscriptionType": "RAB_RELEASE" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to RAB Release notifications from Radio Network Information Service", - "operationId": "RabRelSubscription_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.RabRelSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to RAB Release notifications", - "schema": { - "type": "object", - "properties": { - "RabRelSubscription": { - "$ref": "#/definitions/RabRelSubscription" - } - } - }, - "examples": { - "application/json": { - "RabRelSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_rel/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_rel/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/rab_rel/{subscriptionId}": { - "get": { - "description": "Gets a subscription to RAB Release notifications from Radio Network Information Service", - "operationId": "RabRelSubscription_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding RAB Release notifications", - "schema": { - "type": "object", - "required": [ - "RabRelSubscription" - ], - "properties": { - "RabRelSubscription": { - "$ref": "#/definitions/RabRelSubscription" - } - } - }, - "examples": { - "application/json": { - "RabRelSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_rel/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_rel/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to RAB Release notifications from Radio Network Information Service", - "operationId": "RabRelSubscription_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - }, - { - "$ref": "#/parameters/Body.RabRelSubscription" - } - ], - "responses": { - "200": { - "description": "Successful subscription update to RAB Release notifications", - "schema": { - "type": "object", - "properties": { - "RabRelSubscription": { - "$ref": "#/definitions/RabRelSubscription" - } - } - }, - "examples": { - "application/json": { - "RabRelSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_rel/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_rel/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "RabRel_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content. Successful deletion of Rab Release subscription" - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/ca_reconf": { - "get": { - "description": "The GET method can be used to request information about the ca_reconf subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_cr_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors ca_reconf subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ca_reconf", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/ca_reconf/77777", - "subscriptionType": "CA_RECONF" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/ca_reconf/77778", - "subscriptionType": "CA_RECONF" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to Carrier Aggregation Reconfiguration notifications from Radio Network Information Service", - "operationId": "CaReConfSubscription_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.CaReConfSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to Carrier Aggregation Reconfiguration notifications", - "schema": { - "type": "object", - "properties": { - "CaReConfSubscription": { - "$ref": "#/definitions/CaReConfSubscription" - } - } - }, - "examples": { - "application/json": { - "CaReConfSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/ca_reconf/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ca_reconf/sub123" - }, - "filterCriteriaAssoc": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/ca_reconf/{subscriptionId}": { - "get": { - "description": "Gets a subscription to Carrier Aggregation Reconfiguration notifications from Radio Network Information Service", - "operationId": "CaReConfSubscription_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding Carrier Aggregation Reconfiguration notifications", - "schema": { - "type": "object", - "required": [ - "CaReConfSubscription" - ], - "properties": { - "CaReConfSubscription": { - "$ref": "#/definitions/CaReConfSubscription" - } - } - }, - "examples": { - "application/json": { - "CaReConfSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/ca_reconf/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ca_reconf/sub123" - }, - "filterCriteriaAssoc": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to Carrier Aggregation Reconfiguration notifications from Radio Network Information Service", - "operationId": "CaReConfSubscription_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - }, - { - "$ref": "#/parameters/Body.CaReConfSubscription" - } - ], - "responses": { - "200": { - "description": "Successful subscription to Carrier Aggregation Reconfiguration notifications", - "schema": { - "type": "object", - "properties": { - "CaReConfSubscription": { - "$ref": "#/definitions/CaReConfSubscription" - } - } - }, - "examples": { - "application/json": { - "CaReConfSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/ca_reconf/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ca_reconf/sub123" - }, - "filterCriteriaAssoc": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "CaReConf_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "x-swagger-router-controller": "Default" - } - } - }, - "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" - } - } - }, - "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" - }, - "PlmnInfo": { - "type": "object", - "required": [ - "appInsId", - "plmn" - ], - "properties": { - "timeStamp": { - "$ref": "#/definitions/TimeStamp" - }, - "appInsId": { - "$ref": "#/definitions/AppInsId" - }, - "plmn": { - "type": "array", - "items": { - "$ref": "#/definitions/Plmn" - } - } - } - }, - "RabInfo": { - "type": "object", - "required": [ - "appInsId", - "requestId" - ], - "properties": { - "timeStamp": { - "$ref": "#/definitions/TimeStamp" - }, - "appInsId": { - "$ref": "#/definitions/AppInsId" - }, - "requestId": { - "$ref": "#/definitions/RequestId" - }, - "cellUserInfo": { - "type": "array", - "items": { - "$ref": "#/definitions/CellUserInfo" - } - } - } - }, - "S1BearerInfo": { - "type": "object", - "required": [ - "s1UeInfo" - ], - "properties": { - "timeStamp": { - "$ref": "#/definitions/TimeStamp" - }, - "s1UeInfo": { - "type": "array", - "items": { - "$ref": "#/definitions/S1UeInfo" - } - } - } - }, - "S1UeInfo": { - "type": "object", - "required": [ - "ecgi", - "s1BearerInfoDetailed" - ], - "properties": { - "tempUeId": { - "type": "array", - "items": { - "$ref": "#/definitions/TempUeId" - } - }, - "associateId": { - "type": "array", - "items": { - "$ref": "#/definitions/AssociateId" - } - }, - "ecgi": { - "type": "array", - "items": { - "$ref": "#/definitions/Ecgi" - } - }, - "s1BearerInfoDetailed": { - "type": "array", - "items": { - "$ref": "#/definitions/S1BearerInfoDetailed" - } - } - }, - "description": "The information on users per cell." - }, - "S1BearerInfoDetailed": { - "type": "object", - "required": [ - "erabId", - "enbInfo", - "sGwInfo" - ], - "properties": { - "erabId": { - "$ref": "#/definitions/ErabId" - }, - "enbInfo": { - "$ref": "#/definitions/S1EnbInfo" - }, - "sGwInfo": { - "$ref": "#/definitions/SGwInfo" - } - }, - "description": "Information on UEs in the specific cell." - }, - "ErabId": { - "type": "integer", - "format": "int32", - "description": "The element that uniquely identifies a S1 bearer for a specific UE, as defined in ETSI TS 136 413", - "example": 10 - }, - "TempUeId": { - "type": "object", - "required": [ - "mmec", - "mtmsi" - ], - "properties": { - "mmec": { - "$ref": "#/definitions/Mmec" - }, - "mtmsi": { - "$ref": "#/definitions/Mtmsi" - } - } - }, - "Mmec": { - "type": "string", - "description": "MMEC as defined in ETSI TS 136 413", - "example": "0" - }, - "Mtmsi": { - "type": "string", - "description": "M-TMSI as defined in ETSI TS 136 413", - "example": "1234" - }, - "S1EnbInfo": { - "type": "object", - "required": [ - "ipAddress", - "tunnelId" - ], - "properties": { - "ipAddress": { - "type": "string", - "description": "eNB transport layer address of this S1 bearer.", - "example": "192.0.2.0" - }, - "tunnelId": { - "type": "string", - "description": "eNB GTP-U TEID of this S1 bearer.", - "example": "1111" - } - } - }, - "SGwInfo": { - "type": "object", - "required": [ - "ipAddress", - "tunnelId" - ], - "properties": { - "ipAddress": { - "type": "string", - "description": "SGW transport layer address of this S1 bearer.", - "example": "192.0.2.1" - }, - "tunnelId": { - "type": "string", - "description": "SGW GTP-U TEID of this S1 bearer.", - "example": "2222" - } - } - }, - "TimeStamp": { - "type": "object", - "required": [ - "nanoSeconds", - "seconds" - ], - "properties": { - "seconds": { - "type": "integer", - "format": "uint32", - "description": "The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "example": 1577836800 - }, - "nanoSeconds": { - "type": "integer", - "format": "uint32", - "description": "The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "example": 0 - } - } - }, - "AppInsId": { - "type": "string", - "format": "string", - "description": "Unique identifier for the mobile edge application instance", - "example": "01" - }, - "RequestId": { - "type": "string", - "format": "string", - "description": "Unique identifier allocated by the Mobile Edge application for the Information request.", - "example": "01" - }, - "CellUserInfo": { - "type": "object", - "required": [ - "ecgi", - "ueInfo" - ], - "properties": { - "ecgi": { - "$ref": "#/definitions/Ecgi" - }, - "ueInfo": { - "type": "array", - "items": { - "$ref": "#/definitions/UeInfo" - } - } - }, - "description": "The information on users per cell." - }, - "Ecgi": { - "type": "object", - "required": [ - "cellId", - "plmn" - ], - "properties": { - "plmn": { - "$ref": "#/definitions/Plmn" - }, - "cellId": { - "$ref": "#/definitions/CellId" - } - }, - "description": "E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413" - }, - "Plmn": { - "type": "object", - "required": [ - "mcc", - "mnc" - ], - "properties": { - "mcc": { - "type": "string", - "format": "string", - "description": "The Mobile Country Code part of PLMN Identity as defined in 3GPP TS 36.413", - "example": "001" - }, - "mnc": { - "type": "string", - "format": "string", - "description": "The Mobile Network Code part of PLMN Identity as defined in 3GPP TS 36.413", - "example": "01" - } - } - }, - "CellId": { - "type": "array", - "items": { - "type": "string", - "format": "binary" - }, - "description": "The E-UTRAN Cell Identity as a bit string (size (28)), as defined in 3GPP TS 36.413", - "example": "0x800000A" - }, - "UeInfo": { - "type": "object", - "required": [ - "erabInfo" - ], - "properties": { - "associateId": { - "type": "array", - "items": { - "$ref": "#/definitions/AssociateId" - } - }, - "erabInfo": { - "type": "array", - "items": { - "$ref": "#/definitions/ErabQosParameters" - } - } - }, - "description": "Information on UEs in the specific cell." - }, - "AssociateId": { - "type": "object", - "required": [ - "type", - "value" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "RESERVED", - "UE_IPV4_ADDRESS", - "UE_IPV6_ADDRESS", - "NATED_IP_ADDRESS", - "GTP_TEID" - ], - "description": "Numeric value (0-255) corresponding to specified type of identifier", - "example": "UE_IPV4_ADDRESS" - }, - "value": { - "type": "String", - "format": "String", - "description": "Value for the identifier", - "example": "192.0.0.2" - } - } - }, - "ErabQosParameters": { - "type": "object", - "properties": { - "qci": { - "$ref": "#/definitions/Qci" - }, - "qosInformation": { - "type": "array", - "items": { - "$ref": "#/definitions/QosInformation" - } - } - } - }, - "Qci": { - "type": "integer", - "format": "int32", - "description": "QoS Class Identifier as defined in TS 23.401", - "example": 7 - }, - "QosInformation": { - "type": "object", - "required": [ - "erabGbrDl", - "erabGbrUl", - "erabMbrDl", - "erabMbrUl" - ], - "properties": { - "erabMbrDl": { - "type": "integer", - "format": "int32", - "description": "This IE indicates the maximum downlink E-RAB Bit Rate as defined in TS 23.401 for this bearer.", - "example": 10 - }, - "erabMbrUl": { - "type": "integer", - "format": "int32", - "description": "This IE indicates the maximum uplink E-RAB Bit Rate as defined in TS 23.401 for this bearer.", - "example": 10 - }, - "erabGbrDl": { - "type": "integer", - "format": "int32", - "description": "This IE indicates the guaranteed downlink E-RAB Bit Rate as defined in TS 23.401 for this bearer.", - "example": 10 - }, - "erabGbrUl": { - "type": "integer", - "format": "int32", - "description": "This IE indicates the guaranteed uplink E-RAB Bit Rate as defined in TS 23.401 for this bearer.", - "example": 10 - } - } - }, - "SubscriptionLinkList": { - "type": "object", - "required": [ - "_links" - ], - "properties": { - "_links": { - "$ref": "#/definitions/Link" - }, - "subscription": { - "type": "array", - "items": { - "$ref": "#/definitions/Subscription" - } - } - } - }, - "MeasRepUeSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocTri" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "MeasRepUeSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocTri" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "S1BearerSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "s1BearerSubscriptionCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "eventType": { - "$ref": "#/definitions/EventType" - }, - "s1BearerSubscriptionCriteria": { - "$ref": "#/definitions/S1BearerSubscriptionCriteria" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "S1BearerSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "s1BearerSubscriptionCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "eventType": { - "$ref": "#/definitions/EventType" - }, - "s1BearerSubscriptionCriteria": { - "$ref": "#/definitions/S1BearerSubscriptionCriteria" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "RabEstSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocQci" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "RabEstSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocQci" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "RabModSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocQci" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "RabModSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocQci" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "RabRelSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocQci" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "RabRelSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocQci" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "CaReConfSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssoc" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "CaReConfSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssoc" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "CellChangeSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocHo" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "CellChangeSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocHo" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "MeasTaSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssoc" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "MeasTaSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssoc" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "CallbackReference": { - "type": "string", - "format": "uri", - "description": "URL selected by the Mobile Edge application to receive notifications on the subscribed RNIS information.", - "example": "http://meAppClient.example.com/rni/v1/" - }, - "Link": { - "type": "object", - "properties": { - "self": { - "$ref": "#/definitions/LinkType" - } - }, - "description": "List of hyperlinks related to the resource" - }, - "LinkType": { - "description": "URI referring to a resource", - "type": "string", - "format": "uri", - "example": "http://meAppClient.example.com/rni/v1/" - }, - "Subscription": { - "type": "object", - "required": [ - "href", - "subscriptionType" - ], - "properties": { - "href": { - "$ref": "#/definitions/LinkType" - }, - "subscriptionType": { - "$ref": "#/definitions/SubscriptionType" - } - }, - "description": "A link to a subscription." - }, - "SubscriptionType": { - "type": "string", - "description": "Numeric value corresponding to specified type of subscription.", - "enum": [ - "RESERVED", - "CELL_CHANGE", - "RAB_ESTABLISHMENT", - "RAB_MODIFICATION", - "RAB_RELEASE", - "MEAS_REPORT_UE", - "MEAS_TIMING_ADVANCE", - "CA_RECONF", - "S1_BEARE" - ], - "example": "CELL_CHANGE" - }, - "FilterCriteriaAssoc": { - "type": "object", - "properties": { - "appInsId": { - "$ref": "#/definitions/AppInsId" - }, - "associateId": { - "$ref": "#/definitions/AssociateId" - }, - "plmn": { - "$ref": "#/definitions/Plmn" - }, - "cellId": { - "$ref": "#/definitions/CellId" - } - }, - "description": "List of filtering criteria for the subscription." - }, - "FilterCriteriaAssocQci": { - "type": "object", - "properties": { - "appInsId": { - "$ref": "#/definitions/AppInsId" - }, - "associateId": { - "$ref": "#/definitions/AssociateId" - }, - "plmn": { - "$ref": "#/definitions/Plmn" - }, - "cellId": { - "$ref": "#/definitions/CellId" - }, - "qci": { - "$ref": "#/definitions/Qci" - } - }, - "description": "List of filtering criteria for the subscription." - }, - "FilterCriteriaAssocHo": { - "type": "object", - "properties": { - "appInsId": { - "$ref": "#/definitions/AppInsId" - }, - "associateId": { - "$ref": "#/definitions/AssociateId" - }, - "plmn": { - "$ref": "#/definitions/Plmn" - }, - "cellId": { - "$ref": "#/definitions/CellId" - }, - "hoStatus": { - "$ref": "#/definitions/HoStatus" - } - }, - "description": "List of filtering criteria for the subscription." - }, - "FilterCriteriaAssocTri": { - "type": "object", - "properties": { - "appInsId": { - "$ref": "#/definitions/AppInsId" - }, - "associateId": { - "$ref": "#/definitions/AssociateId" - }, - "plmn": { - "$ref": "#/definitions/Plmn" - }, - "cellId": { - "$ref": "#/definitions/CellId" - }, - "trigger": { - "$ref": "#/definitions/Trigger" - } - }, - "description": "List of filtering criteria for the subscription." - }, - "S1BearerSubscriptionCriteria": { - "type": "object", - "properties": { - "associateId": { - "$ref": "#/definitions/AssociateId" - }, - "plmn": { - "$ref": "#/definitions/Plmn" - }, - "cellId": { - "$ref": "#/definitions/CellId" - }, - "erabId": { - "$ref": "#/definitions/ErabId" - } - }, - "description": "List of filtering criteria for the subscription." - }, - "HoStatus": { - "type": "string", - "description": "Description of the subscribed to event", - "enum": [ - "RESERVED", - "IN_PREPARATION", - "IN_EXECUTION", - "COMPLETED", - "REJECTED", - "CANCELLED" - ], - "example": "COMPLETED" - }, - "EventType": { - "type": "string", - "description": "Description of the subscribed event.", - "enum": [ - "RESERVED", - "S1_BEARER_ESTABLISH", - "S1_BEARER_MODIFY", - "S1_BEARER_RELEASE" - ], - "example": "S1_BEARER_ESTABLISH" - }, - "Trigger": { - "type": "string", - "description": "Unique identifier for the mobile edge application instance", - "enum": [ - "NOT_AVAILABLE", - "PERIODICAL_REPORT_STRONGEST_CELLS", - "PERIODICAL_REPORT_STRONGEST_CELLS_FOR_SON", - "PERIODICAL_REPORT_CGI", - "EVENT_A1", - "EVENT_A2", - "EVENT_A3", - "EVENT_A4", - "EVENT_A5", - "EVENT_A6", - "EVENT_B1", - "EVENT_B2", - "EVENT_C1", - "EVENT_C2", - "EVENT_W1", - "EVENT_W2", - "EVENT_W3" - ], - "example": "EVENT_A3" - } - } -} diff --git a/ttcn/LibMec/TrafficManagementAPI/json/BwManagementApi.json b/ttcn/LibMec/TrafficManagementAPI/json/BwManagementApi.json deleted file mode 100644 index 12010d6..0000000 --- a/ttcn/LibMec/TrafficManagementAPI/json/BwManagementApi.json +++ /dev/null @@ -1,629 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "contact": { - "url": "https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api" - }, - "title": "ETSI GS MEC 015 Bandwidth Management API", - "version": "2.1.1", - "description": "The ETSI MEC ISG Bandwidth Management API described using OpenAPI.", - "license": { - "name": "BSD-3-Clause", - "url": "https://forge.etsi.org/legal-matters" - } - }, - "externalDocs": { - "description": "ETSI GS MEC015 V2.1.1 Traffic Management APIs", - "url": "https://www.etsi.org/deliver/etsi_gs/MEC/001_099/015/02.01.01_60/gs_MEC015v020101p.pdf" - }, - "servers": [ - { - "url": "https://localhost/bwm/v1" - } - ], - "tags": [ - { - "name": "bwm" - } - ], - "paths": { - "/bw_allocations": { - "get": { - "tags": [ - "bwm" - ], - "summary": "Retrieve information about a list of bandwidthAllocation resources", - "description": "Retrieves information about a list of bandwidthAllocation resources. Typically used in 'Get configured bandwidth allocation from Bandwidth Management Service' procedure as described in clause 6.2.5.", - "operationId": "bandwidthAllocationListGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.app_instance_id" - }, - { - "$ref": "#/components/parameters/Query.app_name" - }, - { - "$ref": "#/components/parameters/Query.session_id" - } - ], - "responses": { - "200": { - "description": "Upon success, a response body containing an array of the bandwidthAllocations is returned.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BwInfo" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - }, - "post": { - "tags": [ - "bwm" - ], - "summary": "Create a bandwidthAllocation resource", - "description": "Used to create a bandwidthAllocation resource. Typically used in 'Register to Bandwidth Management Service' procedure as described in clause 6.2.1.", - "operationId": "bandwidthAllocationPOST", - "parameters": [], - "requestBody": { - "description": "Entity body in the request contains BwInfo to be created.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BwInfo" - } - } - } - }, - "responses": { - "201": { - "description": "Upon success, the HTTP response shall include a 'Location' HTTP header that contains the resource URI of the created resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BwInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - }, - "/bw_allocations/{allocationId}": { - "get": { - "tags": [ - "bwm" - ], - "summary": "Retrieve information about a specific bandwidthAllocation", - "description": "Retrieves information about a bandwidthAllocation resource. Typically used in 'Get configured bandwidth allocation from Bandwidth Management Service' procedure as described in clause 6.2.5.", - "operationId": "bandwidthAllocationGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.allocationId" - } - ], - "responses": { - "200": { - "description": "Used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BwInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - }, - "put": { - "tags": [ - "bwm" - ], - "summary": "Update the information about a specific bandwidthAllocation", - "description": "Updates the information about a bandwidthAllocation resource. As specified in ETSI GS MEC 009 [6], the PUT HTTP method has 'replace' semantics.", - "operationId": "bandwidthAllocationPUT", - "requestBody": { - "description": "BwInfo with updated information is included as entity body of the request.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BwInfo" - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.allocationId" - } - ], - "responses": { - "200": { - "description": "Used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BwInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "412": { - "$ref": "#/components/responses/412" - } - } - }, - "patch": { - "tags": [ - "bwm" - ], - "summary": "Modify the information about a specific existing bandwidthAllocation by sending updates on the data structure", - "description": "Updates the information about a bandwidthAllocation resource. As specified in ETSI GS MEC 009 [6], the PATCH HTTP method updates a resource on top of the existing resource state by just including the changes ('deltas') in the request body.", - "operationId": "bandwidthAllocationPATCH", - "requestBody": { - "description": "Description of the changes to instruct the server how to modify the resource representation.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BwInfoDeltas" - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.allocationId" - } - ], - "responses": { - "200": { - "description": "Used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BwInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "412": { - "$ref": "#/components/responses/412" - } - } - }, - "delete": { - "tags": [ - "bwm" - ], - "summary": "Remove a specific bandwidthAllocation", - "description": "Used in 'Unregister from Bandwidth Management Service' procedure as described in clause 6.2.3.", - "operationId": "bandwidthAllocationDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.allocationId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - } - }, - "components": { - "responses": { - "204": { - "description": "Upon success, a response 204 No Content without any response body is returned." - }, - "400": { - "description": "Bad Request : used to indicate that incorrect parameters were passed to the request.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden : operation is not allowed given the current status of the resource.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed : used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts when using PUT", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "parameters": { - "Path.allocationId": { - "name": "allocationId", - "in": "path", - "description": "Represents a bandwidth allocation instance", - "required": true, - "schema": { - "type": "string" - } - }, - "Query.app_instance_id": { - "name": "app_instance_id", - "in": "query", - "description": "A MEC application instance may use multiple app_instance_ids as an input parameter to query the bandwidth allocation of a list of MEC application instances. See note.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.app_name": { - "name": "app_name", - "in": "query", - "description": "A MEC application instance may use multiple app_names as an input parameter to query the bandwidth allocation of a list of MEC application instances. See note.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.session_id": { - "name": "session_id", - "in": "query", - "description": "A MEC application instance may use session_id as an input parameter to query the bandwidth allocation of a list of sessions. See note.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "schemas": { - "BwInfo": { - "properties": { - "allocationDirection": { - "description": "The direction of the requested BW allocation: 00 = Downlink (towards the UE) 01 = Uplink (towards the application/session) 10 = Symmetrical", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appInsId": { - "description": "Application instance identifier", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "fixedAllocation": { - "description": "Size of requested fixed BW allocation in [bps]", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "fixedBWPriority": { - "description": "Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document", - "enum": [ - "SEE_DESCRIPTION" - ], - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Enum" - }, - "requestType": { - "description": "Numeric value (0 - 255) corresponding to specific type of consumer as following: 0 = APPLICATION_SPECIFIC_BW_ALLOCATION 1 = SESSION_SPECIFIC_BW_ALLOCATION", - "type": "integer", - "enum": [ - 0, - 1 - ], - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Enum_inlined" - }, - "sessionFilter": { - "description": "Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a single session only. In case multiple sessions match sessionFilter the request shall be rejected", - "items": { - "type": "object", - "properties": { - "dstAddress": { - "description": "Destination address identity of session (including range)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "dstPort": { - "description": "Destination port identity of session", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - }, - "protocol": { - "description": "Protocol number", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "sourceIp": { - "description": "Source address identity of session (including range)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "sourcePort": { - "description": "Source port identity of session", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - } - } - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "timeStamp": { - "description": "Time stamp to indicate when the corresponding information elements are sent", - "properties": { - "nanoSeconds": { - "description": "The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "seconds": { - "format": "uint32", - "type": "integer", - "description": "The seconds part of the Time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "required": [ - "seconds", - "nanoSeconds" - ], - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - } - }, - "required": [ - "appInsId", - "requestType", - "fixedAllocation", - "allocationDirection" - ], - "type": "object", - "x-etsi-ref": "7.2.2" - }, - "BwInfoDeltas": { - "properties": { - "allocationDirection": { - "description": "The direction of the requested BW allocation: 00 = Downlink (towards the UE) 01 = Uplink (towards the application/session) 10 = Symmetrical", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "appInsId": { - "description": "Application instance identifier", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "fixedAllocation": { - "description": "Size of requested fixed BW allocation in [bps]", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "fixedBWPriority": { - "description": "Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document", - "enum": [ - "SEE DESCRIPTION" - ], - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Enum_inlined" - }, - "requestType": { - "description": "Numeric value (0 - 255) corresponding to specific type of consumer as following: 0 = APPLICATION_SPECIFIC_BW_ALLOCATION 1 = SESSION_SPECIFIC_BW_ALLOCATION", - "type": "string", - "enum": [ - 0, - 1 - ], - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Enum_inlined" - }, - "sessionFilter": { - "description": "Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a single session only. In case multiple sessions match sessionFilter the request shall be rejected", - "items": { - "type": "object", - "properties": { - "dstAddress": { - "description": "Destination address identity of session (including range)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "dstPort": { - "description": "Destination port identity of session", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - }, - "protocol": { - "description": "Protocol number", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "sourceIp": { - "description": "Source address identity of session (including range)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "sourcePort": { - "description": "Source port identity of session ", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - } - } - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Structure (inlined)" - } - }, - "required": [ - "appInsId", - "requestType" - ], - "type": "object", - "x-etsi-ref": "7.2.3" - }, - "ProblemDetails": { - "properties": { - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "instance": { - "description": "A URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "status": { - "description": "The HTTP status code for this occurrence of the problem", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "title": { - "description": "A short, human-readable summary of the problem type", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "type": { - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - } - }, - "type": "object" - } - } - } -} diff --git a/ttcn/LibMec/TrafficManagementAPI/json/TrafficSteeringApi.json b/ttcn/LibMec/TrafficManagementAPI/json/TrafficSteeringApi.json deleted file mode 100644 index 2a5b292..0000000 --- a/ttcn/LibMec/TrafficManagementAPI/json/TrafficSteeringApi.json +++ /dev/null @@ -1,657 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "contact": { - "url": "https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api" - }, - "title": "ETSI GS MEC 015 Multi-access Traffic Steering APIs", - "version": "2.1.1", - "description": "The present document focuses on the Multi-access Traffic Steering multi-access edge service. It describes the related application policy information including authorization and access control, information flows, required information and service aggregation patterns. The present document specifies the necessary API with the data model and data format.", - "license": { - "name": "BSD-3-Clause", - "url": "https://forge.etsi.org/legal-matters" - } - }, - "externalDocs": { - "description": "ETSI GS MEC015 V2.1.1 Traffic Management APIs", - "url": "https://www.etsi.org/deliver/etsi_gs/MEC/001_099/015/02.01.01_60/gs_MEC015v020101p.pdf" - }, - "servers": [ - { - "url": "https://localhost/mts/v1" - } - ], - "tags": [ - { - "name": "mts" - } - ], - "paths": { - "/mts_capability_info": { - "get": { - "tags": [ - "mts" - ], - "summary": "Retrieve the MTS capability informations", - "description": "Used to query information about the MTS information. Typically used in the 'Get MTS service Info from the MTS Service' procedure as described in clause 6.2.6.", - "operationId": "mtsCapabilityInfoGET", - "parameters": [], - "responses": { - "200": { - "description": "Upon success, a response body containing the MTS capability information is returned.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MtsCapabilityInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - }, - "/mts_sessions": { - "get": { - "tags": [ - "mts" - ], - "summary": "Retrieve information about a list of MTS sessions", - "description": "Retrieves information about a list of MTS sessions. Typically used in the 'Get configured MTS Session Info from the MTS Service' procedure as described in clause 6.2.10.", - "operationId": "mtsSessionsListGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.app_instance_id" - }, - { - "$ref": "#/components/parameters/Query.app_name" - }, - { - "$ref": "#/components/parameters/Query.session_id" - } - ], - "responses": { - "200": { - "description": "Upon success, a response body containing an array of the MTS sessions is returned.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - }, - "post": { - "tags": [ - "mts" - ], - "summary": "Create a MTS session", - "description": "Used to create a MTS session. This method is typically used in 'Register application to the MTS Service' procedure as described in clause 6.2.7.", - "operationId": "mtsSessionPOST", - "parameters": [], - "requestBody": { - "description": "Entity body in the request contains MtsSessionInfo to be created.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } - } - }, - "responses": { - "201": { - "description": "Upon success, the HTTP response shall include a 'Location' HTTP header that contains the resource URI of the created resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - }, - "/mts_sessions/{sessionId}": { - "get": { - "tags": [ - "mts" - ], - "summary": "Retrieve information about specific MTS session", - "description": "Retrieves information about an individual MTS session. Typically used in the 'Get configured MTS Session Info from the MTS Service' procedure as described in clause 6.2.10.", - "operationId": "mtsSessionGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.sessionId" - } - ], - "responses": { - "200": { - "description": "Used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - }, - "put": { - "tags": [ - "mts" - ], - "summary": "Update the information about specific MTS session", - "description": "Updates the information about an individual MTS session. As specified in ETSI GS MEC 009 [6], the PUT HTTP method has 'replace' semantics. ", - "operationId": "mtsSessionPUT", - "parameters": [ - { - "$ref": "#/components/parameters/Path.sessionId" - } - ], - "requestBody": { - "description": "MtsSessionInfo with updated information is included as entity body of the request.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } - } - }, - "responses": { - "200": { - "description": "Used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "412": { - "$ref": "#/components/responses/412" - } - } - }, - "delete": { - "tags": [ - "mts" - ], - "summary": "Remove specific MTS session", - "description": "DELETE method is typically used in 'Unregister from the MTS Service' procedure as described in clause 6.2.8.", - "operationId": "mtsSessionDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.sessionId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - } - }, - "components": { - "responses": { - "204": { - "description": "Upon success, a response 204 No Content without any response body is returned." - }, - "400": { - "description": "Bad Request : used to indicate that incorrect parameters were passed to the request.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden : operation is not allowed given the current status of the resource.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed : used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts when using PUT", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "parameters": { - "Path.sessionId": { - "name": "sessionId", - "in": "path", - "description": "Represents a MTS session instance", - "required": true, - "schema": { - "type": "string" - } - }, - "Query.app_instance_id": { - "name": "app_instance_id", - "in": "query", - "description": "A MEC application instance may use multiple app_instance_ids as an input parameter to query the MTS session of a list of MEC application instances. See note.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.app_name": { - "name": "app_name", - "in": "query", - "description": "A MEC application instance may use multiple app_names as an input parameter to query the MTS session of a list of MEC application instances. See note.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.session_id": { - "name": "session_id", - "in": "query", - "description": "A MEC application instance may use session_id as an input parameter to query the information of a list of MTS sessions. See note.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "schemas": { - "MtsCapabilityInfo": { - "properties": { - "mtsAccessInfo": { - "description": "The information on access network connection as defined below", - "items": { - "type": "object", - "properties": { - "accessId": { - "format": "uint32", - "type": "integer", - "description": "Unique identifier for the access network connection", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "accessType": { - "format": "uint32", - "type": "integer", - "description": "Numeric value (0-255) corresponding to specific type of access network as following: 0 = Unknown 1 = Any IEEE802.11-based WLAN technology 2 = Any 3GPP-based Cellular technology 3 = Any Fixed Access 11 = IEEE802.11 a/b/g WLAN 12 = IEEE 802.11 a/b/g/n WLAN 13 = IEEE 802.11 a/b/g/n/ac WLAN 14 = IEEE 802.11 a/b/g/n/ac/ax WLAN (Wi-Fi 6) 15 = IEEE 802.11 b/g/n WLAN 31 = 3GPP GERAN/UTRA (2G/3G) 32 = 3GPP E-UTRA (4G/LTE) 33 = 3GPP NR (5G)", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "metered": { - "format": "uint32", - "type": "integer", - "description": "Numeric value (0-255) corresponding to the following: 0: the connection is not metered (see note) 1: the connection is metered 2: unknown ", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - } - } - }, - "required": [ - "accessId", - "accessType", - "metered" - ], - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "mtsMode": { - "description": "Numeric value corresponding to a specific MTS operation supported by the TMS 0 = low cost, i.e. using the unmetered access network connection whenever it is available 1 = low latency, i.e. using the access network connection with lower latency 2 = high throughput, i.e. using the access network connection with higher throughput, or/and multiple access network connection simultaneously if supported 3 = redundancy, i.e. sending duplicated (redundancy) packets over multiple access network connections for highreliability and low-latency applications 4 = QoS, i.e. performing MTS based on the specific QoS requirements from the app", - "items": { - "type": "integer", - "format": "uint32" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "Uint32" - }, - "timeStamp": { - "description": "Time stamp to indicate when the corresponding information elements are sent", - "properties": { - "nanoSeconds": { - "format": "uint32", - "type": "integer", - "description": "Time in nanoseconds in Unix-time since January 1, 1970, 00:00:00 UTC", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "seconds": { - "description": "Time in seconds in Unix-time since January 1, 1970, 00:00:00 UTC", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "required": [ - "seconds", - "nanoSeconds" - ], - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - } - }, - "required": [ - "mtsAccessInfo", - "mtsMode" - ], - "type": "object", - "x-etsi-notes": "NOTE:\tA metered connection is a network connection that has a maximum data usage in a specific period, e.g. per hour/day/week/month. The user may get billed extra charges if they go over the allotted amount.", - "x-etsi-ref": "7.2.4" - }, - "MtsSessionInfo": { - "properties": { - "appInsId": { - "description": "Application instance identifier", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "flowFilter": { - "description": "Traffic flow filtering criteria, applicable only if when requestType is set as FLOW_SPECIFIC_MTS_SESSION. Any filtering criteria shall define a single session only. In case multiple sessions match flowFilter the request shall be rejected. If the flowFilter field is included, at least one of its subfields shall be included. Any flowFilter subfield that is not included shall be ignored in traffic flow filtering", - "items": { - "type": "object", - "properties": { - "dscp": { - "format": "uint32", - "type": "integer", - "description": "DSCP in the IPv4 header or Traffic Class in the IPv6 header", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dstIp": { - "description": "Destination address identity of session (including range)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "dstPort": { - "description": "Destination port identity of session", - "items": { - "type": "integer", - "format": "uint32" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Uint32" - }, - "flowlabel": { - "format": "uint32", - "type": "integer", - "description": "Flow Label in the IPv6 header, applicable only if the flow is IPv6", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "protocol": { - "format": "uint32", - "type": "integer", - "description": "Protocol number", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "sourceIp": { - "description": "Source address identity of session (including range)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "sourcePort": { - "description": "Source port identity of session", - "items": { - "type": "integer", - "format": "uint32" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Uint32" - } - } - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "mtsMode": { - "format": "uint32", - "type": "integer", - "description": "Numeric value (0 - 255) corresponding to a specific MTS mode of the MTS session: 0 = low cost, i.e. using the unmetered access network connection whenever it is available 1 = low latency, i.e. using the access network connection with lower latency 2 = high throughput, i.e. using the access network connection with higher throughput, or multiple access network connection simultaneously 3 = redundancy, i.e. sending duplicated (redundancy) packets over multiple access network connections for high-reliability and low-latency applications 4 = QoS, i.e. performing MTS based on the QoS requirement (qosD)", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "qosD": { - "description": "QoS requirement description of the MTS session, applicable only if mtsMode = 4 (QoS). If the qosD field is included, at least one of its subfields shall be included. Any qosD subfield that is not included shall be ignored in Multi-access Traffic Steering (MTS)", - "properties": { - "maxJitter": { - "description": "tolerable jitter in [10 nanoseconds]", - "type": "integer", - "format": "uint32", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "maxLatency": { - "description": "tolerable (one-way) delay in [10 nanoseconds]", - "type": "integer", - "format": "uint32", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "maxLoss": { - "description": "tolerable packet loss rate in [1/10^x]", - "type": "integer", - "format": "uint32", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "minTpt": { - "description": "minimal throughput in [kbps]", - "type": "integer", - "format": "uint32", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "priority": { - "description": "numeric value (0 - 255) corresponding to the traffic priority 0: low; 1: medium; 2: high; 3: critical", - "type": "integer", - "format": "uint32", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "type": "object", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Structure" - }, - "requestType": { - "description": "Numeric value (0 - 255) corresponding to specific type of consumer as following: 0 = APPLICATION_SPECIFIC_MTS_SESSION 1 = FLOW_SPECIFIC_MTS_SESSION", - "enum": [ - 0, - 1 - ], - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Enum_inlined" - }, - "timeStamp": { - "description": "Time stamp to indicate when the corresponding information elements are sent ", - "properties": { - "nanoSeconds": { - "format": "uint32", - "type": "integer", - "description": "The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "seconds": { - "format": "uint32", - "type": "integer", - "description": "The seconds part of the Time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "required": [ - "seconds", - "nanoSeconds" - ], - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "trafficDirection": { - "description": "The direction of the requested MTS session: 00 = Downlink (towards the UE) 01 = Uplink (towards the application/session) 10 = Symmetrical (see note) ", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "appInsId", - "requestType", - "flowFilter", - "qosD", - "mtsMode", - "trafficDirection" - ], - "type": "object", - "x-etsi-notes": "NOTE:\tFor the downlink direction of a symmetrical flow, \"sourceIp\" and \"sourcePort\" in the \"flowFilter\" structure are used for source address and port, respectively; \"dstIp\" and \"dstPort\" are used for destination address and port, respectively. For the uplink direction of a symmetrical flow, \"sourceIp\" and \"sourcePort\" are used for destination address and port, respectively; \"dstIp\" and \"dstPort\" are used for source address and port, respectively.", - "x-etsi-ref": "7.2.5" - }, - "ProblemDetails": { - "properties": { - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "instance": { - "description": "A URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "status": { - "description": "The HTTP status code for this occurrence of the problem", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "title": { - "description": "A short, human-readable summary of the problem type", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "type": { - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - } - }, - "type": "object" - } - } - } -} diff --git a/ttcn/LibMec/UEAppInterfaceAPI/json/UEAppInterfaceAPI.json b/ttcn/LibMec/UEAppInterfaceAPI/json/UEAppInterfaceAPI.json deleted file mode 100644 index c5ee3fc..0000000 --- a/ttcn/LibMec/UEAppInterfaceAPI/json/UEAppInterfaceAPI.json +++ /dev/null @@ -1,618 +0,0 @@ -{ - "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/UEidentityAPI/json/UEidentityAPI.json b/ttcn/LibMec/UEidentityAPI/json/UEidentityAPI.json deleted file mode 100644 index cc5098e..0000000 --- a/ttcn/LibMec/UEidentityAPI/json/UEidentityAPI.json +++ /dev/null @@ -1,310 +0,0 @@ -{ - "openapi": "3.0.2", - "info": { - "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" - }, - "security": [ - { - "OauthSecurity": [ - "all" - ] - } - ], - "servers": [ - { - "url": "http://127.0.0.1:8081/ui/v1" - }, - { - "url": "https://127.0.0.1:8081/ui/v1" - } - ], - "tags": [ - { - "name": "ueIdentityTagInfo" - } - ], - "paths": { - "/{appInstanceId}/ue_identity_tag_info": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AppInstanceId" - } - ], - "get": { - "description": "Retrieves information about a specific UeIdentityTagInfo resource", - "operationId": "UeIdentityTagInfo_GET", - "tags": [ - "ueIdentityTagInfo" - ], - "parameters": [ - { - "$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.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UeIdentityTagInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "put": { - "description": "Register/De-register the information about specific a UeIdentityTagInfo resource", - "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", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UeIdentityTagInfo" - } - } - } - }, - "400": { - "$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": { - "$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. More information should be provided in the \"detail\" attribute of the \"ProblemDetails\" structure.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "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": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - }, - "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" - } - } - } - } - }, - "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" - }, - "UeIdentityTagInfo": { - "description": "information of UE identity tag used in UE Identity feature", - "type": "object", - "required": [ - "ueIdentityTags" - ], - "properties": { - "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" - } - } - } -} \ No newline at end of file diff --git a/ttcn/LibMec/V2XInformationServiceAPI/json/MEC030_V2XInformationService.yaml b/ttcn/LibMec/V2XInformationServiceAPI/json/MEC030_V2XInformationService.yaml deleted file mode 100644 index 4dc7cf3..0000000 --- a/ttcn/LibMec/V2XInformationServiceAPI/json/MEC030_V2XInformationService.yaml +++ /dev/null @@ -1,1568 +0,0 @@ -info: - title: "ETSI GS MEC 030 V2X Information Service API" - version: 2.1.1 - description: "ETSI GS MEC 030 V2X Information Service API described using OpenAPI." - contact: - name: ETSI Forge - email: cti_support@etsi.org - url: https://forge.etsi.org/rep/mec/gs030-vis-api - license: - name: BSD-3-Clause - url: 'https://forge.etsi.org/legal-matters' -externalDocs: - description: "ETSI GS MEC 030 V2X Information Service API, v2.1.1" - url: 'https://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.01.01_60/gs_mec030v020101p.pdf' -openapi: 3.0.0 -servers: - - url: 'https://localhost/vis/v1' -tags: - - name: queries - description: Queries - - name: subscription - description: Subscription - -paths: - /queries/uu_unicast_provisioning_info: - get: - tags: - - 'queries' - summary: 'Used to query provisioning information for V2X communication over Uu unicast.' - description: 'Used to query provisioning information for V2X communication over Uu unicast.' - operationId: prov_info_uu_unicastGET - parameters: - - in: query - name: location_info - schema: - type: string - required: true - description: 'Comma separated list of locations to identify a cell of a base station or a particular geographical area' - - responses: - '200': - description: 'A response body containing the Uu unicast provisioning information. ' - content: - application/json: - schema: - $ref: '#/components/schemas/UuUnicastProvisioningInfo' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - - /queries/uu_mbms_provisioning_info: - get: - tags: - - 'queries' - summary: 'retrieve information required for V2X communication over Uu MBMS.' - description: 'retrieve information required for V2X communication over Uu MBMS.' - operationId: prov_info_uu_mbmsGET - parameters: - - in: query - name: location_info - schema: - type: string - required: true - description: 'omma separated list of locations to identify a cell of a base station or a particular geographical area' - - responses: - '200': - description: 'A response body containing the Uu unicast provisioning information. ' - content: - application/json: - schema: - $ref: '#/components/schemas/UuMbmsProvisioningInfo' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - - /queries/pc5_provisioning_info: - get: - tags: - - 'queries' - summary: 'Query provisioning information for V2X communication over PC5.' - description: 'Query provisioning information for V2X communication over PC5.' - operationId: prov_infoGET - parameters: - - in: query - name: location_info - schema: - type: string - required: true - description: 'Comma separated list of locations to identify a cell of a base station or a particular geographical area' - responses: - '200': - description: 'A response body containing the PC5 provisioning information is returned.' - content: - application/json: - schema: - $ref: '#/components/schemas/Pc5ProvisioningInfo' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - - /provide_predicted_qos: - post: - tags: - - 'QoS' - summary: 'Request the predicted QoS correspondent to potential routes of a vehicular UE.' - description: 'Request the predicted QoS correspondent to potential routes of a vehicular UE.' - operationId: predicted_qosPOST - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PredictedQos' - responses: - '200': - description: 'The response body shall contain the predicted QoS corresponding to potential routes of a vehicular UE' - content: - application/json: - schema: - $ref: '#/components/schemas/PredictedQos' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - - /publish_v2x_message: - post: - tags: - - 'V2X_msg' - summary: 'Used to publish a V2X message.' - description: 'Used to publish a V2X message.' - operationId: v2x_messagePOST - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/V2xMsgPublication' - responses: - '204': - $ref: '#/components/responses/204' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - - /subscriptions: - get: - tags: - - 'subscription' - summary: 'Request information about the subscriptions for this requestor.' - description: 'Request information about the subscriptions for this requestor.' - operationId: subGET - parameters: - - in: query - name: subscription_type - description: 'Query parameter to filter on a specific subscription type. Permitted values: prov_chg_uu_uni: provisioning information change for V2X communication over Uuunicast prov_chg_uu_mbms: provisioning information change for V2X communication over Uu MBMS prov_chg_uu_pc5: provisioning information change for V2X communication over PC5. v2x_msg: V2X interoperability message' - schema: - type: string - required: false - responses: - '200': - description: 'A response body containing the list of links to requestor subscriptions is returned.' - content: - application/json: - schema: - $ref: '#/components/schemas/SubscriptionLinkList' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - post: - tags: - - 'subscription' - summary: ' create a new subscription to VIS notifications.' - description: ' create a new subscription to VIS notifications.' - operationId: subPOST - requestBody: - required: true - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/ProvChgUuUniSubscription' - - $ref: '#/components/schemas/ProvChgUuMbmsSubscription' - - $ref: '#/components/schemas/ProvChgPc5Subscription' - - $ref: '#/components/schemas/V2xMsgSubscription' - responses: - '201': - description: 'In the returned NotificationSubscription structure, the created subscription is described using the appropriate data type.' - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/ProvChgUuUniSubscription' - - $ref: '#/components/schemas/ProvChgUuMbmsSubscription' - - $ref: '#/components/schemas/ProvChgPc5Subscription' - - $ref: '#/components/schemas/V2xMsgSubscription' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '415': - $ref: '#/components/responses/415' - '422': - $ref: '#/components/responses/422' - '429': - $ref: '#/components/responses/429' - - callbacks: - notification: - '{$request.body#/callbackReference}': - post: - summary: 'Callback POST used to send a notification' - description: 'A notification from VIS.' - operationId: notificationPOST - requestBody: - description: Subscription notification - required: true - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/ProvChgUuUniNotification' - - $ref: '#/components/schemas/ProvChgUuMbmsNotification' - - $ref: '#/components/schemas/ProvChgPc5Notification' - - $ref: '#/components/schemas/V2xMsgNotification' - responses: - '204': - $ref: '#/components/responses/204' - - /subscriptions/{subscriptionId}: - parameters: - - in: path - name: subscriptionId - description: 'Refers to created subscription, where the VIS API allocates a unique resource name for this subscription' - schema: - type: string - required: true - - - get: - tags: - - 'subscription' - summary: 'Retrieve information about this subscription.' - description: 'Retrieve information about this subscription.' - operationId: individualSubscriptionGET - - responses: - '200': - description: 'A response body containing the data type describing the specific RNI event subscription is returned' - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/ProvChgUuUniSubscription' - - $ref: '#/components/schemas/ProvChgUuMbmsSubscription' - - $ref: '#/components/schemas/ProvChgPc5Subscription' - - $ref: '#/components/schemas/V2xMsgSubscription' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - - put: - tags: - - 'subscription' - summary: 'Used to update the existing subscription.' - description: 'Used to update the existing subscription.' - operationId: individualSubscriptionPUT - requestBody: - required: true - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/ProvChgUuUniSubscription' - - $ref: '#/components/schemas/ProvChgUuMbmsSubscription' - - $ref: '#/components/schemas/ProvChgPc5Subscription' - - $ref: '#/components/schemas/V2xMsgSubscription' - responses: - '200': - description: 'A response body containing data type describing the updated subscription is returned' - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/ProvChgUuUniSubscription' - - $ref: '#/components/schemas/ProvChgUuMbmsSubscription' - - $ref: '#/components/schemas/ProvChgPc5Subscription' - - $ref: '#/components/schemas/V2xMsgSubscription' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - - '403': - $ref: '#/components/responses/403' - - '404': - $ref: '#/components/responses/404' - - '406': - $ref: '#/components/responses/406' - - '412': - $ref: '#/components/responses/412' - - '422': - $ref: '#/components/responses/422' - - '429': - $ref: '#/components/responses/429' - delete: - tags: - - 'subscription' - summary: 'Used to cancel the existing subscription.' - description: 'Used to cancel the existing subscription.' - operationId: individualSubscriptionDELETE - responses: - '204': - $ref: '#/components/responses/204' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '429': - $ref: '#/components/responses/429' - - # /notifitication_end_point_provided_by_client - #post: - -components: - schemas: - CellId: - properties: - cellId: - description: E-UTRAN Cell Identity as a bit string (size (28)). - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - cellId - type: object - x-etsi-ref: 6.6.2 - Earfcn: - properties: - earfcn: - description: E-UTRA Absolute Radio Frequency Channel Number, range (0... 65535) - type: integer - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Integer - required: - - earfcn - type: object - x-etsi-ref: 6.6.3 - Ecgi: - properties: - cellId: - # description': The E-UTRAN Cell Identity. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': CellId - $ref: '#/components/schemas/CellId' - plmn: - # description': Public Land Mobile Network Identity. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Plmn - $ref: '#/components/schemas/Plmn' - required: - - plmn - - cellId - type: object - x-etsi-ref: 6.5.5 - FddInfo: - properties: - dlEarfcn: - # description': '' - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Earfcn - $ref: '#/components/schemas/Earfcn' - dlTransmissionBandwidth: - # description': '' - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': TransmissionBandwidth - $ref: '#/components/schemas/TransmissionBandwidth' - ulEarfcn: - # description': '' - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Earfcn - $ref: '#/components/schemas/Earfcn' - ulTransmissionBandwidth: - # description': '' - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': TransmissionBandwidth - $ref: '#/components/schemas/TransmissionBandwidth' - required: - - ulEarfcn - - dlEarfcn - - ulTransmissionBandwidth - - dlTransmissionBandwidth - type: object - x-etsi-ref: 6.5.6 - - LocationInfo.geoArea: - description: Information of a geographical area. - properties: - latitude: - description: 'Latitude (DATUM = WGS84) -90 to 90 in decimal degree format DDD.ddd' - format: Float - type: number - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Float - longitude: - description: 'Longitude (DATUM = WGS84)-180 to 180 in decimal degree format DDD.ddd' - format: Float - type: number - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Float - required: - - latitude - - longitude - type: object - x-etsi-mec-cardinality: 0..1 - - LocationInfo: - properties: - ecgi: - # description': E-UTRAN CelI Global Identifier of the serving cell. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': Ecgi - $ref: '#/components/schemas/Ecgi' - geoArea: - $ref: '#/components/schemas/LocationInfo.geoArea' - type: object - x-etsi-notes: "NOTE:\tEither ecgi or geoArea shall be present, but not both." - x-etsi-ref: 6.5.3 - Pc5NeighbourCellInfo: - properties: - ecgi: - # description': E-UTRAN CelI Global Identifier. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Ecgi - $ref: '#/components/schemas/Ecgi' - plmn: - # description': Public Land Mobile Network Identity. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Plmn - $ref: '#/components/schemas/Plmn' - siV2xConfig: - description: V2X sidelink communication configuration, as defined in ETSI TS 136 331 [i.11]. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': SystemInformationBlockType21 (as defined in ETSI TS 136 331 [i.11]) - type: string - required: - - plmn - - ecgi - - siV2xConfig - type: object - x-etsi-ref: 6.5.12 - - - Pc5ProvisioningInfo.proInfoPc5: - description: The provisioning information per location as defined below. - - properties: - dstLayer2Id: - description: "For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID, see ETSI TS\_136\_321 [i.12].\nPLMN operators coordinate to make sure Destination Layer-2 ID(s) for different V2X services are configured in a consistent manner." - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5. - items: - $ref: '#/components/schemas/Pc5NeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: Pc5NeighbourCellInfo - required: - - locationInfo - - dstLayer2Id - - Pc5ProvisioningInfo: - properties: - proInfoPc5: - type: array - items: - $ref: '#/components/schemas/Pc5ProvisioningInfo.proInfoPc5' - timeStamp: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - required: - - proInfoPc5 - type: object - x-etsi-ref: 6.2.4 - - Plmn: - properties: - mcc: - description: The Mobile Country Code part of PLMN Identity. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - mnc: - description: The Mobile Network Code part of PLMN Identity. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - mcc - - mnc - type: object - x-etsi-ref: 6.5.4 - - PredictedQos.routes.routeInfo: - required: - - location - properties: - location: - $ref: '#/components/schemas/LocationInfo' - time: - $ref: '#/components/schemas/TimeStamp' - rsrp: - description: 'Reference Signal Received Quality as defined in ETSI TS 136 214 [i.13]. Shall only be included in the response' - type: integer - format: Uint8 - - rsrq: - description: 'Reference Signal Received Quality as defined in ETSI TS 136 214 [i.13]. Shall only be included in the response' - type: integer - format: Uint8 - - PredictedQos.routes: - properties: - routeinfo: - description: 'Information relating to a specific route. The first structure shall relate to the route origin and the last to the route destination. Intermediate waypoint locations may also be provided. ' - type: array - minItems: 2 - items: - $ref: '#/components/schemas/PredictedQos.routes.routeInfo' - required: - - routeinfo - - PredictedQos: - description: 'predicted QoS of a vehicular UE' - properties: - timeGranularity: - $ref: '#/components/schemas/TimeStamp' - locationGranularity: - description: 'Granularity of visited location. Measured in meters' - type: string - routes: - type: array - items: - $ref: '#/components/schemas/PredictedQos.routes' - required: - - locationGranularity - - routes - type: object - x-etsi-mec-cardinality: 0..1 - - - ProvChgPc5Notification: - properties: - dstLayer2Id: - description: For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID, see ETSI TS 136 321 [i.12]. - type: string - x-etsi-mec-cardinality: 0..1 - x-etsi-mec-origin-type: String - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5. - items: - $ref: '#/components/schemas/Pc5NeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: Pc5NeighbourCellInfo - notificationType: - description: Shall be set to "ProvChgPc5Notification". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - timeStamp: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - required: - - notificationType - - locationInfo - type: object - x-etsi-ref: 6.4.4 - - ProvChgPc5Subscription.links: - description: Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests. - properties: - self: - # description': Self-referring URI. The URI shall be unique within the VIS API as it acts as an ID for the subscription. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LinkType - $ref: '#/components/schemas/LinkType' - required: - - self - type: object - x-etsi-mec-cardinality: 0..1 - - ProvChgPc5Subscription.filterCriteria: - description: List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response. - properties: - dstLayer2Id: - description: For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID, see ETSI TS 136 321 [i.12]. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5. - items: - $ref: '#/components/schemas/Pc5NeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: Pc5NeighbourCellInfo - required: - - locationInfo - - dstLayer2Id - type: object - x-etsi-mec-cardinality: '1' - ProvChgPc5Subscription: - properties: - _links: - $ref: '#/components/schemas/ProvChgPc5Subscription.links' - callbackReference: - description: URI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response. - format: uri - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: URI - expiryDeadline: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - filterCriteria: - $ref: '#/components/schemas/ProvChgPc5Subscription.filterCriteria' - subscriptionType: - description: Shall be set to "ProvChgPc5Subscription". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - subscriptionType - - callbackReference - - filterCriteria - type: object - x-etsi-ref: 6.3.4 - ProvChgUuMbmsNotification: - properties: - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS. - items: - $ref: '#/components/schemas/UuMbmsNeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: UuMbmsNeighbourCellInfo - notificationType: - description: Shall be set to "ProvChgUuMbmsNotification". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - timeStamp: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - v2xServerUsd: - # description': User Service Description for V2X Application Server is used to configure the UE for receiving local V2X Application Server information when it is provided over MBMS. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': V2xServerUsd - $ref: '#/components/schemas/V2xServerUsd' - required: - - notificationType - - locationInfo - type: object - x-etsi-ref: 6.4.3 - ProvChgUuMbmsSubscription.links: - description: Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests. - properties: - self: - # description': Self-referring URI. The URI shall be unique within the VIS API as it acts as an ID for the subscription. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LinkType - $ref: '#/components/schemas/LinkType' - required: - - self - type: object - x-etsi-mec-cardinality: 0..1 - - ProvChgUuMbmsSubscription.filterCriteria: - description: List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response. - properties: - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS. - items: - $ref: '#/components/schemas/UuMbmsNeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: UuMbmsNeighbourCellInfo - v2xServerUsd: - # description': User Service Description for V2X Application Server is used to configure the UE for receiving local V2X Application Server information when it is provided over MBMS. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': V2xServerUsd - $ref: '#/components/schemas/V2xServerUsd' - required: - - locationInfo - - v2xServerUsd - type: object - x-etsi-mec-cardinality: '1' - - ProvChgUuMbmsSubscription: - properties: - _links: - $ref: '#/components/schemas/ProvChgUuMbmsSubscription.links' - callbackReference: - description: URI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response. - format: uri - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: URI - expiryDeadline: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - filterCriteria: - $ref: '#/components/schemas/ProvChgUuMbmsSubscription.filterCriteria' - subscriptionType: - description: Shall be set to "ProvChgUuMbmsSubscription". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - subscriptionType - - callbackReference - - filterCriteria - type: object - x-etsi-ref: 6.3.3 - ProvChgUuUniNotification: - properties: - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu unicast. - items: - $ref: '#/components/schemas/UuUniNeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: UuUniNeighbourCellInfo - notificationType: - description: Shall be set to "ProvChgUuUniNotification". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - timeStamp: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - v2xApplicationServer: - # description': V2X Application Server address (consisting of IP address and UDP port) for unicast. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': V2xApplicationServer - $ref: '#/components/schemas/V2xApplicationServer' - required: - - notificationType - - locationInfo - type: object - x-etsi-ref: 6.4.2 - ProvChgUuUniSubscription.links: - description: Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests. - properties: - self: - # description': Self-referring URI. The URI shall be unique within the VIS API as it acts as an ID for the subscription. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LinkType - $ref: '#/components/schemas/LinkType' - required: - - self - type: object - x-etsi-mec-cardinality: 0..1 - - ProvChgUuUniSubscription.filterCriteria: - description: List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response. - properties: - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu unicast. - items: - $ref: '#/components/schemas/UuUniNeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: UuUniNeighbourCellInfo - v2xApplicationServer: - # description': V2X Application Server address (consisting of IP address and UDP port) for unicast. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': V2xApplicationServer - $ref: '#/components/schemas/V2xApplicationServer' - required: - - locationInfo - - v2xApplicationServer - type: object - x-etsi-mec-cardinality: '1' - - ProvChgUuUniSubscription: - properties: - _links: - $ref: '#/components/schemas/ProvChgUuUniSubscription.links' - callbackReference: - description: URI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response. - format: uri - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: URI - expiryDeadline: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - filterCriteria: - $ref: '#/components/schemas/ProvChgUuUniSubscription.filterCriteria' - subscriptionType: - description: Shall be set to "ProvChgUuUniSubscription". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - subscriptionType - - callbackReference - - filterCriteria - type: object - x-etsi-ref: 6.3.2 - - SubscriptionLinkList.links.subscriptions: - description: "The service consumer\u2019s subscriptions." - properties: - href: - description: The URI referring to the subscription. - format: uri - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: URI - subscriptionType: - description: Type of the subscription. The values are as defined in the \"subscriptionType\" attribute for each different V2X information event subscription data type. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - href - - subscriptionType - x-etsi-mec-cardinality: 0..N - - SubscriptionLinkList.links: - description: List of hyperlinks related to the resource. - properties: - self: - # description': URI of this resource. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LinkType - $ref: '#/components/schemas/LinkType' - subscriptions: - type: array - items: - $ref: '#/components/schemas/SubscriptionLinkList.links.subscriptions' - type: object - required: - - self - x-etsi-mec-cardinality: '1' - - SubscriptionLinkList: - properties: - _links: - $ref: '#/components/schemas/SubscriptionLinkList.links' - required: - - _links - type: object - x-etsi-ref: 6.3.6 - - TddInfo: - properties: - earfcn: - # description': '' - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Earfcn - $ref: '#/components/schemas/Earfcn' - subframeAssignment: - description: Uplink-downlink subframe configuration information. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - transmissionBandwidth: - # description': '' - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': TransmissionBandwidth - $ref: '#/components/schemas/TransmissionBandwidth' - required: - - earfcn - - transmissionBandwidth - - subframeAssignment - type: object - x-etsi-ref: 6.5.7 - TimeStamp: - properties: - nanoSeconds: - description: The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. - format: Uint32 - type: integer - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Uint32 - seconds: - description: The seconds part of the time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC. - format: Uint32 - type: integer - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Uint32 - required: - - seconds - - nanoSeconds - type: object - x-etsi-ref: 6.5.2 - TransmissionBandwidth.transmissionBandwidth: - description: 'Numeric value corresponding to the transmission bandwidth expressed in units of resource blocks as follows:1 = bw6 (6 resource blocks)2 = bw15 (15 resource blocks) 3 = bw25 (25 resource blocks) 4 = bw50 (50 resource blocks) 5 = bw75 (75 resource blocks) 6 = bw100 (100 resource blocks)' - enum: - - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - type: integer - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Enum - - TransmissionBandwidth: - properties: - transmissionBandwidth: - $ref: '#/components/schemas/TransmissionBandwidth.transmissionBandwidth' - required: - - transmissionBandwidth - type: object - x-etsi-ref: 6.6.4 - UuMbmsNeighbourCellInfo: - properties: - ecgi: - # description': E-UTRAN CelI Global Identifier. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Ecgi - $ref: '#/components/schemas/Ecgi' - fddInfo: - # description': Information for FDD operation. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': FddInfo - $ref: '#/components/schemas/FddInfo' - mbmsServiceAreaIdentity: - description: Supported MBMS Service Area Identities in the cell. - items: - type: string - minItems: 1 - type: array - x-etsi-mec-cardinality: 1..N - x-etsi-mec-origin-type: String - pci: - description: Physical Cell Identifier. - type: integer - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Integer - plmn: - # description': Public Land Mobile Network Identity. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Plmn - $ref: '#/components/schemas/Plmn' - tddInfo: - # description': Information for TDD operation. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': TddInfo - $ref: '#/components/schemas/TddInfo' - required: - - plmn - - ecgi - - pci - - fddInfo - - tddInfo - - mbmsServiceAreaIdentity - type: object - x-etsi-ref: 6.5.11 - - UuMbmsProvisioningInfo.proInfoUuMbms: - description: The provisioning information per location as defined below. - properties: - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS. - type: array - items: - $ref: '#/components/schemas/UuMbmsNeighbourCellInfo' - minItems: 0 - - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: UuMbmsNeighbourCellInfo - v2xServerUsd: - # description': User Service Description for V2X Application Server is used to configure the UE for receiving local V2X Application Server information when it is provided over MBMS. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': V2xServerUsd - $ref: '#/components/schemas/V2xServerUsd' - required: - - locationInfo - - v2xServerUsd - - UuMbmsProvisioningInfo: - properties: - proInfoUuMbms: - $ref: '#/components/schemas/UuMbmsProvisioningInfo.proInfoUuMbms' - timeStamp: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - required: - - proInfoUuMbms - type: object - x-etsi-ref: 6.2.3 - - UuUniNeighbourCellInfo: - properties: - ecgi: - # description': E-UTRAN CelI Global Identifier. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Ecgi - $ref: '#/components/schemas/Ecgi' - fddInfo: - # description': Information for FDD operation. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': FddInfo - $ref: '#/components/schemas/FddInfo' - pci: - description: Physical Cell Identifier. - type: integer - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Integer - plmn: - # description': Public Land Mobile Network Identity. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Plmn - $ref: '#/components/schemas/Plmn' - tddInfo: - # description': Information for TDD operation. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': TddInfo - $ref: '#/components/schemas/TddInfo' - required: - - plmn - - ecgi - - pci - - fddInfo - - tddInfo - type: object - x-etsi-ref: 6.5.9 - - UuUnicastProvisioningInfo.proInfoUuUnicast: - description: The provisioning information per location as defined below. - properties: - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu unicast. - items: - $ref: '#/components/schemas/UuUniNeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: UuUniNeighbourCellInfo - v2xApplicationServer: - # description': V2X Application Server address (consisting of IP address and UDP port) for unicast. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': V2xApplicationServer - $ref: '#/components/schemas/V2xApplicationServer' - required: - - locationInfo - - v2xApplicationServer - x-etsi-mec-cardinality: 1..N - UuUnicastProvisioningInfo: - properties: - proInfoUuUnicast: - type: array - items: - $ref: '#/components/schemas/UuUnicastProvisioningInfo.proInfoUuUnicast' - timeStamp: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - required: - - proInfoUuUnicast - type: object - x-etsi-ref: 6.2.2 - V2xApplicationServer: - properties: - ipAddress: - description: '' - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - udpPort: - description: '' - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - ipAddress - - udpPort - type: object - x-etsi-ref: 6.5.8 - - - msgType: - description: '− denm(1): Decentralized Environmental Notification Message (DENM) as specified in ETSI EN 302 637-3 [i.3], − cam(2): Cooperative Awareness Message (CAM) as specified in ETSI EN 302 637-2 [i.2], − poi(3): Point of Interest message as specified in ETSI TS 101 556-1 [i.11], − spat(4): Signal Phase And Timing (SPAT) message as specified in SAE J2735 [i.12], − map(5): MAP message as specified in SAE J2735 [i.12], − ivi(6): In Vehicle Information (IVI) message as defined in ISO TS 19321 [i.13], − ev-rsr(7): Electric vehicle recharging spot reservation message, as defined in ETSI TS 101 556-3 [i.14], ' - enum: - - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - - 7 - type: integer - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Enum - - V2xMsgPublication: - properties: - msgContent: - description: Published V2X message content. Its format is defined by the standardization organization indicated by the attribute stdOrganization. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - msgEncodeFormat: - description: The encode format of the V2X message, for example base64. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - msgType: - $ref: '#/components/schemas/msgType' - #x-etsi-mec-origin-type: Enum - stdOrganization: - description: "Standardization organization which defines the published V2X message type: \nETSI: European Telecommunications Standards Institute. \nSee note 1." - enum: - - ETSI - type: string - x-etsi-mec-cardinality: '1' - #-etsi-mec-origin-type: Enum - required: - - stdOrganization - - msgType - - msgEncodeFormat - - msgContent - type: object - x-etsi-notes: "NOTE 1: Other standardization organizations could be added as needed.NOTE 2:The V2X message types of ETSI shall be used as specified in ETSI TS 102 894-2 [6], clause A.114." - x-etsi-ref: 6.2.6 - - V2xMsgSubscription.links: - description: Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests. - properties: - self: - # description': Self-referring URI. The URI shall be unique within the VIS API as it acts as an ID for the subscription. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LinkType - $ref: '#/components/schemas/LinkType' - required: - - self - type: object - x-etsi-mec-cardinality: 0..1 - - V2xMsgSubscription.filterCriteria: - description: List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response. - properties: - msgType: - description: Subscribed V2X message type. Its value is defined by the standardization organization indicated by the attribute stdOrganization. See note 2. - items: - type: string - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: Enum - stdOrganization: - description: "Standardization organization which defines the subscribed V2X message type: \nETSI: European Telecommunications Standards Institute. \nSee note 1." - enum: - - ETSI - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Enum - required: - - stdOrganization - type: object - x-etsi-mec-cardinality: '1' - - V2xMsgSubscription: - properties: - _links: - $ref: '#/components/schemas/V2xMsgSubscription.links' - callbackReference: - description: URI selected by the service consumer to receive notifications on the subscribed V2X message. This shall be included both in the request and in response. - format: uri - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: URI - expiryDeadline: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - filterCriteria: - $ref: '#/components/schemas/V2xMsgSubscription.filterCriteria' - subscriptionType: - description: Shall be set to "V2xMsgSubscription". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - subscriptionType - - callbackReference - - filterCriteria - type: object - x-etsi-notes: "NOTE 1:\tOther standardization organizations could be added as needed.\nNOTE 2:\tThe V2X message types of ETSI shall be used as specified in ETSI TS 102 894-2 [6], clause A.114." - x-etsi-ref: 6.3.5 - - - V2xMsgNotification.links: - description: 'Links to resources related to this notification.' - properties: - subscription: - # description': Self-referring URI. The URI shall be unique within the VIS API as it acts as an ID for the subscription. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LinkType - $ref: '#/components/schemas/LinkType' - required: - - subscription - type: object - x-etsi-mec-cardinality: 0..1 - - V2xMsgNotification: - properties: - notificationType: - description: Shall be set to "V2xMsgNotification". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - timeStamp: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - stdOrganization: - description: 'Standardization organization which defines the published V2X message type ETSI: European Telecommunications Standards Institute. See note 1.' - enum: - - "ETSI" - type: string - msgType: - $ref: '#/components/schemas/msgType' - msgEncodeFormat: - description: 'The encode format of the V2X message, for example base64 ' - type: string - msgContent: - description: 'Published V2X message content. The format of the string is defined by the standardization organization indicated by the attribute stdOrganization.' - type: string - _links: - $ref: '#/components/schemas/V2xMsgNotification.links' - required: - - notificationType - - timeStamp - - stdOrganization - - msgType - - msgEncodeFormat - - msgContent - - _links - type: object - x-etsi-notes: "NOTE 1: Other standardization organizations could be added as needed. NOTE 2: The V2X message types of ETSI shall be used as specified in ETSI TS 102 894-2 [6], clause A.114" - - V2xServerUsd.sdpInfo: - description: SDP with IP multicast address and port number used for V2X communication via MBMS. - properties: - ipMulticastAddress: - description: '' - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - portNumber: - description: '' - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - ipMulticastAddress - - portNumber - type: object - x-etsi-mec-cardinality: '1' - V2xServerUsd.tmgi: - description: Temporary Mobile Group Identity (TMGI), which is used within MBMS to uniquely identify Multicast and Broadcast bearer services. - properties: - mbmsServiceId: - description: MBMS Service ID consisting of three octets. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - mcc: - description: The Mobile Country Code part of PLMN Identity. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - mnc: - description: The Mobile Network Code part of PLMN Identity. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - mbmsServiceId - - mcc - - mnc - type: object - x-etsi-mec-cardinality: '' - - V2xServerUsd: - properties: - sdpInfo: - $ref: '#/components/schemas/V2xServerUsd.sdpInfo' - serviceAreaIdentifier: - description: A list of service area identifier for the applicable MBMS broadcast area. - items: - type: string - minItems: 1 - type: array - x-etsi-mec-cardinality: 1..N - x-etsi-mec-origin-type: String - tmgi: - $ref: '#/components/schemas/V2xServerUsd.tmgi' - required: - - tmgi - - serviceAreaIdentifier - - sdpInfo - type: object - x-etsi-ref: 6.5.10 - - LinkType: - description: >- - 'This data type represents a type of link' - type: object - required: - - href - properties: - href: - $ref: '#/components/schemas/Href' - Href: - description: >- - The URI referring to the subscription. - type: string - format: uri - ProblemDetails: - properties: - detail: - description: A human-readable explanation specific to this occurrence of the problem - type: string - x-etsi-mec-cardinality: 0..1 - x-etsi-mec-origin-type: String - instance: - description: A URI reference that identifies the specific occurrence of the problem - format: uri - type: string - x-etsi-mec-cardinality: 0..1 - x-etsi-mec-origin-type: URI - status: - description: The HTTP status code for this occurrence of the problem - format: uint32 - type: integer - x-etsi-mec-cardinality: 0..1 - x-etsi-mec-origin-type: Uint32 - title: - description: A short, human-readable summary of the problem type - type: string - x-etsi-mec-cardinality: 0..1 - x-etsi-mec-origin-type: String - type: - description: A URI reference according to IETF RFC 3986 that identifies the problem type - format: uri - type: string - x-etsi-mec-cardinality: 0..1 - x-etsi-mec-origin-type: URI - type: object - responses: - 204: - description: No Content - 206: - description: Partial content - 400: - description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 401: - description: 'Unauthorized : used when the client did not submit credentials.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 403: - description: 'Forbidden : operation is not allowed given the current status of the resource.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 404: - description: 'Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 406: - description: 'Not Acceptable : used to indicate that the server cannot provide the any of the content formats supported by the client.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 409: - description: 'Conflict : The operation cannot be executed currently, due to a conflict with the state of the resource' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 412: - description: 'Precondition failed : used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts when using PUT' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 415: - description: 'Unsupported Media Type : used to indicate that the server or the client does not support the content type of the entity body.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 422: - description: 'Unprocessable Entity : used to indicate that the server understands the content type of the request entity and that the syntax of the request entity is correct but that the server is unable to process the contained instructions. This error condition can occur if an JSON request body is syntactically correct but semantically incorrect, for example if the target area for the request is considered too large. This error condition can also occur if the capabilities required by the request are not supported.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 429: - description: 'Too Many Requests : used when a rate limiter has triggered.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' diff --git a/ttcn/LibMec/WlanInformationAPI/json/WlanInformationAPI.json b/ttcn/LibMec/WlanInformationAPI/json/WlanInformationAPI.json deleted file mode 100644 index 73fd348..0000000 --- a/ttcn/LibMec/WlanInformationAPI/json/WlanInformationAPI.json +++ /dev/null @@ -1,2701 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "contact": { - "url": "https://forge.etsi.org/rep/mec/gs028-wai-api" - }, - "title": "ETSI GS MEC 028 - WLAN Access Information API", - "version": "2.1.1", - "description": "The ETSI MEC ISG MEC028 WLAN Access Information API described using OpenAPI", - "license": { - "name": "BSD-3-Clause", - "url": "https://forge.etsi.org/legal-matters" - } - }, - "externalDocs": { - "description": "ETSI MEC028 V2.1.1 WLAN Information API", - "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/028/02.01.01_60/gs_mec028v020101p.pdf" - }, - "servers": [ - { - "url": "https://localhost/wai/v2" - } - ], - "tags": [ - { - "name": "wai" - } - ], - "paths": { - "/queries/ap/ap_information": { - "get": { - "tags": [ - "wai" - ], - "summary": "Retrieve information on existing Access Points", - "description": "Queries information about existing WLAN Access Points", - "operationId": "apInfoGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.Filter" - }, - { - "$ref": "#/components/parameters/Query.AllFields" - }, - { - "$ref": "#/components/parameters/Query.Fields" - }, - { - "$ref": "#/components/parameters/Query.ExcludeFields" - }, - { - "$ref": "#/components/parameters/Query.ExcludeDefault" - } - ], - "responses": { - "200": { - "description": "Successful response to ap_info request", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApInfo" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - } - } - }, - "/queries/sta/sta_information": { - "get": { - "tags": [ - "wai" - ], - "summary": "Retrieve information on existing Stations", - "description": "Queries information about existing WLAN stations", - "operationId": "staInfoGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.Filter" - }, - { - "$ref": "#/components/parameters/Query.AllFields" - }, - { - "$ref": "#/components/parameters/Query.Fields" - }, - { - "$ref": "#/components/parameters/Query.ExcludeFields" - }, - { - "$ref": "#/components/parameters/Query.ExcludeDefault" - } - ], - "responses": { - "200": { - "description": "Successful response to sta_info request", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StaInfo" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - } - } - }, - "/subscriptions": { - "get": { - "tags": [ - "wai" - ], - "summary": "Retrieve information on subscriptions for notifications", - "description": "Queries information on subscriptions for notifications", - "operationId": "subscriptionLinkList_subscriptionsGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.SubscriptionType" - } - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors subscriptions.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubscriptionLinkList" - }, - "example": { - "_links": { - "self": { - "href": "http://meAppServer.example.com/wai/v2/subscriptions" - } - }, - "subscription": [ - { - "_links": { - "self": { - "href": "http://meAppServer.example.com/wai/v2/subscriptions/sub123" - } - }, - "callbackReference": "http://my.callback.com/wai/assocStaSubscription/some-id", - "subscriptionType": "AssocStaSubscription" - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - } - }, - "post": { - "tags": [ - "wai" - ], - "summary": "Create a new subscription", - "description": "Creates a new subscription to WLAN Access Information notifications", - "operationId": "subscriptionsPOST", - "requestBody": { - "description": "Subscription to be created", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InlineSubscription" - }, - "example": { - "subscriptionType": "AssocStaSubscription", - "callbackReference": "http://meAppClient.example.com/wai/v2/notifications/1", - "expiryDeadline": { - "seconds": 1977836800, - "nanoSeconds": 0 - }, - "apId": { - "macId": "005C0A0A0A0A", - "ssid": "myNetworkSsid", - "ipAddress": "10.10.100.1" - } - } - } - } - }, - "responses": { - "201": { - "description": "Successful subscription response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InlineSubscription" - }, - "example": { - "subscriptionType": "AssocStaSubscription", - "callbackReference": "http://meAppClient.example.com/wai/v2/notifications/1", - "_links": { - "self": { - "href": "http://meAppServer.example.com/wai/v2/subscriptions/sub123" - } - }, - "expiryDeadline": { - "seconds": 1977836800, - "nanoSeconds": 0 - }, - "apId": { - "macId": "005C0A0A0A0A", - "ssid": "myNetworkSsid", - "ipAddress": "10.10.100.1" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "415": { - "$ref": "#/components/responses/415" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "callbacks": { - "notification": { - "{$request.body#/callbackReference}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification from WAIS, content based on subscription type", - "operationId": "notificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InlineNotification" - }, - "example": { - "notificationType": "AssocStaNotification", - "timeStamp": { - "seconds": 1977836800, - "nanoseconds": 0 - }, - "apId": { - "macId": "005C0A0A0A0A", - "ssid": "myNetworkSsid", - "ipAddress": "10.10.100.1" - }, - "staId": { - "macId": "005C01111111", - "ssid": [ - "myNetworkSsid", - "myOtherNetworkSsid" - ], - "aid": "1122", - "ipAddress": "10.10.1.255" - } - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - } - } - }, - "/subscriptions/{subscriptionId}": { - "get": { - "tags": [ - "wai" - ], - "summary": "Retrieve information on current specific subscription", - "description": "Queries information about an existing subscription, identified by its self-referring URI returned on creation (initial POST)", - "operationId": "subscriptionsGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding subscription notifications", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InlineSubscription" - }, - "example": { - "subscriptionType": "AssocStaSubscription", - "callbackReference": "http://meAppClient.example.com/wai/v2/notifications/1", - "_links": { - "self": { - "href": "http://meAppServer.example.com/wai/v2/subscriptions/sub123" - } - }, - "expiryDeadline": { - "seconds": 1977836800, - "nanoSeconds": 0 - }, - "apId": { - "macId": "005C0A0A0A0A", - "ssid": "myNetworkSsid", - "ipAddress": "10.10.100.1" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - } - }, - "put": { - "tags": [ - "wai" - ], - "summary": "Modify an existing subscription", - "description": "Updates an existing subscription, identified by its self-referring URI returned on creation (initial POST)", - "operationId": "subscriptionsPUT", - "requestBody": { - "description": "Subscription to be modified", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InlineSubscription" - }, - "example": { - "subscriptionType": "AssocStaSubscription", - "callbackReference": "http://meAppClient.example.com/wai/v2/notifications/1", - "_links": { - "self": { - "href": "http://meAppServer.example.com/wai/v2/subscriptions/sub123" - } - }, - "expiryDeadline": { - "seconds": 1977836800, - "nanoSeconds": 0 - }, - "apId": { - "macId": "005C0A0A0A0A", - "ssid": "myNetworkSsid", - "ipAddress": "10.10.100.1" - } - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription modification", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InlineSubscription" - }, - "example": { - "_links": { - "self": { - "href": "http://[hostIP]/sbox-xyz123/wai/v2/subscriptions/sub123" - } - }, - "callbackReference": "http://my.callback.com/wai/some-id", - "apId": { - "macId": "005C0A0A0A0A" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "412": { - "$ref": "#/components/responses/412" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - } - }, - "delete": { - "tags": [ - "wai" - ], - "summary": "Cancel an existing subscription", - "description": "Cancels an existing subscription, identified by its self-referring URI returned on creation (initial POST)", - "operationId": "subscriptionsDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - } - } - } - }, - "components": { - "responses": { - "200": { - "description": "OK" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request : used to indicate that incorrect parameters were passed to the request.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized : used when the client did not submit credentials.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden : operation is not allowed given the current status of the resource.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable : used to indicate that the server cannot provide the any of the content formats supported by the client.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed : used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts when using PUT", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type : used to indicate that the server or the client does not support the content type of the entity body.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity : used to indicate that the server understands the content type of the request entity and that the syntax of the request entity is correct but that the server is unable to process the contained instructions. This error condition can occur if an JSON request body is syntactically correct but semantically incorrect, for example if the target area for the request is considered too large. This error condition can also occur if the capabilities required by the request are not supported.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - }, - "example": { - "application/problem+json": { - "type": "https://meAppServer.example.com/wai/v2/probs/too-many targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - } - }, - "429": { - "description": "Too Many Requests : used when a rate limiter has triggered.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "parameters": { - "Path.subscrId": { - "name": "subscriptionId", - "in": "path", - "description": "Subscription Id, specifically the \"self\" returned in the subscription request", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - }, - "Query.Filter": { - "name": "filter", - "in": "query", - "description": "Attribute-based filtering expression according to clause 6.19 of ETSI GS MEC 009. .", - "required": false, - "schema": { - "type": "string" - } - }, - "Query.AllFields": { - "name": "all_fields", - "in": "query", - "description": "Include all complex attributes in the response. See clause 6.18 of ETSI GS MEC 009 for details.", - "required": false, - "schema": { - "type": "string" - } - }, - "Query.Fields": { - "name": "fields", - "in": "query", - "description": "Complex attributes to be included into the response. See clause 6.18 of ETSI GS MEC 009 for details.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.ExcludeFields": { - "name": "exclude_fields", - "in": "query", - "description": "Complex attributes to be excluded from the response. See clause 6.18 of ETSI GS MEC 009 for details.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.ExcludeDefault": { - "name": "exclude_default", - "in": "query", - "description": "Indicates to exclude the following complex attributes from the response. See clause 6.18 of ETSI GS MEC 009 for details. The following attributes shall be excluded from the structure in the response body if this parameter is provided, or none of the parameters \"all_fields\", \"fields\", \"exclude_fields\", \"exclude_default\" are provided: Not applicable", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.SubscriptionType": { - "name": "subscription_type", - "in": "query", - "description": "Filter on a specific subscription type. Permitted values: assoc_sta, sta_data_rate.", - "required": false, - "schema": { - "type": "string" - } - } - }, - "schemas": { - "ApAssociated": { - "properties": { - "assocId": { - "description": "Unique number which identifies a particular association between the station and Access Point.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "ipAddress": { - "description": "IPv4 or IPv6 address allocated for the Access Point.", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "string" - }, - "macId": { - "description": "Unique identifier assigned to the Access Point (as network interface controller) for communications at the data link layer of a network segment.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "string" - }, - "ssid": { - "description": "Service Set Identifier to identify logical networks.", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "macId" - ], - "type": "object", - "x-etsi-ref": "6.5.12" - }, - "ApIdentity": { - "properties": { - "ipAddress": { - "description": "IPv4 or IPv6 address allocated for the Access Point.", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - }, - "macId": { - "description": "Unique Identifier assigned to an Access Point (as network interface controller) for communications at the data link layer of a network segment.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "ssid": { - "description": "Service Set Identifier to identify logical networks including Basic Service Set and Extended Service Set.", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "macId" - ], - "type": "object", - "x-etsi-ref": "6.5.3" - }, - "ApInfo": { - "properties": { - "apId": { - "$ref": "#/components/schemas/ApIdentity" - }, - "apLocation": { - "$ref": "#/components/schemas/ApLocation" - }, - "apNeighbor": { - "$ref": "#/components/schemas/NeighborReport" - }, - "bssLoad": { - "$ref": "#/components/schemas/BssLoad" - }, - "channel": { - "description": "Channel configured for the Access Point.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "extBssLoad": { - "$ref": "#/components/schemas/ExtBssLoad" - }, - "timeStamp": { - "$ref": "#/components/schemas/TimeStamp" - }, - "wanMetrics": { - "$ref": "#/components/schemas/WanMetrics" - }, - "wlanCap": { - "$ref": "#/components/schemas/WlanCapabilities" - } - }, - "required": [ - "apId" - ], - "type": "object", - "x-etsi-ref": "6.2.2" - }, - "ApLocation": { - "properties": { - "civicLocation": { - "$ref": "#/components/schemas/CivicLocation" - }, - "geolocation": { - "$ref": "#/components/schemas/GeoLocation" - } - }, - "type": "object", - "x-etsi-ref": "6.5.9" - }, - "AssocStaNotification": { - "properties": { - "apId": { - "$ref": "#/components/schemas/ApIdentity" - }, - "notificationType": { - "description": "Shall be set to \"AssocStaNotification\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "staId": { - "description": "Identifier(s) to uniquely specify the client station(s) associated.", - "items": { - "$ref": "#/components/schemas/StaIdentity" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "StaIdentity" - }, - "timeStamp": { - "$ref": "#/components/schemas/TimeStamp" - } - }, - "required": [ - "notificationType", - "apId" - ], - "type": "object", - "x-etsi-ref": "6.4.2" - }, - "AssocStaSubscription": { - "properties": { - "_links": { - "description": "Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests.", - "properties": { - "self": { - "$ref": "#/components/schemas/LinkType" - } - }, - "required": [ - "self" - ], - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "apId": { - "$ref": "#/components/schemas/ApIdentity" - }, - "callbackReference": { - "description": "URI selected by the service consumer to receive notifications on the subscribed WLAN information. This shall be included both in the request and in response.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "URI" - }, - "expiryDeadline": { - "$ref": "#/components/schemas/TimeStamp" - }, - "subscriptionType": { - "description": "Shall be set to \"AssocStaSubscription\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "subscriptionType", - "callbackReference", - "apId" - ], - "type": "object", - "x-etsi-ref": "6.3.2" - }, - "AssociatedStations": { - "properties": { - "assocId": { - "description": "Unique number which identifies a particular association between an Access Point and a station.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "ipAddress": { - "description": "IPv4 or IPv6 address allocated for the station associated with the Access Point.", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "string" - }, - "macId": { - "description": "Unique identifier assigned to a station (as network interface controller) for communications at the data link layer of a network segment.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "macId" - ], - "type": "object", - "x-etsi-ref": "6.5.5" - }, - "BeaconReport": { - "properties": { - "bssId": { - "description": "The BSSID field indicates the BSSID of the BSS(s) for which a beacon report has been received.", - "items": { - "type": "string" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "String" - }, - "channelId": { - "description": "Channel number where the beacon was received.", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "measurementId": { - "description": "Measurement ID of the Measurement configuration applied to this Beacon Report.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "reportingCondition": { - "description": "As in table T9-89 of IEEE 802.11-2012 [8].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "ssId": { - "description": "(Optional) The SSID subelement indicates the ESS(s) or IBSS(s) for which a beacon report is received.", - "items": { - "type": "string" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "String" - }, - "staId": { - "$ref": "#/components/schemas/StaIdentity" - } - }, - "required": [ - "staId", - "measurementId", - "channelId", - "bssId", - "ssId", - "reportingCondition" - ], - "type": "object", - "x-etsi-ref": "6.5.27" - }, - "BeaconRequestConfig": { - "properties": { - "bssId": { - "description": "The BSSID field indicates the BSSID of the BSS(s) for which a beacon report is requested. When requesting beacon reports for all BSSs on the channel, the BSSID field contains the wildcard BSSID.", - "items": { - "type": "string" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "String" - }, - "channelId": { - "description": "Channel number to scan. A Channel Number of 0 indicates a request to make iterative measurements for all supported channels in the Operating Class where the measurement is permitted on the channel and the channel is valid for the current regulatory domain. A Channel Number of 255 indicates a request to make iterative measurements for all supported channels in the current Operating Class listed in the latest AP Channel Report received from the serving AP.", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "measurementMode": { - "description": "0 for passive.\n1 for active.\n2 for beacon table.", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "reportingCondition": { - "description": "As in table T9-89 of IEEE 802.11-2012 [8].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "ssId": { - "description": "(Optional) The SSID subelement indicates the ESS(s) or IBSS(s) for which a beacon report is requested.", - "items": { - "type": "string" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "String" - }, - "staId": { - "$ref": "#/components/schemas/StaIdentity" - } - }, - "required": [ - "staId", - "channelId", - "measurementMode", - "bssId", - "ssId", - "reportingCondition" - ], - "type": "object", - "x-etsi-ref": "6.5.25" - }, - "BssLoad": { - "properties": { - "availAdmCap": { - "description": "Available Admission Capacity that specifies the remaining amount of medium time available via explicit admission control, in units of 32 s/s.", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint16" - }, - "channelUtilization": { - "description": "The percentage of time, linearly scaled with 255 representing 100 %, that the AP sensed the medium was busy, as indicated by either the physical or virtual Carrier Sense (CS) mechanism.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt8" - }, - "staCount": { - "description": "An unsigned integer that indicates the total number of STAs currently associated with this BSS.", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt16" - } - }, - "required": [ - "staCount", - "channelUtilization", - "availAdmCap" - ], - "type": "object", - "x-etsi-ref": "6.5.7" - }, - "ChannelLoadConfig": { - "properties": { - "apId": { - "$ref": "#/components/schemas/ApIdentity" - }, - "cChannelId": { - "description": "Channel number which load is reported", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "channelLoad": { - "description": "Channel load as per IEEE 802.11-2012 [8], section 11.11.9.3", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - } - }, - "required": [ - "apId", - "cChannelId", - "channelLoad" - ], - "type": "object", - "x-etsi-ref": "6.5.24" - }, - "CivicLocation": { - "properties": { - "ca0": { - "description": "Language", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca1": { - "description": "National subdivisions (state, canton, region,province, prefecture) ", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca128": { - "description": "Script", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca16": { - "description": "Leading street direction", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca17": { - "description": "Trailing street suffix", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca18": { - "description": "Street suffix or type", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca19": { - "description": "House number", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca2": { - "description": "County, parish, gun (JP), district (IN)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca20": { - "description": "House number suffix", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca21": { - "description": "Landmark of vanity address", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca22": { - "description": "Additional location information", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca23": { - "description": "Name (residence and office occupant)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca24": { - "description": "Postal/zip code", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca25": { - "description": "Building (structure)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca26": { - "description": "Unit (apartment/suite)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca27": { - "description": "Floor", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca28": { - "description": "Room", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca29": { - "description": "Type of place", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca3": { - "description": "City, township, shi (JP)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca30": { - "description": "Postal community name", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca31": { - "description": "Post office box", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca32": { - "description": "Additional code", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca33": { - "description": "Seat (desk.cubicle, workstation)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca34": { - "description": "Primary road name", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca35": { - "description": "Road section", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca36": { - "description": "Branch road name", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca37": { - "description": "Sub-branch road name", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca38": { - "description": "Street name pre-modifier", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca39": { - "description": "Street name post-modifier", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca4": { - "description": "City division, borough, city district, ward, chou (JP)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca5": { - "description": "Neighborhood, block", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca6": { - "description": "Group of streets below the neighborhood level ", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "country": { - "description": "The two-letter ISO 3166 [i.9] country code in capital ASCII letters, e.g. DE or US, as per ISO 3166 [i.9]", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "country" - ], - "type": "object", - "x-etsi-ref": "6.5.20" - }, - "DmgCapabilities": { - "properties": { - "ExtScMcsCap": { - "description": "Extended SC MCS capabilities as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dmgApOrPcpCapInfo": { - "description": "DMG AP or PCP capabilities information as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint16" - }, - "dmgStaBeamTrackTimeLimit": { - "description": "DMG station beam tracking time limit as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint16" - }, - "dmgStaCapInfo": { - "description": "DMG station capabilities information as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "int64", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint64" - }, - "maxNrBasicAmsduSubframes": { - "description": "Number of basic A-MSDU subframes in A-MSDU as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "maxNrShortAmsduSubframes": { - "description": "Number of short A-MSDU subframes in A-MSDU as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "sarCap": { - "description": "SAR capabilities as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "tddCap": { - "description": "TDD capabilities as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint16" - } - }, - "required": [ - "dmgStaCapInfo", - "dmgApOrPcpCapInfo", - "dmgStaBeamTrackTimeLimit", - "ExtScMcsCap", - "maxNrBasicAmsduSubframes", - "maxNrShortAmsduSubframes", - "tddCap", - "sarCap" - ], - "type": "object", - "x-etsi-ref": "6.5.17" - }, - "EdmgCapabilities": { - "properties": { - "ampduParameters": { - "description": "A-MPDU parameters as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "reserved": { - "description": "", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "supportedMcs": { - "description": "Supported MCS as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "trnParameters": { - "description": "Training parameters as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint16" - } - }, - "required": [ - "ampduParameters", - "trnParameters", - "supportedMcs" - ], - "type": "object", - "x-etsi-ref": "6.5.18" - }, - "ExtBssLoad": { - "properties": { - "muMimoStaCount": { - "description": "Indicates the total number of STAs currently associated with this BSS that have a 1 in the MU Beamformee Capable field of their VHT Capabilities element.", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt16" - }, - "obsSec20MhzUtil": { - "description": "Observable loading on each of the secondary 20 MHz channel.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "obsSec40MhzUtil": { - "description": "Observable loading on each of the secondary 40 MHz channel.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "obsSec80MhzUtil": { - "description": "Observable loading on each of the secondary 80 MHz channel.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "spatStreamUnderUtil": { - "description": "The percentage of time, linearly scaled with 255 representing 100 %, that the AP has underutilized spatial domain resources for given busy time of the medium.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt8" - } - }, - "required": [ - "muMimoStaCount", - "spatStreamUnderUtil", - "obsSec20MhzUtil", - "obsSec40MhzUtil", - "obsSec80MhzUtil" - ], - "type": "object", - "x-etsi-ref": "6.5.8" - }, - "GeoLocation": { - "properties": { - "altitude": { - "description": "The altitude value of location as defined in IETF RFC 6225 [6]", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "altitudeType": { - "description": "The type description for altitude information e.g. floors or meters as defined in IETF RFC 6225 [6]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "altitudeUncertainty": { - "description": "The uncertainty for altitude information as defined in IETF RFC 6225 [6]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "datum": { - "description": "The datum value to express how coordinates are organized and related to real world as defined in IETF RFC 6225 [6]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "lat": { - "description": "The latitude value of location as defined in IETF RFC 6225 [6]", - "format": "int64", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint64" - }, - "latUncertainty": { - "description": "The uncertainty for Latitude information as defined in IETF RFC 6225 [6]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "long": { - "description": "The longitude value of location as defined in IETF RFC 6225 [6]", - "format": "int64", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint64" - }, - "longUncertainty": { - "description": "The uncertainty for Longitude information as defined in IETF RFC 6225 [6]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - } - }, - "required": [ - "latUncertainty", - "lat", - "longUncertainty", - "long", - "datum" - ], - "type": "object", - "x-etsi-ref": "6.5.19" - }, - "HeCapabilities": { - "properties": { - "heMacCapInfo": { - "description": "MAC capabilities of an Access Point.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "hePhyCapinfo": { - "description": "PHY capabilities of an Access Point.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "ppeThresholds": { - "description": "PPE Threshold determines the nominal packet padding value for a HE PPDU.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "not defined" - }, - "supportedHeMcsNssSet": { - "description": "Supported MCS and NSS Set.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - } - }, - "required": [ - "heMacCapInfo", - "hePhyCapinfo", - "supportedHeMcsNssSet" - ], - "type": "object", - "x-etsi-ref": "6.5.16" - }, - "HtCapabilities": { - "properties": { - "ampduParameters": { - "description": "A-MPDU parameters as defined in IEEE 802.11-2016 [8].", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt8" - }, - "aselCap": { - "description": "ASEL capabilities as defined in IEEE 802.11-2016 [8].", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt8" - }, - "htCapabilityInfo": { - "description": "HT Capability Information as defined in IEEE 802.11-2016 [8].", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt16" - }, - "htExtendedCap": { - "description": "Extended HT Capabilities as defined in IEEE 802.11-2016 [8].", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt16" - }, - "supportedMcsSet": { - "description": "Supported MCS set as defined in IEEE 802.11-2016 [8].", - "format": "uint128", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint128" - }, - "txBeamFormCap": { - "description": "Transmit Beamforming Capabilities as defined in IEEE 802.11-2016 [8].", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt32" - } - }, - "required": [ - "htCapabilityInfo", - "ampduParameters", - "supportedMcsSet", - "htExtendedCap", - "txBeamFormCap", - "aselCap" - ], - "type": "object", - "x-etsi-ref": "6.5.14" - }, - "InlineNotification": { - "oneOf": [ - { - "$ref": "#/components/schemas/AssocStaNotification" - }, - { - "$ref": "#/components/schemas/StaDataRateNotification" - } - ], - "discriminator": { - "propertyName": "notificationType" - } - }, - "InlineSubscription": { - "oneOf": [ - { - "$ref": "#/components/schemas/AssocStaSubscription" - }, - { - "$ref": "#/components/schemas/StaDataRateSubscription" - } - ], - "discriminator": { - "propertyName": "subscriptionType" - } - }, - "LinkType": { - "properties": { - "href": { - "description": "URI referring to a resource", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "href" - ], - "type": "object", - "x-etsi-ref": "6.5.23" - }, - "MeasurementConfig": { - "properties": { - "beaconRequest": { - "$ref": "#/components/schemas/BeaconRequestConfig" - }, - "channelLoad": { - "$ref": "#/components/schemas/ChannelLoadConfig" - }, - "measurementDuration": { - "description": "Duration of the measurement, shall be lower than Maximum Measurement Duration in TU as defined in section 11.11.4 of IEEE 802.11 [8].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "measurementId": { - "description": "Identifier of this measurement configuration.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "randomnInterval": { - "description": "Random interval to be used for starting the measurement. In units of TU as specifed in section 11.11.3 of IEEE 802.11 [8].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "staStatistics": { - "$ref": "#/components/schemas/StaStatisticsConfig" - } - }, - "required": [ - "measurementId", - "measurementDuration", - "randomnInterval" - ], - "type": "object", - "x-etsi-notes": "NOTE:\tThis element enables the configuration of the channelLoad, beaconRequest and staStatistics in a single resource data type, although only one of each measurement. Multiple measurement configurations of each kind are not allowed.", - "x-etsi-ref": "6.2.4" - }, - "NeighborReport": { - "properties": { - "bssid": { - "description": "BSS Id of the Access Point that is being reported.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "bssidInfo": { - "description": "Additional information related to Access Point that is being reported such as AP reachability, security, key scope, Mobility Domain, HT/VHT capability and Fine Time Measurements.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt32" - }, - "channel": { - "description": "The channel currently used by this Access Point.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "operatingClass": { - "description": "The channel set of the AP indicated by this BSSID.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "phyType": { - "description": "PHY type of the AP indicated by this BSSID. It is an integer value coded according to the value of the dot11PHYType.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - } - }, - "required": [ - "bssid", - "bssidInfo", - "operatingClass", - "channel", - "phyType" - ], - "type": "object", - "x-etsi-ref": "6.5.10" - }, - "ProblemDetails": { - "properties": { - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "instance": { - "description": "A URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "status": { - "description": "The HTTP status code for this occurrence of the problem", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "title": { - "description": "A short, human-readable summary of the problem type", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "type": { - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - } - }, - "type": "object" - }, - "Rssi": { - "properties": { - "rssi": { - "description": "The Received Signal Strength Indicator from a station", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - } - }, - "required": [ - "rssi" - ], - "type": "object", - "x-etsi-ref": "6.5.21" - }, - "StaDataRate": { - "properties": { - "staId": { - "$ref": "#/components/schemas/StaIdentity" - }, - "staLastDataDownlinkRate": { - "description": "The data transmit rate in kbps that was most recently used for transmission of data PPDUs from the access point to the station.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "staLastDataUplinkRate": { - "description": "The data transmit rate in Kbps that was most recently used for transmission of data PPDUs from the associated station to the access point.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "type": "object", - "x-etsi-ref": "6.5.22" - }, - "StaDataRateNotification": { - "properties": { - "notificationType": { - "description": "Shall be set to \"StaDataRateNotification\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "staDataRate": { - "description": "Data rates of a client station.", - "items": { - "$ref": "#/components/schemas/StaDataRate" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "StaDataRate" - }, - "timeStamp": { - "$ref": "#/components/schemas/TimeStamp" - } - }, - "required": [ - "notificationType" - ], - "type": "object", - "x-etsi-ref": "6.4.3" - }, - "StaDataRateSubscription": { - "properties": { - "_links": { - "description": "Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests.", - "properties": { - "self": { - "$ref": "#/components/schemas/LinkType" - } - }, - "required": [ - "self" - ], - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "callbackReference": { - "description": "URI selected by the service consumer to receive notifications on the subscribed WLAN Access Information Service. This shall be included both in the request and in response.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "URI" - }, - "expiryDeadline": { - "$ref": "#/components/schemas/TimeStamp" - }, - "staId": { - "description": "Identifier(s) to uniquely specify the target client station(s) for the subscription", - "items": { - "$ref": "#/components/schemas/StaIdentity" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "StaIdentity" - }, - "subscriptionType": { - "description": "Shall be set to \"StaDataRateSubscription\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "subscriptionType", - "callbackReference", - "staId" - ], - "type": "object", - "x-etsi-ref": "6.3.3" - }, - "StaIdentity": { - "properties": { - "aid": { - "description": "Number which identifies a particular association between a station and an Access Point ", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ipAddress": { - "description": "IPv4 or IPv6 address allocated for the station.", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - }, - "macId": { - "description": "Unique identifier assigned to station (as network interface controller) for communications at the data link layer of a network segment.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "ssid": { - "description": "Service Set Identifier to identify logical networks.", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "macId" - ], - "type": "object", - "x-etsi-ref": "6.5.11" - }, - "StaInfo": { - "properties": { - "apAssociated": { - "$ref": "#/components/schemas/ApAssociated" - }, - "beaconReport": { - "$ref": "#/components/schemas/BeaconReport" - }, - "channel": { - "description": "Channel currently used by the station.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "rssi": { - "$ref": "#/components/schemas/Rssi" - }, - "staDataRate": { - "$ref": "#/components/schemas/StaDataRate" - }, - "staId": { - "$ref": "#/components/schemas/StaIdentity" - }, - "staStatistics": { - "$ref": "#/components/schemas/StaStatistics" - }, - "timeStamp": { - "$ref": "#/components/schemas/TimeStamp" - } - }, - "required": [ - "staId" - ], - "type": "object", - "x-etsi-ref": "6.2.3" - }, - "StaStatistics": { - "properties": { - "groupIdentity": { - "description": "Indicates the requested statistics group describing the Statistics Group Data according to table 9-114 of IEEE 802.11-2016 [8].", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt8" - }, - "md": { - "description": "Measurement Duration.", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt16" - }, - "statisticsGroupData": { - "$ref": "#/components/schemas/StatisticsGroupData", - "description": "Statistics Group Data as defined in Annex C of IEEE 802.112016 [8].", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "not specified" - } - }, - "required": [ - "md", - "groupIdentity", - "statisticsGroupData" - ], - "type": "object", - "x-etsi-ref": "6.5.13" - }, - "StaStatisticsConfig": { - "properties": { - "groupIdentity": { - "description": "As per table T 9-114 of IEEE 802.11-2012 [8].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "staId": { - "$ref": "#/components/schemas/StaIdentity" - }, - "triggerCondition": { - "type": "integer" - }, - "triggerTimeout": { - "description": "The Trigger Timeout field contains a value in units of 100 TUs during which a measuring STA does not generate further triggered STA Statistics Reports after a trigger condition has been met.", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "triggeredReport": { - "type": "boolean" - } - }, - "required": [ - "staId", - "groupIdentity", - "triggeredReport", - "triggerTimeout", - "triggerCondition" - ], - "type": "object", - "x-etsi-ref": "6.5.26" - }, - "StatisticsGroupData": { - "properties": { - "dot11AMPDUDelimiterCRCErrorCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11AMPDUReceivedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11AMSDUAckFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11AckFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11BeamformingFrameCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11ChannelWidthSwitchCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11DualCTSFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11DualCTSSuccessCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11ExplicitBARFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11FCSErrorCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11FailedAMSDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11FailedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11FortyMHzFrameReceivedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11FortyMHzFrameTransmittedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11FrameDuplicateCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11GrantedRDGUnusedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11GrantedRDGUsedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11GroupReceivedFrameCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11GroupTransmittedFrameCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11ImplicitBARFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11MPDUInReceivedAMPDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11MultipleRetryAMSDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11MultipleRetryCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11PSMPUTTGrantDuration": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11PSMPUTTUsedDuration": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosAckFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosDiscardedFrameCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosFailedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosFrameDuplicateCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosMPDUsReceivedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosMultipleRetryCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosRTSFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosRTSSuccessCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosReceivedFragmentCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosRetriesReceivedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosRetryCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosTransmittedFragmentCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosTransmittedFrameCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RSNAStatsBIPMICErrors": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RSNAStatsCCMPDecryptErrors": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RSNAStatsCCMPReplays": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RSNAStatsCMACReplays": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RSNAStatsRobustMgmtCCMPReplays": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RSNAStatsTKIPICVErrors": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RSNAStatsTKIPReplays": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RTSFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RTSLSIGFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RTSLSIGSuccessCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RTSSuccessCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11ReceivedAMSDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11ReceivedFragmentCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11ReceivedOctetsInAMPDUCount": { - "format": "int64", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint64" - }, - "dot11ReceivedOctetsInAMSDUCount": { - "format": "int64", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint64" - }, - "dot11RetryAMSDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RetryCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11STAStatisticsAPAverageAccessDelay": { - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dot11STAStatisticsAverageAccessDelayBackGround": { - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dot11STAStatisticsAverageAccessDelayBestEffort": { - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dot11STAStatisticsAverageAccessDelayVideo": { - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dot11STAStatisticsAverageAccessDelayVoice": { - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dot11STAStatisticsChannelUtilization": { - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dot11STAStatisticsStationCount": { - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dot11STBCCTSFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11STBCCTSSuccessCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedAMPDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedAMSDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedFragmentCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedFrameCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedFramesInGrantedRDGCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedMPDUsInAMPDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedOctetsInAMPDUCount": { - "format": "int64", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint64" - }, - "dot11TransmittedOctetsInAMSDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedOctetsInGrantedRDGCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TwentyMHzFrameReceivedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TwentyMHzFrameTransmittedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11nonSTBCCTSFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11nonSTBCCTSSuccessCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "type": "object" - }, - "SubscriptionLinkList": { - "properties": { - "_links": { - "description": "Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests.", - "properties": { - "self": { - "$ref": "#/components/schemas/LinkType" - } - }, - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "assocStaSubscription": { - "items": { - "$ref": "#/components/schemas/AssocStaSubscription" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "AssocStaSubscription" - }, - "staDataRateSubscription": { - "items": { - "$ref": "#/components/schemas/StaDataRateSubscription" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "StaDataRateSubscription" - } - }, - "required": [ - "_links" - ], - "type": "object" - }, - "TimeStamp": { - "properties": { - "nanoSeconds": { - "description": "The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "seconds": { - "description": "The seconds part of the time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "required": [ - "seconds", - "nanoSeconds" - ], - "type": "object", - "x-etsi-ref": "6.5.2" - }, - "VhtCapabilities": { - "properties": { - "vhtCapInfo": { - "description": "VHT capabilities Info as defined in IEEE 802.11-2016 [8].", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt32" - }, - "vhtMcsNss": { - "description": "Supported VHT-MCS and NSS Set as defined in IEEE 802.11-2016 [8].", - "format": "int64", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt64" - } - }, - "required": [ - "vhtCapInfo", - "vhtMcsNss" - ], - "type": "object", - "x-etsi-ref": "6.5.15" - }, - "WanMetrics": { - "properties": { - "downlinkLoad": { - "description": "1-octet positive integer representing the current percentage loading of the downlink WAN connection, scaled linearly with 255 representing 100 %, as measured over an interval the duration of which is reported in Load Measurement Duration. In cases where the downlink load is unknown to the AP, the value is set to zero.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt8" - }, - "downlinkSpeed": { - "description": "4-octet positive integer whose value is an estimate of the WAN Backhaul link current downlink speed in kilobits per second.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "lmd": { - "description": "The LMD (Load Measurement Duration) field is a 2-octet positive integer representing the duration over which the Downlink Load and Uplink Load have been measured, in tenths of a second. When the actual load measurement duration is greater than the maximum value, the maximum value will be reported. The value of the LMD field is set to 0 when neither the uplink nor downlink load can be computed. When the uplink and downlink loads are computed over different intervals, the maximum interval is reported.", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint16" - }, - "uplinkLoad": { - "description": "1-octet positive integer representing the current percentage loading of the uplink WAN connection, scaled linearly with 255 representing 100 %, as measured over an interval, the duration of which is reported in Load Measurement Duration. In cases where the uplink load is unknown to the AP, the value is set to zero.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "uplinkSpeed": { - "description": "4-octet positive integer whose value is an estimate of the WAN Backhaul link's current uplink speed in kilobits per second.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt32" - }, - "wanInfo": { - "description": "Info about WAN link status, link symmetricity and capacity currently used.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - } - }, - "required": [ - "wanInfo", - "downlinkSpeed", - "uplinkSpeed", - "downlinkLoad", - "uplinkLoad", - "lmd" - ], - "type": "object", - "x-etsi-ref": "6.5.6" - }, - "WlanCapabilities": { - "properties": { - "dmg": { - "$ref": "#/components/schemas/DmgCapabilities" - }, - "edmg": { - "$ref": "#/components/schemas/EdmgCapabilities" - }, - "he": { - "$ref": "#/components/schemas/HeCapabilities" - }, - "ht": { - "$ref": "#/components/schemas/HtCapabilities" - }, - "vht": { - "$ref": "#/components/schemas/VhtCapabilities" - } - }, - "type": "object", - "x-etsi-ref": "6.5.4" - } - } - } -} diff --git a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Functions.ttcn b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Functions.ttcn index 39cee60..cbab7d1 100644 --- a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Functions.ttcn +++ b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Functions.ttcn @@ -38,7 +38,8 @@ module WlanInformationAPI_Functions { import from LibMec_Pixits all; function f_create_assoc_sta_subscription( - out AssocStaSubscription p_assoc_sta_subscription + out AssocStaSubscription p_assoc_sta_subscription, + out Json.String p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -47,7 +48,7 @@ module WlanInformationAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions", + PICS_ROOT_API & PX_ME_WLAN_URI_SUB, v_headers, m_http_message_body_json( m_body_json_assoc_sta_subscription( @@ -61,7 +62,7 @@ module WlanInformationAPI_Functions { -, m_time_stamp( f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds - ))))))); + ))))))); tc_ac.start; alt { @@ -75,11 +76,21 @@ module WlanInformationAPI_Functions { -, -, -, ? - )))))) -> value v_response { + )))))) -> value v_response { tc_ac.stop; + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_WLAN_URI_SUB & "/(?*)", + 0 + ); p_assoc_sta_subscription := v_response.response.body.json_body.assocStaSubscription; log("f_create_assoc_sta_subscription: INFO: IUT successfully responds to the subscription: ", p_assoc_sta_subscription); + log("f_create_assoc_sta_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_assoc_sta_subscription: INCONC: Expected message not received"); @@ -89,29 +100,25 @@ module WlanInformationAPI_Functions { } // End of function "f_create_assoc_sta_subscription function f_delete_assoc_sta_subscription( - in AssocStaSubscription p_assoc_sta_subscription + in Json.String p_subscription_id ) runs on HttpComponent { var Headers v_headers; - var charstring v_uri := regexp( - oct2char(unichar2oct(p_assoc_sta_subscription.links.self_.href)), - "?+(" & PX_ME_WLAN_URI & "?*)", - 0 - ); + f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & v_uri, + PICS_ROOT_API & PX_ME_WLAN_URI & p_subscription_id, v_headers - ))); + ))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; } [] tc_ac.timeout { @@ -147,7 +154,7 @@ module WlanInformationAPI_Functions { }, PX_MEASUREMENT_ID, m_measurement_info(1000, 10) - )))))); + )))))); tc_ac.start; alt { @@ -158,7 +165,7 @@ module WlanInformationAPI_Functions { mw_body_json_wlan_measurement_config( mw_measurement_config( ? - )))))) -> value v_response { + )))))) -> value v_response { tc_ac.stop; p_measurement_config := v_response.response.body.json_body.measurementConfig; @@ -188,14 +195,14 @@ module WlanInformationAPI_Functions { m_http_request_delete( PICS_ROOT_API & v_uri, v_headers - ))); + ))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; } [] tc_ac.timeout { diff --git a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Templates.ttcn b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Templates.ttcn index 3806442..d4c9abc 100644 --- a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Templates.ttcn +++ b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Templates.ttcn @@ -271,6 +271,22 @@ module WlanInformationAPI_Templates { subscription := p_subscription } // End of template mw_subscription_link_list + template (value) Subscription_ m_subscription( + in Json.AnyURI p_href, + in Json.String p_subscriptionType + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template m_subscription + + template (present) Subscription_ mw_subscription( + template (present) Json.AnyURI p_href := ?, + template (present) Json.String p_subscriptionType := ? + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template mw_subscription + template (omit) ApIdentity m_ap_identity( in Json.String p_bssid, in template (omit) SsidList p_ssid := omit, diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index 0b42a5b..699134c 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -1,46 +1,48 @@ module LibMec_Pixits { - modulepar charstring PX_ME_APP_Q_ZONE_ID_URI := "/location/v3/queries/zones"; + modulepar charstring PX_ME_APP_Q_ZONE_ID_URI := "location/v3/queries/zones"; - modulepar charstring PX_ME_APP_Q_USERS_LIST_URI := "/location/v3/queries/users"; + modulepar charstring PX_ME_APP_Q_USERS_LIST_URI := "location/v3/queries/users"; - modulepar charstring PX_LOC_API_USERS_SUB_URI := "/location/v3/subscriptions/users"; + modulepar charstring PX_LOC_API_USERS_SUB_URI := "location/v3/subscriptions/users"; - modulepar charstring PX_LOC_API_ZONES_SUB_URI := "/location/v3/subscriptions/zones"; + modulepar charstring PX_LOC_API_ZONES_SUB_URI := "location/v3/subscriptions/zones"; - modulepar charstring PX_LOC_API_AREA_SUB_URI := "/location/v3/subscriptions/area"; + modulepar charstring PX_LOC_API_AREA_SUB_URI := "location/v3/subscriptions/area"; - modulepar charstring PX_LOC_API_DISTANCE_SUB_URI := "/location/v3/subscriptions/distance"; + modulepar charstring PX_LOC_API_DISTANCE_SUB_URI := "location/v3/subscriptions/distance"; - modulepar charstring PX_ME_APP_Q_UE_IDENTITY_ID_URI := "/ui/v1/"; + modulepar charstring PX_ME_APP_Q_UE_IDENTITY_ID_URI := "ui/v1/"; modulepar charstring PX_SVC_MGMT_TRANS_URI := "mec_service_mgmt/v1/transports"; modulepar charstring PX_SVC_MGMT_APP_URI := "mec_service_mgmt/v1/application"; - modulepar charstring PX_RNIS_SUBSCRITIONS_URI := "/rni/v2/subscriptions"; + modulepar charstring PX_RNIS_SUBSCRITIONS_URI := "rni/v2/subscriptions"; - modulepar charstring PX_RNIS_QUERIES_URI := "/rni/v2/queries"; + modulepar charstring PX_RNIS_QUERIES_URI := "rni/v2/queries"; - modulepar charstring PX_ME_BWM_URI := "/bwm/v1/bw_allocations"; + modulepar charstring PX_ME_BWM_URI := "bwm/v1/bw_allocations"; - modulepar charstring PX_ME_MTS_INFO_URI := "/mts/v1/mts_info"; + modulepar charstring PX_ME_MTS_INFO_URI := "mts/v1/mts_info"; - modulepar charstring PX_ME_MTS_SESSIONS_URI := "/mts/v1/mts_sessions"; + modulepar charstring PX_ME_MTS_SESSIONS_URI := "mts/v1/mts_sessions"; - modulepar charstring PX_ME_WLAN_QUERIES_URI := "/wai/v2/queries"; + modulepar charstring PX_ME_WLAN_QUERIES_URI := "wai/v2/queries"; - modulepar charstring PX_ME_WLAN_URI := "/wai/v2"; + modulepar charstring PX_ME_WLAN_URI := "wai/v2"; - modulepar charstring PX_ME_V2X_URI := "/vis/v1"; + modulepar charstring PX_ME_WLAN_URI_SUB := "wai/v2/subscriptions"; + + modulepar charstring PX_ME_V2X_URI := "vis/v1"; modulepar charstring PX_ME_V2X_QUERIES_URI := "/vis/v1/queries"; - modulepar charstring PX_ME_DEVICE_APP_URI := "/dev_app/v1"; + modulepar charstring PX_ME_DEVICE_APP_URI := "dev_app/v1"; - modulepar charstring PX_ME_APP_AMS_URI := "/amsi/v1/appMobilityServices" + modulepar charstring PX_ME_APP_AMS_URI := "amsi/v1/appMobilityServices" - modulepar charstring PX_ME_APP_AMS_SUBS := "/amsi/v1/subscriptions"; + modulepar charstring PX_ME_APP_AMS_SUBS := "amsi/v1/subscriptions"; modulepar charstring PX_MEO_GRANT_URI := "granting/v1/grants"; @@ -60,9 +62,9 @@ module LibMec_Pixits { modulepar charstring PX_MEX_LCM_OP_OCC_URI := "app_lcm/v1/app_lcm_op_occs"; - modulepar charstring PX_UE_APP_CTX_URI := "/mx2/v1/app_contexts"; + modulepar charstring PX_UE_APP_CTX_URI := "mx2/v1/app_contexts"; - modulepar charstring PX_UE_APPS_URI := "/mx2/v1/app_list"; + modulepar charstring PX_UE_APPS_URI := "mx2/v1/app_list"; modulepar charstring PX_MEC_SVC_MGMT_APPS_URI := "mec_app_support/v2/registrations"; @@ -76,17 +78,17 @@ module LibMec_Pixits { modulepar charstring PX_ME_APP_SUPPORT_TIMING_CAPS_URI := "mec_app_support/v2/timing/timing_caps"; - modulepar charstring PX_FAI_FA_INFO_URI := "/fai/v1/fa_info"; + modulepar charstring PX_FAI_FA_INFO_URI := "fai/v1/fa_info"; - modulepar charstring PX_FAI_DEVICE_INFO_URI:= "/fai/v1/device_info"; + modulepar charstring PX_FAI_DEVICE_INFO_URI:= "fai/v1/device_info"; - modulepar charstring PX_FAI_CABLE_LINE_INFO_URI := "/fai/v1/cable_line_info"; + modulepar charstring PX_FAI_CABLE_LINE_INFO_URI := "fai/v1/cable_line_info"; - modulepar charstring PX_FAI_OPTICAL_NW_INFO_URI := "/fai/v1/optical_network_info"; + modulepar charstring PX_FAI_OPTICAL_NW_INFO_URI := "fai/v1/optical_network_info"; - modulepar charstring PX_FAI_SUB_URI := "/fai/v1/optical_network_info"; + modulepar charstring PX_FAI_SUB_URI := "fai/v1/optical_network_info"; - modulepar charstring PX_UE_ZONAL_TRAF_SUB_URI := "/fai/v1/optical_network_info"; + modulepar charstring PX_UE_ZONAL_TRAF_SUB_URI := "fai/v1/optical_network_info"; modulepar charstring PX_FED_API_LIST_SYSTEM_INFO := "fed_enablement/v1/fed_resources/system_info"; -- GitLab From 6b2662a41859b1343061a03248c1eea9583c09f6 Mon Sep 17 00:00:00 2001 From: garciay Date: Wed, 10 Jan 2024 14:37:59 +0100 Subject: [PATCH 45/58] TTF T027: Finalyze review MEC-028 --- .../AtsMec_FederationEnablement_Mockoon.cf_ | 81 +++++ etc/AtsMec_IoT/AtsMec_IoT_Mockoon.cf_ | 81 +++++ .../AtsMec_WlanInformationAPI_TestCases.ttcn | 293 ++++-------------- ...AtsMec_WlanInformationAPI_TestControl.ttcn | 14 + .../ttcn/WlanInformationAPI_Functions.ttcn | 21 +- ttcn/LibMec/ttcn/LibMec_Pixits.ttcn | 2 + 6 files changed, 241 insertions(+), 251 deletions(-) create mode 100644 etc/AtsMec_FederationEnablement/AtsMec_FederationEnablement_Mockoon.cf_ create mode 100644 etc/AtsMec_IoT/AtsMec_IoT_Mockoon.cf_ diff --git a/etc/AtsMec_FederationEnablement/AtsMec_FederationEnablement_Mockoon.cf_ b/etc/AtsMec_FederationEnablement/AtsMec_FederationEnablement_Mockoon.cf_ new file mode 100644 index 0000000..a53911e --- /dev/null +++ b/etc/AtsMec_FederationEnablement/AtsMec_FederationEnablement_Mockoon.cf_ @@ -0,0 +1,81 @@ +[MODULE_PARAMETERS] +# This section shall contain the values of all parameters that are defined in your TTCN-3 modules. + +# IUT roles + +LibCommon_Time.PX_TAC := 30.0 +#LibCommon_Time.PX_TWAIT := 30.0 +LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; +LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; + +LibHttp_Pics.PICS_HEADER_HOST := "try-mec.etsi.org" #"192.168.1.39" + +LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" +LibHttp_Pics.PICS_USE_TOKEN_HEADER := true +#LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" + +LibMec_Pics.PICS_ROOT_API := "/sbx1y8q0x9/mep1" # Need to sign in on https://try-mec.etsi.org/, section 'Try-it from your MEC application' + +# LibMec_Pixits + + +[LOGGING] +# In this section you can specify the name of the log file and the classes of events +# you want to log into the file or display on console (standard error). + +LogFile := "../logs/AtsMec/%e.%h-%r.%s" +FileMask := LOG_ALL | USER | DEBUG | MATCHING +ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING +#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE +#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE +LogSourceInfo := Stack +LogEntityName:= Yes +LogEventTypes:= Yes +#TimeStampFormat := DateTime + +[TESTPORT_PARAMETERS] +# In this section you can specify parameters that are passed to Test Ports. +#system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.1.39,port=30030,use_ssl=0)" +system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=try-mec.etsi.org,port=443,use_ssl=1)" +#system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=443,use_ssl=1)" +system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=80,use_ssl=0)" + +[DEFINE] +# In this section you can create macro definitions, +# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE]. + +[INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[ORDERED_INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[EXTERNAL_COMMANDS] +# This section can define external commands (shell scripts) to be executed by the ETS +# whenever a control part or test case is started or terminated. + +#BeginTestCase := "" +#EndTestCase := "" +#BeginControlPart := "" +#EndControlPart := "" + +[EXECUTE] +# In this section you can specify what parts of your test suite you want to execute. +#AtsMec_TestControl.control + + +[GROUPS] +# In this section you can specify groups of hosts. These groups can be used inside the +# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts. + +[COMPONENTS] +# This section consists of rules restricting the location of created PTCs. + +[MAIN_CONTROLLER] +# The options herein control the behavior of MC. +KillTimer := 10.0 +LocalAddress := 127.0.0.1 +TCPPort := 12000 +NumHCs := 1 diff --git a/etc/AtsMec_IoT/AtsMec_IoT_Mockoon.cf_ b/etc/AtsMec_IoT/AtsMec_IoT_Mockoon.cf_ new file mode 100644 index 0000000..a53911e --- /dev/null +++ b/etc/AtsMec_IoT/AtsMec_IoT_Mockoon.cf_ @@ -0,0 +1,81 @@ +[MODULE_PARAMETERS] +# This section shall contain the values of all parameters that are defined in your TTCN-3 modules. + +# IUT roles + +LibCommon_Time.PX_TAC := 30.0 +#LibCommon_Time.PX_TWAIT := 30.0 +LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; +LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; + +LibHttp_Pics.PICS_HEADER_HOST := "try-mec.etsi.org" #"192.168.1.39" + +LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" +LibHttp_Pics.PICS_USE_TOKEN_HEADER := true +#LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" + +LibMec_Pics.PICS_ROOT_API := "/sbx1y8q0x9/mep1" # Need to sign in on https://try-mec.etsi.org/, section 'Try-it from your MEC application' + +# LibMec_Pixits + + +[LOGGING] +# In this section you can specify the name of the log file and the classes of events +# you want to log into the file or display on console (standard error). + +LogFile := "../logs/AtsMec/%e.%h-%r.%s" +FileMask := LOG_ALL | USER | DEBUG | MATCHING +ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING +#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE +#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE +LogSourceInfo := Stack +LogEntityName:= Yes +LogEventTypes:= Yes +#TimeStampFormat := DateTime + +[TESTPORT_PARAMETERS] +# In this section you can specify parameters that are passed to Test Ports. +#system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.1.39,port=30030,use_ssl=0)" +system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=try-mec.etsi.org,port=443,use_ssl=1)" +#system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=443,use_ssl=1)" +system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=80,use_ssl=0)" + +[DEFINE] +# In this section you can create macro definitions, +# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE]. + +[INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[ORDERED_INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[EXTERNAL_COMMANDS] +# This section can define external commands (shell scripts) to be executed by the ETS +# whenever a control part or test case is started or terminated. + +#BeginTestCase := "" +#EndTestCase := "" +#BeginControlPart := "" +#EndControlPart := "" + +[EXECUTE] +# In this section you can specify what parts of your test suite you want to execute. +#AtsMec_TestControl.control + + +[GROUPS] +# In this section you can specify groups of hosts. These groups can be used inside the +# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts. + +[COMPONENTS] +# This section consists of rules restricting the location of created PTCs. + +[MAIN_CONTROLLER] +# The options herein control the behavior of MC. +KillTimer := 10.0 +LocalAddress := 127.0.0.1 +TCPPort := 12000 +NumHCs := 1 diff --git a/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn b/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn index ff317d9..dcaab23 100644 --- a/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn +++ b/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn @@ -455,7 +455,7 @@ module AtsMec_WlanInformationAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions?subscription_type=assoc_sta", + PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "subscription_type=assoc_sta", v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -770,7 +770,7 @@ module AtsMec_WlanInformationAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions&filter=(eq,ap/macId,00:01:02:03:04:04)", + PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "&filter=(eq,ap/macId,00:01:02:03:04:04)", v_headers, m_http_message_body_json( m_body_json_assoc_sta_subscription( @@ -1319,9 +1319,7 @@ module AtsMec_WlanInformationAPI_TestCases { m_http_request_get( PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/queries/measurements", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1332,7 +1330,7 @@ module AtsMec_WlanInformationAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_wlan_measurement_config_link_list - )))) -> value v_response { + )))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of measurement config ***"); @@ -1348,125 +1346,14 @@ module AtsMec_WlanInformationAPI_TestCases { f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_012_OK - /** - * @desc Check that the IUT responds with the list of WLAN Access Point - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 - */ - /*testcase TC_MEC_MEC028_SRV_WAI_012_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/invalid_measurements", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - }*/ // End of testcase TC_MEC_MEC028_SRV_WAI_012_BR - - /** - * @desc Check that the IUT responds with the list of WLAN Access Point - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 - */ - testcase TC_MEC_MEC028_SRV_WAI_012_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/invalid_measurements", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ApInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_012_NF - /** * @desc Check that the IUT responds with a new measurement configuration - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_013_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; + var Json.String v_measurement_config_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { @@ -1485,7 +1372,7 @@ module AtsMec_WlanInformationAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements", + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS, v_headers, m_http_message_body_json( m_body_json_wlan_measurement_config( @@ -1501,7 +1388,7 @@ module AtsMec_WlanInformationAPI_TestCases { }, PX_MEASUREMENT_ID, m_measurement_info(1000, 10) - )))))); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1521,9 +1408,14 @@ module AtsMec_WlanInformationAPI_TestCases { )}, PX_MEASUREMENT_ID, mw_measurement_info - )))))) -> value v_response { + )))))) -> value v_response { tc_ac.stop; + v_measurement_config_id := regexp( + oct2char(unichar2oct(v_response.response.body.json_body.measurementConfig.links.self_.href)), + "?+" & PX_ME_WLAN_URI_MEAS & "/" & "(?*)", + 0 + ); log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1534,14 +1426,12 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_measurement_config(v_response.response.body.json_body.measurementConfig); + f_delete_measurement_config(v_measurement_config_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_013_OK /** * @desc Check that the IUT responds with an error when an invalid request is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_013_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1564,7 +1454,7 @@ module AtsMec_WlanInformationAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements", + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS, v_headers, m_http_message_body_json( m_body_json_wlan_measurement_config( @@ -1580,7 +1470,7 @@ module AtsMec_WlanInformationAPI_TestCases { }, PX_MEASUREMENT_ID, m_measurement_info(1000, 10) - )))))); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1589,7 +1479,7 @@ module AtsMec_WlanInformationAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully with the correct error code ***"); @@ -1605,83 +1495,14 @@ module AtsMec_WlanInformationAPI_TestCases { f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_013_BR - /** - * @desc Check that the IUT responds with an error when an invalid request is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 - */ - /*testcase TC_MEC_MEC028_SRV_WAI_013_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_WLAN_URI & "/Invalid_measurements", - v_headers, - m_http_message_body_json( - m_body_json_wlan_measurement_config( - m_measurement_config( - -, - { - m_sta_identity( - PX_MAC_ID, - PX_SSID, - -, - PX_IP_ADDRESS - ) - }, - PX_MEASUREMENT_ID, - m_measurement_info(1000, 10) - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully with the correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - }*/ // End of testcase TC_MEC_MEC028_SRV_WAI_013_NF - /** * @desc Check that the IUT responds with the specified measurement configuration - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_014_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; var MeasurementConfig v_measurement_config; + var Json.String v_measurement_config_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { @@ -1696,16 +1517,14 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_measurement_config(v_measurement_config); + f_create_measurement_config(v_measurement_config, v_measurement_config_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements/" & v_measurement_config.links.self_.href, + PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements" & "/" & v_measurement_config_id, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1728,7 +1547,7 @@ module AtsMec_WlanInformationAPI_TestCases { }, PX_MEASUREMENT_ID, mw_measurement_info - )))))) -> value v_response { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***"); @@ -1741,19 +1560,18 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_measurement_config(v_response.response.body.json_body.measurementConfig); + f_delete_measurement_config(v_measurement_config_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_014_OK /** * @desc Check that the IUT responds with an error when an invalid request is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_014_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var MeasurementConfig v_measurement_config; + var Json.String v_measurement_config_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { @@ -1768,16 +1586,14 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_measurement_config(v_measurement_config); + f_create_measurement_config(v_measurement_config, v_measurement_config_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements/" & v_measurement_config.links.self_.href & "_Invalid", + PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements"& "/" & v_measurement_config_id & "_Invalid", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1786,7 +1602,7 @@ module AtsMec_WlanInformationAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT responds with the correct error code ***"); @@ -1799,20 +1615,18 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_measurement_config(v_measurement_config); + f_delete_measurement_config(v_measurement_config_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_014_NF /** * @desc Check that the IUT responds with the modified measurement configuration - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_015_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; var MeasurementConfig v_measurement_config; + var Json.String v_measurement_config_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { @@ -1827,12 +1641,12 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_measurement_config(v_measurement_config); + f_create_measurement_config(v_measurement_config, v_measurement_config_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements" & v_measurement_config.links.self_.href, + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id, v_headers, m_http_message_body_json( m_body_json_wlan_measurement_config( @@ -1848,7 +1662,7 @@ module AtsMec_WlanInformationAPI_TestCases { }, PX_MEASUREMENT_ID, m_measurement_info(2000, 20) - )))))); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1869,7 +1683,7 @@ module AtsMec_WlanInformationAPI_TestCases { )}, PX_MEASUREMENT_ID, mw_measurement_info(2000, 20) - )))))) -> value v_response { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***"); @@ -1882,19 +1696,18 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_measurement_config(v_response.response.body.json_body.measurementConfig); + f_delete_measurement_config(v_measurement_config_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_015_OK /** * @desc Check that the IUT responds with an error when an invalid request is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_015_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var MeasurementConfig v_measurement_config; + var Json.String v_measurement_config_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { @@ -1909,12 +1722,12 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_measurement_config(v_measurement_config); + f_create_measurement_config(v_measurement_config, v_measurement_config_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements" & v_measurement_config.links.self_.href & "_Invalid", + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id & "_Invalid", v_headers, m_http_message_body_json( m_body_json_wlan_measurement_config( @@ -1930,7 +1743,7 @@ module AtsMec_WlanInformationAPI_TestCases { }, PX_MEASUREMENT_ID, m_measurement_info(2000, 20) - )))))); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1939,7 +1752,7 @@ module AtsMec_WlanInformationAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***"); @@ -1952,19 +1765,18 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_measurement_config(v_measurement_config); + f_delete_measurement_config(v_measurement_config_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_015_NF /** * @desc Check that the IUT responds with with 204 when requested to delete the specified measurement configuration - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_016_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var MeasurementConfig v_measurement_config; + var Json.String v_measurement_config_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { @@ -1979,14 +1791,14 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_measurement_config(v_measurement_config); + f_create_measurement_config(v_measurement_config, v_measurement_config_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements" & v_measurement_config.links.self_.href, + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id, v_headers - ))); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1995,7 +1807,7 @@ module AtsMec_WlanInformationAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***"); @@ -2013,13 +1825,12 @@ module AtsMec_WlanInformationAPI_TestCases { /** * @desc Check that the IUT responds with an error when an invalid request is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_016_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var MeasurementConfig v_measurement_config; + var Json.String v_measurement_config_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { @@ -2034,14 +1845,14 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_measurement_config(v_measurement_config); + f_create_measurement_config(v_measurement_config, v_measurement_config_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements" & v_measurement_config.links.self_.href & "_invalid", + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id & "_invalid", v_headers - ))); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2050,7 +1861,7 @@ module AtsMec_WlanInformationAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); @@ -2063,7 +1874,7 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_measurement_config(v_measurement_config); + f_delete_measurement_config(v_measurement_config_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_016_NF diff --git a/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestControl.ttcn b/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestControl.ttcn index 7f33626..d66759b 100644 --- a/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestControl.ttcn +++ b/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestControl.ttcn @@ -40,6 +40,20 @@ module AtsMec_WlanInformationAPI_TestControl { execute(TC_MEC_MEC028_SRV_WAI_010_NF()); execute(TC_MEC_MEC028_SRV_WAI_011_OK()); + + execute(TC_MEC_MEC028_SRV_WAI_012_OK()); + + execute(TC_MEC_MEC028_SRV_WAI_013_OK()); + execute(TC_MEC_MEC028_SRV_WAI_013_BR()); + + execute(TC_MEC_MEC028_SRV_WAI_014_OK()); + execute(TC_MEC_MEC028_SRV_WAI_014_NF()); + + execute(TC_MEC_MEC028_SRV_WAI_015_OK()); + execute(TC_MEC_MEC028_SRV_WAI_015_NF()); + + execute(TC_MEC_MEC028_SRV_WAI_016_OK()); + execute(TC_MEC_MEC028_SRV_WAI_016_NF()); } } // End of 'control' statement diff --git a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Functions.ttcn b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Functions.ttcn index cbab7d1..c97ae00 100644 --- a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Functions.ttcn +++ b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Functions.ttcn @@ -129,7 +129,8 @@ module WlanInformationAPI_Functions { } // End of function f_delete_assoc_sta_subscription function f_create_measurement_config( - out MeasurementConfig p_measurement_config + out MeasurementConfig p_measurement_config, + out Json.String p_measurement_config_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -138,7 +139,7 @@ module WlanInformationAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements", + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS, v_headers, m_http_message_body_json( m_body_json_wlan_measurement_config( @@ -169,7 +170,13 @@ module WlanInformationAPI_Functions { tc_ac.stop; p_measurement_config := v_response.response.body.json_body.measurementConfig; + p_measurement_config_id := regexp( + oct2char(unichar2oct(p_measurement_config.links.self_.href)), + "?+" & PX_ME_WLAN_URI_MEAS & "/" & "(?*)", + 0 + ); log("f_create_measurement_config: INFO: IUT successfully responds to the subscription: ", p_measurement_config); + log("f_create_measurement_config: INFO: p_measurement_config_id = ", p_measurement_config_id); } [] tc_ac.timeout { log("f_create_measurement_config: INCONC: Expected message not received"); @@ -179,21 +186,15 @@ module WlanInformationAPI_Functions { } // End of function "f_create_measurement_config function f_delete_measurement_config( - in MeasurementConfig p_measurement_config + in Json.String p_measurement_config_id ) runs on HttpComponent { var Headers v_headers; - var charstring v_uri := regexp( - oct2char(unichar2oct(p_measurement_config.links.self_.href)), - "?+(" & PX_ME_WLAN_URI & "?*)", - 0 - ); - log("====> v_uri: ", v_uri); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & v_uri, + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & p_measurement_config_id, v_headers ))); diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index 699134c..397652b 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -34,6 +34,8 @@ module LibMec_Pixits { modulepar charstring PX_ME_WLAN_URI_SUB := "wai/v2/subscriptions"; + modulepar charstring PX_ME_WLAN_URI_MEAS := "wai/v2/measurements"; + modulepar charstring PX_ME_V2X_URI := "vis/v1"; modulepar charstring PX_ME_V2X_QUERIES_URI := "/vis/v1/queries"; -- GitLab From 38258b5ca7a272d1d74134a799111e08eadae32b Mon Sep 17 00:00:00 2001 From: garciay Date: Thu, 11 Jan 2024 08:14:55 +0100 Subject: [PATCH 46/58] TTF T027: Finalyze review MEC-015 --- ...AtsMec_TrafficManagementAPI_TestCases.ttcn | 1965 +++++++++-------- ...sMec_TrafficManagementAPI_TestControl.ttcn | 30 +- .../ttcn/TrafficManagementAPI_Functions.ttcn | 18 +- .../ttcn/TrafficManagementAPI_Pixits.ttcn | 17 +- .../ttcn/TrafficManagementAPI_Templates.ttcn | 4 + .../TrafficManagementAPI_TypesAndValues.ttcn | 3 +- 6 files changed, 1098 insertions(+), 939 deletions(-) diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn index 9a4a577..f3b601d 100644 --- a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn @@ -7,7 +7,7 @@ * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. - * @see ETSI GS MEC 015, Draft ETSI GS MEC 015 V2.1.1 (2020-06) + * @see ETSI GS MEC 015, Draft ETSI GS MEC 015 V2.2.1 (2020-06) */ module AtsMec_TrafficManagementAPI_TestCases { @@ -42,692 +42,387 @@ module AtsMec_TrafficManagementAPI_TestCases { group me_app_role { /** - * @desc Check that the IUT responds with the list of configured bandwidth allocations when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with the list of configured bandwidth allocations when queried by a MEC Application - none */ - testcase TC_MEC_MEC015_SRV_TM_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PX_ME_BWM_URI, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_bw_info_list - )))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of BwInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_001_OK - - /** - * @desc Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_002_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_bw_info( - mw_bw_info( - PX_APP_INSTANCE_ID - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_002_OK - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_002_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PX_ME_BWM_URI & "/app_instance_id=" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), // 'app_instance_id=' is a wrong parameter - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_002_BR - - /** - * @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_002_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + testcase TC_MEC_MEC015_SRV_TM_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_bw_info_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of BwInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_APP_INSTANCE_ID, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 404 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_002_NF - - /** - * @desc Check that the IUT responds with a registration and initialisation approval for the requested bandwidth requirements sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_003_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001")); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PX_ME_BWM_URI, - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "1024", // FixedAllocation - Downlink // AllocationDirection - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_bw_info( - mw_bw_info( - v_app_instance_id - )))))) -> value v_response { - tc_ac.stop; - - if (f_check_headers(valueof(v_response.response.header)) == false) { - log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } else { - var charstring_list v_bw_allocation_id; - f_get_header(valueof(v_response.response.header), "Location", v_bw_allocation_id); - log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo, BWAllocationID: ", v_bw_allocation_id[0], " ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_003_OK_01 + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_001_OK /** - * @desc Check that the IUT responds with a registration and initialisation approval for the requested bandwidth requirements sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - app_instance_id */ - testcase TC_MEC_MEC015_SRV_TM_003_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002")); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + testcase TC_MEC_MEC015_SRV_TM_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_URI & "?app_instance_id=" & PX_APP_INSTANCE_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_bw_info( + mw_bw_info( + PX_APP_INSTANCE_ID + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the required BwInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PX_ME_BWM_URI, - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - v_app_instance_id, - SESSION_SPECIFIC_BW_ALLOCATION, // Request type - "1024", // FixedAllocation - Downlink // AllocationDirection - //{ m_session_filter("10.10.10.10", 1010) } - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_bw_info( - mw_bw_info( - v_app_instance_id, - SESSION_SPECIFIC_BW_ALLOCATION, // Request type - "1024", // FixedAllocation - Downlink // AllocationDirection - //{ mw_session_filter } - )))))) -> value v_response { - tc_ac.stop; - - if (f_check_headers(valueof(v_response.response.header)) == false) { - log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } else { - var charstring_list v_bw_allocation_id; - f_get_header(valueof(v_response.response.header), "Location", v_bw_allocation_id); - log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo, BWAllocationID: ", v_bw_allocation_id[0], " ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_003_OK_02 - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_003_BR_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PX_ME_BWM_URI, - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "Invalid", // FixedAllocation - Downlink // AllocationDirection - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_003_BR_01 + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_001_OK_02 /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - app_name */ - testcase TC_MEC_MEC015_SRV_TM_003_BR_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + testcase TC_MEC_MEC015_SRV_TM_001_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_URI & "?app_name=" & PX_APP_NAME, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_bw_info( + mw_bw_info( + PX_APP_INSTANCE_ID, + -, -, -, + PX_APP_NAME + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the required BwInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PX_ME_BWM_URI, - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "1024", // FixedAllocation - Downlink // AllocationDirection - //{ m_session_filter("10.10.10.10", 1010) } // MEC015 Clause 7.2.2 Type: BwInfo Table 7.2.2-1: Elements of BwInfo, sessionFilter shall be omit - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_003_BR_02 - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_003_BR_03() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PX_ME_BWM_URI, - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - PX_APP_INSTANCE_ID, - SESSION_SPECIFIC_BW_ALLOCATION, // Request type - "1024", // FixedAllocation - Downlink // AllocationDirection - // MEC015 Clause 7.2.2 Type: BwInfo Table 7.2.2-1: Elements of BwInfo, sessionFilter shall be present - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_003_BR_03 + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_001_OK_03 /** - * @desc Check that the IUT responds with the configured bandwidth allocation when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - session_id */ - testcase TC_MEC_MEC015_SRV_TM_004_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var charstring v_bw_allocation_id; - var BwInfo v_bw_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001")); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info); - if (v_bw_allocation_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + testcase TC_MEC_MEC015_SRV_TM_001_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_URI & "?session_id=" & PX_APP_ALLOCATION_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_bw_info( + mw_bw_info( + PX_APP_INSTANCE_ID, + -, -, -, + PX_APP_NAME, + PX_APP_ALLOCATION_ID + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the required BwInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test Body - httpPort.send( - m_http_request( - m_http_request_get( - PX_ME_BWM_URI & "/" & v_bw_allocation_id, - v_headers - ) - ) - ); - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_bw_info( - mw_bw_info( - v_app_instance_id - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo ***"); - f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_004_OK + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_001_OK_04 /** - * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - app_instance_id */ - testcase TC_MEC_MEC015_SRV_TM_004_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_TM_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_URI & "?appInstId=" & PX_APP_INSTANCE_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_001_BR + + /** + * @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - app_instance_id + */ + testcase TC_MEC_MEC015_SRV_TM_001_NF_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_URI & "?app_instance_id=" & PX_UNKNOWN_APP_INSTANCE_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_001_NF_01 + + /** + * @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - app_name + */ + testcase TC_MEC_MEC015_SRV_TM_001_NF_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_URI & "?app_name=" & PX_UNKNOWN_APP_NAME, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_001_NF_02 + + /** + * @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - session_id + */ + testcase TC_MEC_MEC015_SRV_TM_001_NF_03() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var charstring v_bw_allocation_id; - var BwInfo v_bw_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001")); // Test control if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { @@ -743,30 +438,24 @@ module AtsMec_TrafficManagementAPI_TestCases { // Preamble f_init_default_headers_list(-, -, v_headers); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body httpPort.send( m_http_request( m_http_request_get( - PX_ME_BWM_URI & "/Unknown_bw_allocation_id", + PICS_ROOT_API & PX_ME_BWM_URI & "?session_id=" & PX_UNKNOWN_APP_ALLOCATION_ID, v_headers - ) - ) - ); + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 404 - )))))) { + mw_http_response_404_not_found + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -777,20 +466,586 @@ module AtsMec_TrafficManagementAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_004_NF + } // End of testcase TC_MEC_MEC015_SRV_TM_001_NF_03 + + /** + * @desc Check that the IUT acknowledges a creation of a bandwidthAllocation resource + */ + testcase TC_MEC_MEC015_SRV_TM_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_bw_allocation_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_bw_info( + m_bw_info( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION, + "1024", + Downlink, + PX_APP_NAME, + PX_APP_ALLOCATION_ID + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_bw_info( + mw_bw_info( + PX_APP_INSTANCE_ID, + -, -, -, + PX_APP_NAME, + PX_APP_ALLOCATION_ID + )))))) -> value v_response { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_bw_allocation_id := regexp( + v_header_location[0], + "?+" & PX_ME_BWM_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo, CreationID: ", v_bw_allocation_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_002_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted + */ + testcase TC_MEC_MEC015_SRV_TM_002_BR_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_bw_info( + m_bw_info( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION, + "1024", + Downlink, + PX_APP_NAME, + PX_APP_ALLOCATION_ID, + { m_session_filter("10.10.10.10", 1010) } // FIXME Use PIXITs + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_002_BR_01 + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present + */ + testcase TC_MEC_MEC015_SRV_TM_002_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_bw_info( + m_bw_info( + PX_APP_INSTANCE_ID, + SESSION_SPECIFIC_BW_ALLOCATION, + "1024", + Downlink, + PX_APP_NAME, + PX_APP_ALLOCATION_ID, + - // Session shall be present + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_002_BR_02 + + /** + * @desc Check that the IUT responds with the configured bandwidth allocation when queried by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_TM_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_bw_allocation_id; + var BwInfo v_bw_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); + if (v_bw_allocation_id == "") { + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_bw_info( + mw_bw_info( + PX_APP_INSTANCE_ID, + -, -, -, + v_bw_allocation_id + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct BwInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_003_OK + + /** + * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_TM_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_003_NF + /** * @desc Check that the IUT updates the requested bandwidth requirements when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + */ + testcase TC_MEC_MEC015_SRV_TM_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_bw_allocation_id; + var BwInfo v_bw_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); + if (v_bw_allocation_id == "") { + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, + v_headers, + m_http_message_body_json( + m_body_json_bw_info( + m_bw_info( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type + "2048", // FixedAllocation + Downlink // AllocationDirection + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_bw_info( + mw_bw_info( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type + "2048", // FixedAllocation + Downlink // AllocationDirection + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated BwInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_004_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted + */ + testcase TC_MEC_MEC015_SRV_TM_004_BR_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_bw_allocation_id; + var BwInfo v_bw_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); + if (v_bw_allocation_id == "") { + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_init_default_headers_list(-, -, v_headers); + v_bw_info.sessionFilter := { valueof(m_session_filter("10.10.10.10", 1010)) }; // FIXME Use PIXITs + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, + v_headers, + m_http_message_body_json( + m_body_json_bw_info( + v_bw_info + ))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_004_BR_01 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present + */ + testcase TC_MEC_MEC015_SRV_TM_004_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_bw_allocation_id; + var BwInfo v_bw_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); + if (v_bw_allocation_id == "") { + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_init_default_headers_list(-, -, v_headers); + v_bw_info.requestType := SESSION_SPECIFIC_BW_ALLOCATION; + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, + v_headers, + m_http_message_body_json( + m_body_json_bw_info( + v_bw_info + ))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_004_BR_02 + + /** + * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_TM_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_ID, + v_headers, + m_http_message_body_json( + m_body_json_bw_info( + m_bw_info( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION, + "2048", // FixedAllocation + Downlink + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_004_NF + + /** + * @desc Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application */ testcase TC_MEC_MEC015_SRV_TM_005_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; var charstring v_bw_allocation_id; var BwInfo v_bw_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002")); // Test control if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { @@ -805,33 +1060,24 @@ module AtsMec_TrafficManagementAPI_TestCases { // Test adapter configuration // Preamble - f_init_default_headers_list(-, -, v_headers); - f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info); + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); if (v_bw_allocation_id == "") { f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); } - - // Test Body + f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_put( - PX_ME_BWM_URI & "/" & v_bw_allocation_id, - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "2048", // FixedAllocation - Downlink // AllocationDirection - ) - ) - ) - ) - ) - ); + m_http_request_patch( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, + v_headers, + m_http_message_body_json( + m_body_json_bw_info_deltas( + m_bw_info_deltas( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION + )))))); + + // Test Body tc_ac.start; alt { [] httpPort.receive( @@ -840,15 +1086,14 @@ module AtsMec_TrafficManagementAPI_TestCases { mw_http_message_body_json( mw_body_json_bw_info( mw_bw_info( - v_app_instance_id, + PX_APP_INSTANCE_ID, APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "2048", // FixedAllocation + "5096", // FixedAllocation Downlink // AllocationDirection - )))))) -> value v_response { + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated BwInfo ***"); - f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a patched BwInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -858,20 +1103,18 @@ module AtsMec_TrafficManagementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC015_SRV_TM_005_OK /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted */ - testcase TC_MEC_MEC015_SRV_TM_005_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_TM_005_BR_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring v_bw_allocation_id; var BwInfo v_bw_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002")); // Test control if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { @@ -886,33 +1129,26 @@ module AtsMec_TrafficManagementAPI_TestCases { // Test adapter configuration // Preamble - f_init_default_headers_list(-, -, v_headers); - f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info); + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); if (v_bw_allocation_id == "") { f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); } - - // Test Body - httpPort.send( + f_init_default_headers_list(-, -, v_headers); + httpPort.send( m_http_request( - m_http_request_put( - PX_ME_BWM_URI & "/" & v_bw_allocation_id, - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "Invalid", // FixedAllocation - Downlink // AllocationDirection - ) - ) - ) - ) - ) - ); + m_http_request_patch( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, + v_headers, + m_http_message_body_json( + m_body_json_bw_info_deltas( + m_bw_info_deltas( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION, + v_bw_info.allocationId, + { m_session_filter("10.10.10.10", 1010) } // FIXME Use PIXITs + )))))); + + // Test Body tc_ac.start; alt { [] httpPort.receive( @@ -922,81 +1158,10 @@ module AtsMec_TrafficManagementAPI_TestCases { mw_body_json_problem_details( mw_problem_details( -, -, 400 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_005_BR - - /** - * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_005_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("003")); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - httpPort.send( - m_http_request( - m_http_request_put( - PX_ME_BWM_URI & "/InvalidAllocationId", - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "2048", // FixedAllocation - Downlink // AllocationDirection - ) - ) - ) - ) - ) - ); - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 404 - )))))) { + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error message ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1006,21 +1171,18 @@ module AtsMec_TrafficManagementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_005_NF + } // End of testcase TC_MEC_MEC015_SRV_TM_005_BR_01 /** - * @desc Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present */ - testcase TC_MEC_MEC015_SRV_TM_006_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_TM_005_BR_02() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; var charstring v_bw_allocation_id; var BwInfo v_bw_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("004")); // Test control if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { @@ -1035,48 +1197,39 @@ module AtsMec_TrafficManagementAPI_TestCases { // Test adapter configuration // Preamble - f_init_default_headers_list(-, -, v_headers); - f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info); + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); if (v_bw_allocation_id == "") { f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); } - - // Test Body - httpPort.send( + f_init_default_headers_list(-, -, v_headers); + httpPort.send( m_http_request( m_http_request_patch( - PX_ME_BWM_URI & "/" & v_bw_allocation_id, + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, v_headers, m_http_message_body_json( m_body_json_bw_info_deltas( m_bw_info_deltas( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION // Request type - ) - ) - ) - ) - ) - ); + PX_APP_INSTANCE_ID, + SESSION_SPECIFIC_BW_ALLOCATION, + v_bw_info.allocationId + //{ m_session_filter("10.10.10.10", 1010) } sessionFilter shall be present + )))))); + + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_bw_info( - mw_bw_info( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "5096", // FixedAllocation - Downlink // AllocationDirection - )))))) -> value v_response { + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_problem_details( + mw_problem_details( + -, -, 400 + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a patched BwInfo ***"); - f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error message ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1086,20 +1239,16 @@ module AtsMec_TrafficManagementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_006_OK + } // End of testcase TC_MEC_MEC015_SRV_TM_005_BR_02 /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application */ - testcase TC_MEC_MEC015_SRV_TM_006_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_TM_005_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var charstring v_bw_allocation_id; - var BwInfo v_bw_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("004")); // Test control if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { @@ -1115,44 +1264,28 @@ module AtsMec_TrafficManagementAPI_TestCases { // Preamble f_init_default_headers_list(-, -, v_headers); - f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info); - if (v_bw_allocation_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - // Test Body httpPort.send( m_http_request( m_http_request_patch( - PX_ME_BWM_URI & "/" & v_bw_allocation_id, + PICS_ROOT_API & PX_ME_BWM_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_ID, v_headers, m_http_message_body_json( m_body_json_bw_info_deltas( m_bw_info_deltas( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION // Request type - ) - ) - ) - ) - ) - ); + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION + )))))); + + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - )))))) { + mw_http_response_404_not_found + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a patched BwInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1163,19 +1296,16 @@ module AtsMec_TrafficManagementAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_006_BR + } // End of testcase TC_MEC_MEC015_SRV_TM_005_NF /** - * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT unregisters from the Bandwidth Management Service when commanded by a MEC Application */ - testcase TC_MEC_MEC015_SRV_TM_006_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_TM_006_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring v_bw_allocation_id; var BwInfo v_bw_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("004")); // Test control if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { @@ -1190,39 +1320,30 @@ module AtsMec_TrafficManagementAPI_TestCases { // Test adapter configuration // Preamble + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); + if (v_bw_allocation_id == "") { + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } f_init_default_headers_list(-, -, v_headers); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body httpPort.send( m_http_request( - m_http_request_patch( - PX_ME_BWM_URI & "/" & v_bw_allocation_id, - v_headers, - m_http_message_body_json( - m_body_json_bw_info_deltas( - m_bw_info_deltas( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION // Request type - ) - ) - ) - ) + m_http_request_delete( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, + v_headers + ) ) ); + + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 404 - )))))) { + mw_http_response_204_no_content + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1233,19 +1354,16 @@ module AtsMec_TrafficManagementAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_006_NF + } // End of testcase TC_MEC_MEC015_SRV_TM_006_OK /** - * @desc Check that the IUT unregisters from the Bandwidth Management Service when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application */ - testcase TC_MEC_MEC015_SRV_TM_007_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_TM_006_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring v_bw_allocation_id; var BwInfo v_bw_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("005")); // Test control if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { @@ -1260,29 +1378,25 @@ module AtsMec_TrafficManagementAPI_TestCases { // Test adapter configuration // Preamble - f_init_default_headers_list(-, -, v_headers); - f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info); + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); if (v_bw_allocation_id == "") { f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); } - - // Test Body + f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PX_ME_BWM_URI & "/" & v_bw_allocation_id, + PICS_ROOT_API & PX_ME_BWM_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_ID, v_headers - ) - ) - ); + ))); + + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***"); @@ -1295,8 +1409,9 @@ module AtsMec_TrafficManagementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_007_OK + } // End of testcase TC_MEC_MEC015_SRV_TM_006_NF } // End of group me_app_role diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn index 430b965..df71fa7 100644 --- a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn @@ -12,10 +12,34 @@ module AtsMec_TrafficManagementAPI_TestControl { control { if (PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED) { - execute(TC_MEC_MEC015_SRV_TM_001_OK()); + execute(TC_MEC_MEC015_SRV_TM_001_OK_01()); + execute(TC_MEC_MEC015_SRV_TM_001_OK_02()); + execute(TC_MEC_MEC015_SRV_TM_001_OK_03()); + execute(TC_MEC_MEC015_SRV_TM_001_OK_04()); + execute(TC_MEC_MEC015_SRV_TM_001_BR()); + execute(TC_MEC_MEC015_SRV_TM_001_NF_01()); + execute(TC_MEC_MEC015_SRV_TM_001_NF_02()); + execute(TC_MEC_MEC015_SRV_TM_001_NF_03()); + execute(TC_MEC_MEC015_SRV_TM_002_OK()); - execute(TC_MEC_MEC015_SRV_TM_002_BR()); - execute(TC_MEC_MEC015_SRV_TM_002_NF()); + execute(TC_MEC_MEC015_SRV_TM_002_BR_01()); + execute(TC_MEC_MEC015_SRV_TM_002_BR_02()); + + execute(TC_MEC_MEC015_SRV_TM_003_OK()); + execute(TC_MEC_MEC015_SRV_TM_003_NF()); + + execute(TC_MEC_MEC015_SRV_TM_004_OK()); + execute(TC_MEC_MEC015_SRV_TM_004_BR_01()); + execute(TC_MEC_MEC015_SRV_TM_004_BR_02()); + execute(TC_MEC_MEC015_SRV_TM_004_NF()); + + execute(TC_MEC_MEC015_SRV_TM_005_OK()); + execute(TC_MEC_MEC015_SRV_TM_005_BR_01()); + execute(TC_MEC_MEC015_SRV_TM_005_BR_02()); + execute(TC_MEC_MEC015_SRV_TM_005_NF()); + + execute(TC_MEC_MEC015_SRV_TM_006_OK()); + execute(TC_MEC_MEC015_SRV_TM_006_NF()); } } // End of 'control' statement diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn index 6e92be6..63f2cf7 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn @@ -40,7 +40,7 @@ module TrafficManagementAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PX_ME_BWM_URI, + PICS_ROOT_API & PX_ME_BWM_URI, v_headers, m_http_message_body_json( m_body_json_bw_info( @@ -60,16 +60,18 @@ module TrafficManagementAPI_Functions { mw_bw_info( p_app_instance_id )))))) -> value v_response { - var charstring_list v_bw_allocation_id; + var charstring_list v_header_location; tc_ac.stop; log("f_create_bw_allocation_resource: BwInfo resource created: ", v_response); - f_get_header(valueof(v_response.response.header), "Location", v_bw_allocation_id); - if (lengthof(v_bw_allocation_id) != 0) { - p_bw_allocation_id := v_bw_allocation_id[0]; - p_bw_info := v_response.response.body.json_body.bwInfo; - } + f_get_header(valueof(v_response.response.header), "Location", v_header_location); + p_bw_allocation_id := regexp( + v_header_location[0], + "?+" & PX_ME_BWM_URI & "/(?*)", + 0 + ); + p_bw_info := v_response.response.body.json_body.bwInfo; } [] tc_ac.timeout { log("f_create_bw_allocation_resource: Expected message not received"); @@ -87,7 +89,7 @@ module TrafficManagementAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PX_ME_BWM_URI & "/" & p_bw_allocation_id, + PICS_ROOT_API & PX_ME_BWM_URI & "/" & p_bw_allocation_id, v_headers ))); tc_ac.start; diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn index 352ca84..2b915be 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn @@ -1,5 +1,8 @@ module TrafficManagementAPI_Pixits { + // JSON + import from Json all; + // LibCommon import from LibCommon_BasicTypesAndValues all; @@ -8,9 +11,19 @@ module TrafficManagementAPI_Pixits { // LibMec/LocationAPI import from LocationAPI_TypesAndValues all; - modulepar Address PX_APP_INSTANCE_ID := "appInst01"; + modulepar Json.String PX_APP_INSTANCE_ID := "appInst01"; + + modulepar Json.String PX_APP_ALLOCATION_ID := "appAllocationId01"; + + modulepar Json.String PX_APP_NAME := "appName01"; + + modulepar Json.String PX_UNKNOWN_APP_INSTANCE_ID := "appInst99"; + + modulepar Json.String PX_UNKNOWN_APP_NAME := "appName99"; + + modulepar Json.String PX_UNKNOWN_APP_ALLOCATION_ID := "appAllocationId99"; - modulepar Address PX_UNKNOWN_APP_INSTANCE_ID := "appInst99"; + modulepar Json.String PX_UNKNOWN_BW_ALLOCATION_ID := "bwAllocationId99"; modulepar ResourceURL PX_RESOURCE_URL := "http://example.com/exampleAPI/location/v2/users?address:acr:192.0.0.1"; diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn index 2fd17bf..7eb39f0 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn @@ -18,6 +18,7 @@ module TrafficManagementAPI_Templates { in BwRequestType p_requestType, in FixedAllocation p_fixedAllocation, in AllocationDirection p_allocationDirection, + in template (omit) Json.String p_appName := omit, in template (omit) AllocationId p_allocationId := omit, in template (omit) SessionFilter p_sessionFilter := omit, in template (omit) FixedBWPriority p_fixedBWPriority := omit @@ -25,6 +26,7 @@ module TrafficManagementAPI_Templates { allocationId := p_allocationId, timeStamp := omit, appInsId := p_appInsId, + appName := p_appName, requestType := p_requestType, sessionFilter := p_sessionFilter, fixedBWPriority := p_fixedBWPriority, @@ -37,6 +39,7 @@ module TrafficManagementAPI_Templates { template (present) BwRequestType p_requestType := ?, template (present) FixedAllocation p_fixedAllocation := ?, template (present) AllocationDirection p_allocationDirection := ?, + template Json.String p_appName := *, template AllocationId p_allocationId := *, template SessionFilter p_sessionFilter := *, template FixedBWPriority p_fixedBWPriority := * @@ -44,6 +47,7 @@ module TrafficManagementAPI_Templates { allocationId := p_allocationId, timeStamp := *, appInsId := p_appInsId, + appName := p_appName, requestType := p_requestType, sessionFilter := p_sessionFilter, fixedBWPriority := p_fixedBWPriority, diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn index 3800d40..8ce3821 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn @@ -21,7 +21,8 @@ module TrafficManagementAPI_TypesAndValues { type record BwInfo { AllocationId allocationId optional, TimeStamp timeStamp optional, - AppInsId appInsId, + AppInsId appInsId optional, + Json.String appName, BwRequestType requestType, SessionFilter sessionFilter optional, FixedBWPriority fixedBWPriority optional, -- GitLab From 6c086fab28ea9482ffd5c901ba176cc8ed03867e Mon Sep 17 00:00:00 2001 From: garciay Date: Thu, 11 Jan 2024 15:56:20 +0100 Subject: [PATCH 47/58] TTF T027: Finalyze review MEC-015/MTS --- ..._MultiAccessSteeringInfoAPI_TestCases.ttcn | 744 ++++++++++++------ ...sMec_TrafficManagementAPI_TestControl.ttcn | 25 + ..._V2XInformationServiceAPI_TestControl.ttcn | 1 + .../ttcn/TrafficManagementAPI_Functions.ttcn | 12 +- .../ttcn/TrafficManagementAPI_Pics.ttcn | 5 + .../ttcn/TrafficManagementAPI_Pixits.ttcn | 2 + .../TrafficManagementAPI_TypesAndValues.ttcn | 4 +- ttcn/LibMec/ttcn/LibMec_Pixits.ttcn | 2 +- 8 files changed, 529 insertions(+), 266 deletions(-) diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn index 96b574c..1026770 100644 --- a/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn @@ -43,17 +43,14 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { /** * @desc Check that the IUT responds with the Multi-access Traffic Steering information when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml */ testcase TC_MEC_MEC015_SRV_MTS_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -68,11 +65,9 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PX_ME_MTS_INFO_URI, + PICS_ROOT_API & PX_ME_MTS_INFO_URI, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -84,7 +79,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { mw_http_message_body_json( mw_body_json_mts_capability_info( mw_mts_capability_info - ))))) -> value v_response { + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of MtsCapabilityInfo ***"); @@ -101,18 +96,17 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of testcase TC_MEC_MEC015_SRV_MTS_001_OK /** - * @desc Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - none */ - testcase TC_MEC_MEC015_SRV_MTS_002_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_MTS_002_OK_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var charstring v_mts_session_id_1, v_mts_session_id_2; + var MtsSessionInfo v_mts_session_info_1, v_mts_session_info_2; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -123,15 +117,89 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id_1, v_mts_session_info_1); + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID_2, v_mts_session_id_2, v_mts_session_info_2); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PX_ME_MTS_SESSIONS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI, v_headers - ) - ) - ); + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_mts_session_info_list( + { + *, + mw_mts_session_info( + v_mts_session_info_1.appInsId, + v_mts_session_info_1.requestType, + -, -, -, + v_mts_session_info_1.sessionId + ), + mw_mts_session_info( + v_mts_session_info_2.appInsId, + v_mts_session_info_2.requestType, + -, -, -, + v_mts_session_info_2.sessionId + ), + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an MtsSessionInfo list ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id_1); + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID_2, v_mts_session_id_2); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_MTS_002_OK_01 + + /** + * @desc Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - app_instance_id + */ + testcase TC_MEC_MEC015_SRV_MTS_002_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_mts_session_id + var MtsSessionInfo v_mts_session_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "?app_instance_id=" & oct2char(unichar2oct(v_mts_session_info.appInsId, "UTF-8")), + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -141,8 +209,13 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_mts_session_info_list - )))) -> value v_response { + mw_body_json_mts_session_info( + mw_mts_session_info( + v_mts_session_info.appInsId, + v_mts_session_info.requestType, + -, -, -, + v_mts_session_id + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an MtsSessionInfo list ***"); @@ -155,21 +228,146 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_MTS_002_OK + } // End of testcase TC_MEC_MEC015_SRV_MTS_002_OK_02 + + /** + * @desc Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - app_name + */ + testcase TC_MEC_MEC015_SRV_MTS_002_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_mts_session_id + var MtsSessionInfo v_mts_session_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "?app_name=" & oct2char(unichar2oct(v_mts_session_info.appName, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_mts_session_info( + mw_mts_session_info( + v_mts_session_info.appInsId, + v_mts_session_info.requestType, + -, -, -, + v_mts_session_id, + v_mts_session_info.appName + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an MtsSessionInfo list ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_MTS_002_OK_03 + + /** + * @desc Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - sessionId + */ + testcase TC_MEC_MEC015_SRV_MTS_002_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_mts_session_id + var MtsSessionInfo v_mts_session_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "?session_id=" & oct2char(unichar2oct(v_mts_session_info.sessionId, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_mts_session_info( + mw_mts_session_info( + v_mts_session_info.appInsId, + v_mts_session_info.requestType, + -, -, -, + v_mts_session_info.sessionId, + v_mts_session_info.appName + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an MtsSessionInfo list ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_MTS_002_OK_04 /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml */ testcase TC_MEC_MEC015_SRV_MTS_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -184,11 +382,9 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PX_ME_MTS_SESSIONS_URI & "/app_instance_id=" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), // 'app_instance_id=' is a wrong parameter + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "?appInsId=" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), // 'appInsId=' is a wrong parameter v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -201,10 +397,10 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { mw_body_json_problem_details( mw_problem_details( -, -, 400 - )))))) { + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -219,16 +415,16 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml */ testcase TC_MEC_MEC015_SRV_MTS_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var charstring v_mts_session_id + var MtsSessionInfo v_mts_session_info; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -239,15 +435,14 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PX_ME_MTS_SESSIONS_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_APP_INSTANCE_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "?app_instance_id=" & oct2char(unichar2oct(PX_UNKNOWN_APP_INSTANCE_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -259,11 +454,11 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { mw_http_message_body_json( mw_body_json_problem_details( mw_problem_details( - -, -, 404 - )))))) { + -, -, 404 + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -273,22 +468,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC015_SRV_MTS_002_NF /** - * @desc Check that the IUT responds with a registration and initialisation approval for the requested MTS session requirements sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT creates a MTS session when queried by a MEC Application */ - testcase TC_MEC_MEC015_SRV_MTS_003_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_MTS_003_OK_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; + var charstring v_mts_session_id; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -303,13 +498,13 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PX_ME_MTS_SESSIONS_URI, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI, v_headers, m_http_message_body_json( m_body_json_mts_session_info( m_mts_session_info( PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type + APPLICATION_SPECIFIC_MTS_SESSION, // Request type m_qosd, // QoS LowCost, // MtsMode Downlink // TrafficDirection @@ -326,16 +521,103 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { mw_body_json_mts_session_info( mw_mts_session_info( PX_APP_INSTANCE_ID - )))))) -> value v_response { + )))))) -> value v_response { + tc_ac.stop; + + if (f_check_headers(valueof(v_response.response.header)) == false) { + log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(valueof(v_response.response.header), "Location", v_header_location); + v_mts_session_id := regexp( + v_header_location[0], + "?+" & PX_ME_MTS_SESSIONS_URI & "/(?*)", + 0 + ); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a MtsSessionInfo, v_mts_session_id: ", v_mts_session_id, " ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_MTS_003_OK_01 + + /** + * @desc Check that the IUT creates a MTS session when queried by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_MTS_003_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_mts_session_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI, + v_headers, + m_http_message_body_json( + m_body_json_mts_session_info( + m_mts_session_info( + PX_APP_INSTANCE_ID, + FLOW_SPECIFIC_MTS_SESSION, // Request type + m_qosd, // QoS + LowCost, // MtsMode + Downlink, // TrafficDirection + -, -, + { m_flow_filter("10.10.10.10", 1010) } // FIXME Use PIXITs + + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_mts_session_info( + mw_mts_session_info( + PX_APP_INSTANCE_ID, + FLOW_SPECIFIC_MTS_SESSION + )))))) -> value v_response { tc_ac.stop; if (f_check_headers(valueof(v_response.response.header)) == false) { log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } else { - var charstring_list v_mts_session_id; - f_get_header(valueof(v_response.response.header), "Location", v_mts_session_id); - log("*** " & testcasename() & ": PASS: IUT successfully responds with a MtsSessionInfo, MtsSessionInfoId: ", v_mts_session_id[0], " ***"); + var charstring_list v_header_location; + f_get_header(valueof(v_response.response.header), "Location", v_header_location); + v_mts_session_id := regexp( + v_header_location[0], + "?+" & PX_ME_MTS_SESSIONS_URI & "/(?*)", + 0 + ); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a MtsSessionInfo, v_mts_session_id: ", v_mts_session_id, " ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } } @@ -346,21 +628,20 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_MTS_003_OK + } // End of testcase TC_MEC_MEC015_SRV_MTS_003_OK_02 /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml */ testcase TC_MEC_MEC015_SRV_MTS_003_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -375,16 +656,19 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PX_ME_MTS_SESSIONS_URI, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI, v_headers, m_http_message_body_json( m_body_json_mts_session_info( m_mts_session_info( PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type + APPLICATION_SPECIFIC_MTS_SESSION, // Request type m_qosd, // QoS LowCost, // MtsMode - Downlink // TrafficDirection + Downlink, // TrafficDirection + -, -, + { m_flow_filter("10.10.10.10", 1010) } // // MEC015 Clause 7.2.5 Type: MtsSessionInfo Table 7.2.5-1: Elements of MtsSessionInfo, flowFilter shall be omit + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -393,15 +677,11 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - )))))) { + mw_http_response_400_bad_request + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -415,21 +695,17 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of testcase TC_MEC_MEC015_SRV_MTS_003_BR /** - * @desc Check that the IUT responds with a configured Multi-access Traffic Steering when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with a configured Multi-access Traffic Steering session when queried by a MEC Application */ testcase TC_MEC_MEC015_SRV_MTS_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; var charstring v_mts_session_id; var MtsSessionInfo v_mts_session_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001")); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -440,19 +716,76 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); - f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info); - if (v_mts_session_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, + v_headers + ))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_mts_session_info( + mw_mts_session_info( + v_mts_session_info.appInsId, + v_mts_session_info.requestType, + -, -, -, + v_mts_session_info.sessionId + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_MTS_004_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_MTS_004_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_mts_session_id; + var MtsSessionInfo v_mts_session_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; } + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); + f_init_default_headers_list(-, -, v_headers); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Test Body httpPort.send( m_http_request( m_http_request_get( - PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, + PICS_ROOT_API & "mts/v0/mts_sessions/" & PX_UNKNOWN_APP_INSTANCE_ID, // Wrong version number v_headers ) ) @@ -461,16 +794,15 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_bw_info( - mw_bw_info( - PX_APP_INSTANCE_ID - )))))) -> value v_response { + mw_http_response_404_not_found( + mw_http_message_body_json( + mw_body_json_problem_details( + mw_problem_details( + -, -, 404 + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo ***"); - f_delete_mts_session_info_resource(v_app_instance_id, v_mts_session_id); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -480,24 +812,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_MTS_004_OK + } // End of testcase TC_MEC_MEC015_SRV_MTS_004_BR /** - * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application */ testcase TC_MEC_MEC015_SRV_MTS_004_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring v_mts_session_id; var MtsSessionInfo v_mts_session_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001")); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -508,6 +838,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -515,7 +846,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PX_ME_MTS_SESSIONS_URI & "/Unknown_bw_allocation_id", + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & PX_UNKNOWN_APP_INSTANCE_ID, v_headers ) ) @@ -532,7 +863,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -542,25 +873,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC015_SRV_MTS_004_NF /** - * @desc - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT updates the information about an individual MTS session when commanded by a MEC Application */ testcase TC_MEC_MEC015_SRV_MTS_005_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; var charstring v_mts_session_id; var MtsSessionInfo v_mts_session_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002")); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -571,47 +899,41 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); - f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info); - if (v_mts_session_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - // Test Body httpPort.send( m_http_request( m_http_request_put( - PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, v_headers, m_http_message_body_json( m_body_json_mts_session_info( m_mts_session_info( PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type + APPLICATION_SPECIFIC_MTS_SESSION, // Request type m_qosd_1, // QoS LowCost, // MtsMode Downlink // TrafficDirection )))))); + + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_mts_session_info( - mw_mts_session_info( - PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type - mw_qosd_1, // QoS - LowCost, // MtsMode - Downlink // TrafficDirection - )))))) -> value v_response { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_mts_session_info( + mw_mts_session_info( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_MTS_SESSION, // Request type + mw_qosd_1, // QoS + LowCost, // MtsMode + Downlink // TrafficDirection + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated MtsSessionInfo ***"); - f_delete_mts_session_info_resource(v_app_instance_id, v_mts_session_id); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -621,24 +943,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC015_SRV_MTS_005_OK /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml */ testcase TC_MEC_MEC015_SRV_MTS_005_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring v_mts_session_id; var MtsSessionInfo v_mts_session_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002")); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -649,29 +969,24 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); - f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info); - if (v_mts_session_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - // Test Body httpPort.send( m_http_request( m_http_request_put( - PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, v_headers, m_http_message_body_json( m_body_json_mts_session_info( - m_mts_session_info( + m_mts_session_info( // MEC015 Clause 7.2.5 Type: MtsSessionInfo Table 7.2.5-1: Elements of MtsSessionInfo, flowFilter shall be omit PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type + FLOW_SPECIFIC_MTS_SESSION, // Request type m_qosd_1, // QoS LowCost, // MtsMode Downlink // TrafficDirection )))))); + + // Test Body tc_ac.start; alt { [] httpPort.receive( @@ -684,8 +999,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - f_delete_mts_session_info_resource(v_app_instance_id, v_mts_session_id); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -695,22 +1009,20 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC015_SRV_MTS_005_BR /** - * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ testcase TC_MEC_MEC015_SRV_MTS_005_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("003")); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -728,13 +1040,13 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - PX_ME_MTS_SESSIONS_URI & "/InvalidAllocationId", + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/PX_UNKNOWN_APP_INSTANCE_ID", v_headers, m_http_message_body_json( m_body_json_mts_session_info( m_mts_session_info( PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type + APPLICATION_SPECIFIC_MTS_SESSION, // Request type m_qosd_1, // QoS LowCost, // MtsMode Downlink // TrafficDirection @@ -751,7 +1063,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -766,19 +1078,16 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { /** * @desc Check that the IUT deregisters a MTS session when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml */ testcase TC_MEC_MEC015_SRV_MTS_006_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring v_mts_session_id; var MtsSessionInfo v_mts_session_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("005")); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -789,29 +1098,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); - f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info); - if (v_mts_session_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - // Test Body httpPort.send( m_http_request( m_http_request_delete( - PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, v_headers - ) - ) - ); + ))); + + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***"); @@ -828,20 +1130,17 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of testcase TC_MEC_MEC015_SRV_MTS_006_OK /** - * @desc Check that the IUT responds with an error when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application */ - testcase TC_MEC_MEC015_SRV_MTS_006_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_MTS_006_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring v_mts_session_id; var MtsSessionInfo v_mts_session_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("005")); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -852,92 +1151,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); - f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info); - if (v_mts_session_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - // Test Body httpPort.send( m_http_request( m_http_request_delete( - PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & PX_UNKNOWN_APP_INSTANCE_ID, v_headers - ) - ) - ); - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_MTS_006_BR - - /** - * @desc Check that the IUT deregisters a MTS session when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_MTS_006_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var charstring v_mts_session_id; - var MtsSessionInfo v_mts_session_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("005")); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info); - if (v_mts_session_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } + ))); // Test Body - httpPort.send( - m_http_request( - m_http_request_delete( - PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, - v_headers - ) - ) - ); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***"); @@ -950,6 +1179,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC015_SRV_MTS_006_NF diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn index df71fa7..842fd6f 100644 --- a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn @@ -41,6 +41,31 @@ module AtsMec_TrafficManagementAPI_TestControl { execute(TC_MEC_MEC015_SRV_TM_006_OK()); execute(TC_MEC_MEC015_SRV_TM_006_NF()); } + if (PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED) { + execute(TC_MEC_MEC015_SRV_MTS_001_OK()); + + execute(TC_MEC_MEC015_SRV_MTS_002_OK_01()); + execute(TC_MEC_MEC015_SRV_MTS_002_OK_02()); + execute(TC_MEC_MEC015_SRV_MTS_002_OK_03()); + execute(TC_MEC_MEC015_SRV_MTS_002_OK_04()); + execute(TC_MEC_MEC015_SRV_MTS_002_BR()); + execute(TC_MEC_MEC015_SRV_MTS_002_NF()); + + execute(TC_MEC_MEC015_SRV_MTS_003_OK_01()); + execute(TC_MEC_MEC015_SRV_MTS_003_OK_02()); + execute(TC_MEC_MEC015_SRV_MTS_003_BR()); + + execute(TC_MEC_MEC015_SRV_MTS_004_OK()); + execute(TC_MEC_MEC015_SRV_MTS_004_BR()); + execute(TC_MEC_MEC015_SRV_MTS_004_NF()); + + execute(TC_MEC_MEC015_SRV_MTS_005_OK()); + execute(TC_MEC_MEC015_SRV_MTS_005_BR()); + execute(TC_MEC_MEC015_SRV_MTS_005_NF()); + + execute(TC_MEC_MEC015_SRV_MTS_006_OK()); + execute(TC_MEC_MEC015_SRV_MTS_006_NF()); + } } // End of 'control' statement } // End of module AtsMec_TrafficManagementAPI_TestControl diff --git a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn index ee7c702..8561c3f 100644 --- a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn +++ b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn @@ -12,6 +12,7 @@ module AtsMec_V2XInformationServiceAPI_TestControl { control { if (PICS_MEC_PLAT and PICS_SERVICES) { + execute(TC_MEC_MEC030_SRV_V2X_001_OK_01()); } } // End of 'control' statement diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn index 63f2cf7..c678558 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn @@ -119,13 +119,13 @@ module TrafficManagementAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PX_ME_MTS_SESSIONS_URI, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI, v_headers, m_http_message_body_json( m_body_json_mts_session_info( m_mts_session_info( PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type + APPLICATION_SPECIFIC_MTS_SESSION, // Request type m_qosd, // QoS LowCost, // MtsMode Downlink // TrafficDirection @@ -158,16 +158,16 @@ module TrafficManagementAPI_Functions { } // End of function f_create_mts_session_info_resource function f_delete_mts_session_info_resource( - in Json.String p_app_instance_id, - in charstring p_mts_session_id - ) runs on HttpComponent { + in Json.String p_app_instance_id, + in charstring p_mts_session_id + ) runs on HttpComponent { var Headers v_headers; f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PX_ME_MTS_SESSIONS_URI & "/" & p_mts_session_id, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & p_mts_session_id, v_headers ))); tc_ac.start; diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn index fa8cf88..7250495 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn @@ -5,4 +5,9 @@ module TrafficManagementAPI_Pics { */ modulepar boolean PICS_BWMANAGEMENT_API_SUPPORTED := true; + /** + * @desc Does the IUT support Multi-access Traffic Steering API? + */ + modulepar boolean PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED := true; + } // End of module TrafficManagementAPI_Pics diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn index 2b915be..02851fd 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn @@ -13,6 +13,8 @@ module TrafficManagementAPI_Pixits { modulepar Json.String PX_APP_INSTANCE_ID := "appInst01"; + modulepar Json.String PX_APP_INSTANCE_ID_2 := "appInst02"; + modulepar Json.String PX_APP_ALLOCATION_ID := "appAllocationId01"; modulepar Json.String PX_APP_NAME := "appName01"; diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn index 8ce3821..52fde89 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn @@ -80,8 +80,8 @@ module TrafficManagementAPI_TypesAndValues { * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo */ type enumerated MtsRequestType { - APPLICATION_SPECIFIC_MTS_ALLOCATION (0), - SESSION_SPECIFIC_MTS_ALLOCATION (1) + APPLICATION_SPECIFIC_MTS_SESSION (0), + FLOW_SPECIFIC_MTS_SESSION (1) } with { variant "JSON: as number" } diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index 397652b..539f67d 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -24,7 +24,7 @@ module LibMec_Pixits { modulepar charstring PX_ME_BWM_URI := "bwm/v1/bw_allocations"; - modulepar charstring PX_ME_MTS_INFO_URI := "mts/v1/mts_info"; + modulepar charstring PX_ME_MTS_INFO_URI := "mts/v1/mts_capability_info"; modulepar charstring PX_ME_MTS_SESSIONS_URI := "mts/v1/mts_sessions"; -- GitLab From 0ea0cc0877395198c27077595eb6bf71f4b47b69 Mon Sep 17 00:00:00 2001 From: garciay Date: Fri, 12 Jan 2024 15:06:22 +0100 Subject: [PATCH 48/58] TTF T027: Start review MEC-030 --- ...ec_V2XInformationServiceAPI_TestCases.ttcn | 4962 +++++++++-------- ..._V2XInformationServiceAPI_TestControl.ttcn | 54 + .../V2XInformationServiceAPI_Functions.ttcn | 194 +- .../ttcn/V2XInformationServiceAPI_Pixits.ttcn | 10 + .../V2XInformationServiceAPI_Templates.ttcn | 110 + ...XInformationServiceAPI_TypesAndValues.ttcn | 4 +- ttcn/LibMec/ttcn/LibMec_Pixits.ttcn | 6 +- .../ttcn/LibHttp_JsonMessageBodyTypes.ttcn | 2 + .../ttcn/LibHttp_JsonTemplates.ttcn | 24 + 9 files changed, 3053 insertions(+), 2313 deletions(-) diff --git a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn index 75e8df8..7dc6bc0 100644 --- a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn +++ b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn @@ -43,2316 +43,1292 @@ module AtsMec_V2XInformationServiceAPI_TestCases { /** * @desc Check that the IUT responds with a configured provisioning information over Uu unicast when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ testcase TC_MEC_MEC030_SRV_V2X_001_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?location_info=" & PX_V2X_ECGI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_uu_unicast_provisioning_info( + mw_uu_unicast_provisioning_info + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuUnicastProvisioningInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?location_info=" & PX_V2X_ECGI, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_uu_unicast_provisioning_info( - mw_uu_unicast_provisioning_info - ))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuUnicastProvisioningInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_001_OK_01 /** * @desc Check that the IUT responds with a configured provisioning information over Uu unicast when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ testcase TC_MEC_MEC030_SRV_V2X_001_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?location_info=" & PX_V2X_LATITUDE, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_uu_unicast_provisioning_info( + mw_uu_unicast_provisioning_info + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuUnicastProvisioningInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?location_info=" & PX_V2X_LATITUDE, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_uu_unicast_provisioning_info( - mw_uu_unicast_provisioning_info - ))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuUnicastProvisioningInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_001_OK_02 /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ testcase TC_MEC_MEC030_SRV_V2X_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/invalid_uu_unicast_provisioning_info?location_info=" & PX_V2X_LATITUDE, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/invalid_uu_unicast_provisioning_info?location_info=" & PX_V2X_LATITUDE, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_001_BR /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ testcase TC_MEC_MEC030_SRV_V2X_001_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?location_info=" & PX_V2X_UNKNOWN_ECGI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?location_info=" & PX_V2X_UNKNOWN_ECGI, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_001_NF /** - * @desc Check that the IUT responds with a configured provisioning information over Uu mbms when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with a configured provisioning information over Uu MBMS when queried by a MEC Application */ testcase TC_MEC_MEC030_SRV_V2X_002_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?location_info=" & PX_V2X_ECGI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_uu_mbms_provisioning_info( + mw_uu_mbms_provisioning_info + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuMbmsProvisioningInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?location_info=" & PX_V2X_ECGI, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_uu_mbms_provisioning_info( - mw_uu_mbms_provisioning_info - ))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuMbmsProvisioningInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_002_OK_01 /** - * @desc Check that the IUT responds with a configured provisioning information over Uu mbms when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with a configured provisioning information over Uu MBMS when queried by a MEC Application */ testcase TC_MEC_MEC030_SRV_V2X_002_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?location_info=" & PX_V2X_LATITUDE, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_uu_mbms_provisioning_info( + mw_uu_mbms_provisioning_info + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuMbmsProvisioningInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?location_info=" & PX_V2X_LATITUDE, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_uu_mbms_provisioning_info( - mw_uu_mbms_provisioning_info - ))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuMbmsProvisioningInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_002_OK_02 + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_002_OK_02 /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ testcase TC_MEC_MEC030_SRV_V2X_002_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/invalid_uu_mbms_provisioning_info?location_info=" & PX_V2X_LATITUDE, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/invalid_uu_mbms_provisioning_info?location_info=" & PX_V2X_LATITUDE, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_002_BR /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ testcase TC_MEC_MEC030_SRV_V2X_002_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?location_info=" & PX_V2X_UNKNOWN_ECGI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?location_info=" & PX_V2X_UNKNOWN_ECGI, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_002_NF /** * @desc Check that the IUT responds with a configured provisioning information over PC5 when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ testcase TC_MEC_MEC030_SRV_V2X_003_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=" & PX_V2X_ECGI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_pc5_provisioning_info( + mw_pc5_provisioning_info + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Pc5ProvisioningInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=" & PX_V2X_ECGI, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_pc5_provisioning_info( - mw_pc5_provisioning_info - ))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a Pc5ProvisioningInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_003_OK_01 /** * @desc Check that the IUT responds with a configured provisioning information over PC5 when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ testcase TC_MEC_MEC030_SRV_V2X_003_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=" & PX_V2X_LATITUDE, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_pc5_provisioning_info( + mw_pc5_provisioning_info + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Pc5ProvisioningInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=" & PX_V2X_LATITUDE, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_pc5_provisioning_info( - mw_pc5_provisioning_info - ))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a Pc5ProvisioningInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_003_OK_02 /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ testcase TC_MEC_MEC030_SRV_V2X_003_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/invalid_pc5_provisioning_info?location_info=" & PX_V2X_LATITUDE, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/invalid_pc5_provisioning_info?location_info=" & PX_V2X_LATITUDE, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_003_BR /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ testcase TC_MEC_MEC030_SRV_V2X_003_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=" & PX_V2X_UNKNOWN_ECGI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=" & PX_V2X_UNKNOWN_ECGI, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_003_NF + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_003_NF /** - * @desc Check that the IUT sends a request about QoS information for a vehicular UE when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT processes properly a request to information of V2X Message Distribution servers */ testcase TC_MEC_MEC030_SRV_V2X_004_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI & "/provide_v2x_msg_distribution_server_info", + v_headers, + m_http_message_body_json( + m_body_json_v2x_msg_distribution_server_info( + m_v2x_msg_distribution_server_info( + m_v2x_msg_distribution_server( + m_info_protocol + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_v2x_msg_distribution_server_info( + mw_v2x_msg_distribution_server_info( + mw_v2x_msg_distribution_server( + mw_info_protocol, + mw_info_connection + ))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct connection information ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/provide_predicted_qos", - v_headers, - m_http_message_body_json( - m_body_json_v2x_predicted_qos( - m_predicted_qos( - -, - PX_LOC_GRANULARITY, - m_qos( - { - m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), // FIXME To be refined - m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), - m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }) - } - )/*, - { - m_predicted_qos_routes( - { - m_route_info( - m_location_info( - m_ecgi( - PX_CELL_ID, - m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area(43.72, 10.41) - ), - -, - 128, - 128 - ), - m_route_info( - m_location_info( - m_ecgi( - PX_CELL_ID, - m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area(43.75, 10.5) - ), - -, - 128, - 128 - ) - } - ) - }*/ - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_v2x_predicted_qos( - mw_predicted_qos( - -, - PX_LOC_GRANULARITY - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a PredictedQos ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_004_OK /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT processes properly a request to information of V2X Message Distribution servers */ testcase TC_MEC_MEC030_SRV_V2X_004_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI & "/provide_v2x_msg_distribution_server_info", + v_headers, + m_http_message_body_json( + m_body_json_v2x_msg_distribution_server_info( + m_v2x_msg_distribution_server_info( + m_v2x_msg_distribution_server( + m_info_protocol, + m_info_connection( // Wrong field value: Shall only be included in the response + PX_V2X_MSG_DISTRIBUTION_SERVER_IP_ADDRESS, + PX_V2X_MSG_DISTRIBUTION_SERVER_PORT + )))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/provide_predicted_qos", - v_headers, - m_http_message_body_json( - m_body_json_v2x_predicted_qos( - m_predicted_qos( - -, - PX_LOC_GRANULARITY & "InvalidSemantic", - m_qos( - { - m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), // FIXME To be refined - m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), - m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }) - } - )/*, - { - m_predicted_qos_routes( - { - m_route_info( - m_location_info( - m_ecgi( - PX_CELL_ID, - m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area(43.72, 10.41) - ), - -, - 128, - 128 - ), - m_route_info( - m_location_info( - m_ecgi( - PX_CELL_ID, - m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area(43.75, 10.5) - ), - -, - 128, - 128 - ) - } - ) - }*/ - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_004_BR /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT processes properly a request to information of V2X Message Distribution servers */ testcase TC_MEC_MEC030_SRV_V2X_004_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI & "/provide_v2x_msg_distribution_server_info", + v_headers, + m_http_message_body_json( + m_body_json_v2x_msg_distribution_server_info( + m_v2x_msg_distribution_server_info( + m_v2x_msg_distribution_server( + m_info_protocol(MQTT_SN) + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/provide_predicted_qos", - v_headers, - m_http_message_body_json( - m_body_json_v2x_predicted_qos( - m_predicted_qos( - -, - PX_LOC_GRANULARITY, - m_qos( - { - m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), // FIXME To be refined - m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), - m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }) - } - )/*, - { - m_predicted_qos_routes( - { - m_route_info( - m_location_info( - m_ecgi( - PX_UNKNOWN_CELL_ID, - m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area(43.72, 10.41) - ), - -, - 128, - 128 - ), - m_route_info( - m_location_info( - m_ecgi( - PX_CELL_ID, - m_plmn(PX_UNKNOWN_MCC, PX_UNKNOWN_MNC) - ), - m_location_info_geo_area(43.75, 10.5) - ), - -, - 128, - 128 - ) - } - ) - }*/ - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_004_NF /** - * @desc Check that the IUT processes properly a request to publish a V2X message - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT sends a request about QoS information for a vehicular UE when queried by a MEC Application */ testcase TC_MEC_MEC030_SRV_V2X_005_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI & "/provide_predicted_qos", + v_headers, + m_http_message_body_json( + m_body_json_v2x_predicted_qos( + m_predicted_qos( + -, + PX_LOC_GRANULARITY, + m_qos( + { + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), // FIXME To be refined + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }) + } + )/*, + { + m_predicted_qos_routes( + { + m_route_info( + m_location_info( + m_ecgi( + PX_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.72, 10.41) + ), + -, + 128, + 128 + ), + m_route_info( + m_location_info( + m_ecgi( + PX_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.75, 10.5) + ), + -, + 128, + 128 + ) + } + ) + }*/ + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_v2x_predicted_qos( + mw_predicted_qos( + -, + PX_LOC_GRANULARITY + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a PredictedQos ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/publish_v2x_message", - v_headers, - m_http_message_body_json( - m_body_json_v2x_message( - m_v2x_message( - m_v2x_msg_properties_values( - -, -, -, - m_location_info( - m_ecgi( - PX_CELL_ID, - m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area(43.72, 10.41) - )))))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with correct status ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_005_OK /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ testcase TC_MEC_MEC030_SRV_V2X_005_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI & "/provide_predicted_qos", + v_headers, + m_http_message_body_json( + m_body_json_v2x_predicted_qos( + m_predicted_qos( + -, + PX_LOC_GRANULARITY & "InvalidSemantic", + m_qos( + { + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), // FIXME To be refined + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }) + } + )/*, + { + m_predicted_qos_routes( + { + m_route_info( + m_location_info( + m_ecgi( + PX_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.72, 10.41) + ), + -, + 128, + 128 + ), + m_route_info( + m_location_info( + m_ecgi( + PX_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.75, 10.5) + ), + -, + 128, + 128 + ) + } + ) + }*/ + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/publish_v2x_message", - v_headers, - m_http_message_body_json( - m_body_json_v2x_message( - m_v2x_message( - m_v2x_msg_properties_values( - -, -, -, - m_location_info( - m_ecgi( - PX_CELL_ID, - m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area(43.72, 10.41) - )), - "UnknownEncodeFormat" - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_005_BR /** - * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TC_MEC_MEC030_SRV_V2X_006_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + testcase TC_MEC_MEC030_SRV_V2X_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI & "/provide_predicted_qos", + v_headers, + m_http_message_body_json( + m_body_json_v2x_predicted_qos( + m_predicted_qos( + -, + PX_LOC_GRANULARITY, + m_qos( + { + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), // FIXME To be refined + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }) + } + )/*, + { + m_predicted_qos_routes( + { + m_route_info( + m_location_info( + m_ecgi( + PX_UNKNOWN_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.72, 10.41) + ), + -, + 128, + 128 + ), + m_route_info( + m_location_info( + m_ecgi( + PX_CELL_ID, + m_plmn(PX_UNKNOWN_MCC, PX_UNKNOWN_MNC) + ), + m_location_info_geo_area(43.75, 10.5) + ), + -, + 128, + 128 + ) + } + ) + }*/ + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_uu_uni", - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_v2x_subscription_link_list - )))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_006_OK_01 - - /** - * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_006_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_uu_mbms", - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_v2x_subscription_link_list - )))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_006_OK_02 + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_005_NF /** - * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT processes properly a request to publish a V2X message */ - testcase TC_MEC_MEC030_SRV_V2X_006_OK_03() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + testcase TC_MEC_MEC030_SRV_V2X_006_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI & "/publish_v2x_message", + v_headers, + m_http_message_body_json( + m_body_json_v2x_message( + m_v2x_message( + m_v2x_msg_properties_values( + -, -, -, + m_location_info( + m_ecgi( + PX_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.72, 10.41) // FIXME Use PIXITs + )))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct status code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_pc5", - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_v2x_subscription_link_list - )))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_006_OK_03 - - /** - * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_006_OK_04() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/v2x_msg", - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_v2x_subscription_link_list - )))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_006_OK_04 + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_006_OK /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ testcase TC_MEC_MEC030_SRV_V2X_006_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI & "/publish_v2x_message", + v_headers, + m_http_message_body_json( + m_body_json_v2x_message( + m_v2x_message( + m_v2x_msg_properties_values( + -, -, -, + m_location_info( + m_ecgi( + PX_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.72, 10.41) + )), + "UnknownEncodeFormat" + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/_prov_chg_uu_uni_", // Invalid subscription type - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLink ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_006_BR /** - * @desc Check that the IUT responds with the requested to create a subscription - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - prov_chg_uu_uni */ testcase TC_MEC_MEC030_SRV_V2X_007_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "?subscription_type=prov_chg_uu_uni", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_v2x_subscription_link_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_uu_uni", - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_uu_uni_subscription( - m_prov_chg_uu_uni_subscription( - m_prov_chg_uu_uni_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.72, - 10.41 - )), - m_v2x_application_server( - oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), - oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) - )), - PX_PROV_UU_UNI_SUB_CALLBACK - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_prov_chg_uu_uni_subscription( - mw_prov_chg_uu_uni_subscription( - -, - PX_PROV_UU_UNI_SUB_CALLBACK, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_01 - - /** - * @desc Check that the IUT responds with the requested to create a subscription - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_007_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_uu_mbms", - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_uu_mbms_subscription( - m_prov_chg_uu_mbms_subscription( - m_prov_chg_uu_mbms_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.72, - 10.41 - )), - m_v2x_server_usd( - { PX_V2X_MBMS_SERVICE_ID }, - m_sdp_info( - PX_V2X_MC_SERVER, - PX_V2X_MC_PORT - ), - m_tmgi( - PX_V2X_SERVICE_AREA_ID, - PX_MCC, - PX_MNC - ))), - PX_PROV_UU_MBMS_SUB_CALLBACK - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_prov_chg_uu_mbms_subscription( - mw_prov_chg_uu_mbms_subscription( - -, - PX_PROV_UU_MBMS_SUB_CALLBACK, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_02 - - /** - * @desc Check that the IUT responds with the requested to create a subscription - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_007_OK_03() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_pc5", - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_pc5_subscription( - m_prov_chg_pc5_subscription( - m_filter_criteria( - PX_V2X_DST_LAYER_2_ID, - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.72, - 10.41 - ))), - PX_PROV_PC5_SUB_CALLBACK - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_prov_chg_pc5_subscription( - mw_prov_chg_pc5_subscription( - -, - PX_PROV_PC5_SUB_CALLBACK, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_03 - - /** - * @desc Check that the IUT responds with the requested to create a subscription - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_007_OK_04() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/V2xMsgSubscription", - v_headers, - m_http_message_body_json( - m_body_json_v2x_msg_subscription( - m_v2x_msg_subscription( - m_v2x_msg_subscription_filter_criteria, - PX_PROV_V2X_SUB_CALLBACK - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_v2x_msg_subscription( - mw_v2x_msg_subscription( - -, - PX_PROV_V2X_SUB_CALLBACK, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_04 - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_007_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_uu_uni", - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_uu_uni_subscription( - m_prov_chg_uu_uni_subscription_invalid( - m_prov_chg_uu_uni_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.72, - 10.41 - )), - m_v2x_application_server( - oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), - oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) - )), - PX_PROV_UU_UNI_SUB_CALLBACK - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_007_BR - - /** - * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_008_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_uni_subscription.links.self_.href, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_prov_chg_uu_uni_subscription( - mw_prov_chg_uu_uni_subscription( - -, - PX_PROV_UU_UNI_SUB_CALLBACK, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_delete_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_01 - - /** - * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_008_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgUuMbmsSubscription v_prov_chg_uu_mbms_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_mbms_subscription.links.self_.href, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_prov_chg_uu_mbms_subscription( - mw_prov_chg_uu_mbms_subscription( - -, - PX_PROV_UU_MBMS_SUB_CALLBACK, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_delete_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_02 - - /** - * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_008_OK_03() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgPc5Subscription v_prov_chg_pc5_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_pc5_subscription(v_prov_chg_pc5_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_pc5_subscription.links.self_.href, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_prov_chg_pc5_subscription( - mw_prov_chg_pc5_subscription( - -, - PX_PROV_PC5_SUB_CALLBACK, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_delete_prov_pc5_subscription(v_prov_chg_pc5_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_03 - - /** - * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_008_OK_04() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var V2xMsgSubscription v_v2x_msg_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_v2x_msg_subscription(v_v2x_msg_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_v2x_msg_subscription.links.self_.href, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_v2x_msg_subscription( - mw_v2x_msg_subscription( - -, - PX_PROV_V2X_SUB_CALLBACK, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_delete_v2x_msg_subscription(v_v2x_msg_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_04 - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_008_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var V2xMsgSubscription v_v2x_msg_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_v2x_msg_subscription(v_v2x_msg_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_v2x_msg_subscription.links.self_.href, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_delete_v2x_msg_subscription(v_v2x_msg_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_008_BR - - /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_008_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/invalid_links", - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_008_NF - - /** - * @desc Check that the IUT responds with the request of updating subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_009_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_uni_subscription.links.self_.href, - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_uu_uni_subscription( - m_prov_chg_uu_uni_subscription( - m_prov_chg_uu_uni_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.77, - 10.46 - )), - m_v2x_application_server( - oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), - oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) - )), - PX_PROV_UU_UNI_SUB_CALLBACK, - v_prov_chg_uu_uni_subscription.links - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_prov_chg_uu_uni_subscription( - mw_prov_chg_uu_uni_subscription( - -, - PX_PROV_UU_UNI_SUB_CALLBACK, - v_prov_chg_uu_uni_subscription.links - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_delete_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_01 - - /** - * @desc Check that the IUT responds with the request of updating subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_009_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgUuMbmsSubscription v_prov_chg_uu_mbms_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_mbms_subscription.links.self_.href, - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_uu_mbms_subscription( - m_prov_chg_uu_mbms_subscription( - m_prov_chg_uu_mbms_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.77, - 10.46 - )), - m_v2x_server_usd( - { PX_V2X_MBMS_SERVICE_ID }, - m_sdp_info( - PX_V2X_MC_SERVER, - PX_V2X_MC_PORT - ), - m_tmgi( - PX_V2X_SERVICE_AREA_ID, - PX_MCC, - PX_MNC - ))), - PX_PROV_UU_MBMS_SUB_CALLBACK, - v_prov_chg_uu_mbms_subscription.links -)))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_prov_chg_uu_mbms_subscription( - mw_prov_chg_uu_mbms_subscription( - -, - PX_PROV_UU_MBMS_SUB_CALLBACK, - v_prov_chg_uu_mbms_subscription.links - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_delete_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_02 + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_uni_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_01 /** - * @desc Check that the IUT responds with the request of updating subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - prov_chg_uu_mbms */ - testcase TC_MEC_MEC030_SRV_V2X_009_OK_03() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC030_SRV_V2X_007_OK_02() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; - var ProvChgPc5Subscription v_prov_chg_pc5_subscription; + var ProvChgUuMbmsSubscription v_prov_chg_uu_mbms_subscription; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration @@ -2361,29 +1337,14 @@ module AtsMec_V2XInformationServiceAPI_TestCases { // Test adapter configuration // Preamble - f_create_prov_pc5_subscription(v_prov_chg_pc5_subscription); + f_create_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_pc5_subscription.links.self_.href, - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_pc5_subscription( - m_prov_chg_pc5_subscription( - m_filter_criteria( - PX_V2X_DST_LAYER_2_ID, - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.77, - 10.46 - ))), - PX_PROV_PC5_SUB_CALLBACK, - v_prov_chg_pc5_subscription.links - )))))); + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "?subscription_type=prov_chg_uu_mbms", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2393,15 +1354,11 @@ module AtsMec_V2XInformationServiceAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_prov_chg_pc5_subscription( - mw_prov_chg_pc5_subscription( - -, - PX_PROV_PC5_SUB_CALLBACK, - v_prov_chg_pc5_subscription.links - )))))) { + mw_body_json_v2x_subscription_link_list + )))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2411,85 +1368,1540 @@ module AtsMec_V2XInformationServiceAPI_TestCases { } // End of 'alt' statement // postamble - f_delete_prov_pc5_subscription(v_prov_chg_pc5_subscription); + f_delete_prov_uu_mbms_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_03 + } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_02 /** - * @desc Check that the IUT responds with the request of updating subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - prov_chg_pc5 */ - testcase TC_MEC_MEC030_SRV_V2X_009_OK_04() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var V2xMsgSubscription v_v2x_msg_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + testcase TC_MEC_MEC030_SRV_V2X_007_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ProvChgPc5Subscription v_prov_chg_pc5_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_pc5_subscription(v_prov_chg_pc5_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "?subscription_type=prov_chg_pc5", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_v2x_subscription_link_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_v2x_msg_subscription(v_v2x_msg_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_v2x_msg_subscription.links.self_.href, - v_headers, - m_http_message_body_json( - m_body_json_v2x_msg_subscription( - m_v2x_msg_subscription( - m_v2x_msg_subscription_filter_criteria, - PX_PROV_V2X_SUB_CALLBACK, - v_v2x_msg_subscription.links - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_pc5_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_03 - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_v2x_msg_subscription( - mw_v2x_msg_subscription( - -, - PX_PROV_V2X_SUB_CALLBACK, - v_v2x_msg_subscription.links - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + /** + * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - v2x_msg + */ + testcase TC_MEC_MEC030_SRV_V2X_007_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var V2xMsgSubscription v_v2x_msg_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_v2x_msg_subscription(v_v2x_msg_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "?subscription_type=v2x_msg", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_v2x_subscription_link_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_v2x_msg_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_04 + + /** + * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - pred_qos + */ + testcase TC_MEC_MEC030_SRV_V2X_007_OK_05() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var PredQosSubscription v_pred_qos; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_pred_qos_subscription(v_pred_qos, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "?subscription_type=pred_qos", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_v2x_subscription_link_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_pred_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_05 + + /** + * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_007_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/_prov_chg_uu_uni_", // Invalid subscription type + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLink ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_007_BR + + /** + * @desc Check that the IUT responds with the requested to create a subscription - ProvChgUuUniSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_008_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_filter_criteria( + m_location_info( + m_ecgi( + PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + )), + m_v2x_application_server( + oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), + oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) + )), + PX_PROV_UU_UNI_SUB_CALLBACK + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_prov_chg_uu_uni_subscription( + mw_prov_chg_uu_uni_subscription( + -, + PX_PROV_UU_UNI_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_ME_V2X_URI_SUB & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a provChgUuUniSubscription, SubscriptionId: ", v_subscription_id," ***"); } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_uni_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_01 + + /** + * @desc Check that the IUT responds with the requested to create a subscription - ProvChgUuMbmsSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_008_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_mbms_subscription( + m_prov_chg_uu_mbms_subscription( + m_prov_chg_uu_mbms_filter_criteria( + m_location_info( + m_ecgi( + PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + )), + m_v2x_server_usd( + { PX_V2X_MBMS_SERVICE_ID }, + m_sdp_info( + PX_V2X_MC_SERVER, + PX_V2X_MC_PORT + ), + m_tmgi( + PX_V2X_SERVICE_AREA_ID, + PX_MCC, + PX_MNC + ))), + PX_PROV_UU_MBMS_SUB_CALLBACK + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_prov_chg_uu_mbms_subscription( + mw_prov_chg_uu_mbms_subscription( + -, + PX_PROV_UU_MBMS_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_ME_V2X_URI_SUB & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a provChgUuMbmsSubscription, SubscriptionId: ", v_subscription_id," ***"); } - } // End of 'alt' statement - - // postamble - f_delete_v2x_msg_subscription(v_v2x_msg_subscription); - f_cf_01_http_down(); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_mbms_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_02 + + /** + * @desc Check that the IUT responds with the requested to create a subscription - + */ + testcase TC_MEC_MEC030_SRV_V2X_008_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configurationProvChgPc5Subscription + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_pc5_subscription( + m_prov_chg_pc5_subscription( + m_filter_criteria( + PX_V2X_DST_LAYER_2_ID, + m_location_info( + m_ecgi( + PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + ))), + PX_PROV_PC5_SUB_CALLBACK + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_prov_chg_pc5_subscription( + mw_prov_chg_pc5_subscription( + -, + PX_PROV_PC5_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_ME_V2X_URI_SUB & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a provChgPc5Subscription, SubscriptionId: ", v_subscription_id," ***"); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_pc5_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_0078_OK_03 + + /** + * @desc Check that the IUT responds with the requested to create a subscription - V2xMsgSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_008_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_v2x_msg_subscription( + m_v2x_msg_subscription( + m_v2x_msg_subscription_filter_criteria, + PX_PROV_V2X_SUB_CALLBACK + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_v2x_msg_subscription( + mw_v2x_msg_subscription( + -, + PX_PROV_V2X_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_ME_V2X_URI_SUB & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a v2xMsgSubscription, SubscriptionId: ", v_subscription_id," ***"); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_v2x_msg_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_04 + + /** + * @desc Check that the IUT responds with the requested to create a subscription - PredQosSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_008_OK_05() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_pred_qos_subscription( + m_pred_qos_subscription( + m_qos_pred_filter_criteria, + PX_PRED_QOS_SUB_CALLBACK + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_pred_qos_subscription( + mw_pred_qos_subscription( + -, + PX_PRED_QOS_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_ME_V2X_URI_SUB & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a predQosSubscription, SubscriptionId: ", v_subscription_id," ***"); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_pred_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_05 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_008_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_subscription_invalid( + m_prov_chg_uu_uni_filter_criteria( + m_location_info( + m_ecgi( + PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + )), + m_v2x_application_server( + oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), + oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) + )), + PX_PROV_UU_UNI_SUB_CALLBACK + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_008_BR + + /** + * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - ProvChgUuUniSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_009_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_prov_chg_uu_uni_subscription( + mw_prov_chg_uu_uni_subscription( + -, + PX_PROV_UU_UNI_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully retrieves the provChgUuUniSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_uni_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_01 + + /** + * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - ProvChgUuMbmsSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_009_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgUuMbmsSubscription v_prov_chg_uu_mbms_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_prov_chg_uu_mbms_subscription( + mw_prov_chg_uu_mbms_subscription( + -, + PX_PROV_UU_MBMS_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully retrives the provChgUuMbmsSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_mbms_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_02 + + /** + * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - ProvChgPc5Subscription + */ + testcase TC_MEC_MEC030_SRV_V2X_009_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgPc5Subscription v_prov_chg_pc5_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_pc5_subscription(v_prov_chg_pc5_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_prov_chg_pc5_subscription( + mw_prov_chg_pc5_subscription( + -, + PX_PROV_PC5_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully retrives the provChgPc5Subscriptions ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_pc5_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_03 + + /** + * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - V2xMsgSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_009_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var V2xMsgSubscription v_v2x_msg_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_v2x_msg_subscription(v_v2x_msg_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_v2x_msg_subscription( + mw_v2x_msg_subscription( + -, + PX_PROV_V2X_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully retrieves the v2xMsgSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_v2x_msg_subscription(v_subscription_id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_04 + /** + * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - PredQosSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_009_OK_05() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var PredQosSubscription v_pred_qos_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_pred_qos_subscription(v_pred_qos_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_pred_qos_subscription( + mw_pred_qos_subscription( + -, + PX_PRED_QOS_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully retrieves the predQosSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_pred_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_05 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_009_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var V2xMsgSubscription v_v2x_msg_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_v2x_msg_subscription(v_v2x_msg_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & "/vis/v2/subs/" & v_subscription_id, // Wrong URL + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_v2x_msg_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_009_BR + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_009_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var V2xMsgSubscription v_v2x_msg_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_v2x_msg_subscription(v_v2x_msg_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_v2x_msg_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_009_NF + + /** + * @desc Check that the IUT responds with the requested of updating subscription when queried by a MEC Application - ProvChgUuUniSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_010_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_filter_criteria( + m_location_info( + m_ecgi( + PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.77, + 10.46 + )), + m_v2x_application_server( + oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), + oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) + )), + PX_PROV_UU_UNI_SUB_CALLBACK, + v_prov_chg_uu_uni_subscription.links + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_prov_chg_uu_uni_subscription( + mw_prov_chg_uu_uni_subscription( + -, + PX_PROV_UU_UNI_SUB_CALLBACK, + v_prov_chg_uu_uni_subscription.links + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_uni_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_01 + + /** + * @desc Check that the IUT responds with the requested of updating subscription when queried by a MEC Application - ProvChgUuMbmsSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_010_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgUuMbmsSubscription v_prov_chg_uu_mbms_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_mbms_subscription( + m_prov_chg_uu_mbms_subscription( + m_prov_chg_uu_mbms_filter_criteria( + m_location_info( + m_ecgi( + PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.77, + 10.46 + )), + m_v2x_server_usd( + { PX_V2X_MBMS_SERVICE_ID }, + m_sdp_info( + PX_V2X_MC_SERVER, + PX_V2X_MC_PORT + ), + m_tmgi( + PX_V2X_SERVICE_AREA_ID, + PX_MCC, + PX_MNC + ))), + PX_PROV_UU_MBMS_SUB_CALLBACK, + v_prov_chg_uu_mbms_subscription.links + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_prov_chg_uu_mbms_subscription( + mw_prov_chg_uu_mbms_subscription( + -, + PX_PROV_UU_MBMS_SUB_CALLBACK, + v_prov_chg_uu_mbms_subscription.links + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_mbms_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_02 + + /** + * @desc Check that the IUT responds with the requested of updating subscription when queried by a MEC Application - ProvChgPc5Subscription + */ + testcase TC_MEC_MEC030_SRV_V2X_010_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgPc5Subscription v_prov_chg_pc5_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_pc5_subscription(v_prov_chg_pc5_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_pc5_subscription( + m_prov_chg_pc5_subscription( + m_filter_criteria( + PX_V2X_DST_LAYER_2_ID, + m_location_info( + m_ecgi( + PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.77, + 10.46 + ))), + PX_PROV_PC5_SUB_CALLBACK, + v_prov_chg_pc5_subscription.links + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_prov_chg_pc5_subscription( + mw_prov_chg_pc5_subscription( + -, + PX_PROV_PC5_SUB_CALLBACK, + v_prov_chg_pc5_subscription.links + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_pc5_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_03 + + /** + * @desc Check that the IUT responds with the requested of updating subscription when queried by a MEC Application - V2xMsgSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_010_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var V2xMsgSubscription v_v2x_msg_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_v2x_msg_subscription(v_v2x_msg_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_v2x_msg_subscription( + m_v2x_msg_subscription( + m_v2x_msg_subscription_filter_criteria, + PX_PROV_V2X_SUB_CALLBACK, + v_v2x_msg_subscription.links + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_v2x_msg_subscription( + mw_v2x_msg_subscription( + -, + PX_PROV_V2X_SUB_CALLBACK, + v_v2x_msg_subscription.links + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_v2x_msg_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_04 + + /** + * @desc Check that the IUT responds with the requested of updating subscription when queried by a MEC Application - PredQosSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_010_OK_05() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var PredQosSubscription v_pred_qos_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_pred_qos_subscription(v_pred_qos_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_pred_qos_subscription( + m_pred_qos_subscription( + m_qos_pred_filter_criteria, + PX_PRED_QOS_SUB_CALLBACK, + v_pred_qos_subscription.links + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_pred_qos_subscription( + mw_pred_qos_subscription( + -, + PX_PRED_QOS_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully udates the predQosSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_pred_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_05 + /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ - testcase TC_MEC_MEC030_SRV_V2X_009_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC030_SRV_V2X_010_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; @@ -2556,14 +2968,14 @@ module AtsMec_V2XInformationServiceAPI_TestCases { // postamble f_delete_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_009_BR + } // End of testcase TC_MEC_MEC030_SRV_V2X_010_BR /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ - testcase TC_MEC_MEC030_SRV_V2X_009_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC030_SRV_V2X_010_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; @@ -2630,14 +3042,14 @@ module AtsMec_V2XInformationServiceAPI_TestCases { // postamble f_delete_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_009_NF + } // End of testcase TC_MEC_MEC030_SRV_V2X_010_NF /** * @desc Check that the IUT responds with the request of removing subscription information when queried by a MEC Application * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ - testcase TC_MEC_MEC030_SRV_V2X_010_OK_01() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC030_SRV_V2X_011_OK_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; @@ -2686,14 +3098,14 @@ module AtsMec_V2XInformationServiceAPI_TestCases { // postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_01 + } // End of testcase TC_MEC_MEC030_SRV_V2X_011_OK_01 /** * @desc Check that the IUT responds with the request of removing subscription information when queried by a MEC Application * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ - testcase TC_MEC_MEC030_SRV_V2X_010_OK_02() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC030_SRV_V2X_011_OK_02() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; @@ -2742,14 +3154,14 @@ module AtsMec_V2XInformationServiceAPI_TestCases { // postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_02 + } // End of testcase TC_MEC_MEC030_SRV_V2X_011_OK_02 /** * @desc Check that the IUT responds with the request of removing subscription information when queried by a MEC Application * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ - testcase TC_MEC_MEC030_SRV_V2X_010_OK_03() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC030_SRV_V2X_011_OK_03() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; @@ -2798,14 +3210,14 @@ module AtsMec_V2XInformationServiceAPI_TestCases { // postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_03 + } // End of testcase TC_MEC_MEC030_SRV_V2X_011_OK_03 /** * @desc Check that the IUT responds with the request of removing subscription information when queried by a MEC Application * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ - testcase TC_MEC_MEC030_SRV_V2X_010_OK_04() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC030_SRV_V2X_011_OK_04() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; @@ -2854,14 +3266,14 @@ module AtsMec_V2XInformationServiceAPI_TestCases { // postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_04 + } // End of testcase TC_MEC_MEC030_SRV_V2X_011_OK_04 /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ - testcase TC_MEC_MEC030_SRV_V2X_010_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC030_SRV_V2X_011_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; @@ -2908,7 +3320,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { // postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_010_NF + } // End of testcase TC_MEC_MEC030_SRV_V2X_011_NF } // End of group me_app_role diff --git a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn index 8561c3f..f8dccdf 100644 --- a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn +++ b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn @@ -13,6 +13,60 @@ module AtsMec_V2XInformationServiceAPI_TestControl { if (PICS_MEC_PLAT and PICS_SERVICES) { execute(TC_MEC_MEC030_SRV_V2X_001_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_001_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_001_BR()); + execute(TC_MEC_MEC030_SRV_V2X_001_NF()); + + execute(TC_MEC_MEC030_SRV_V2X_002_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_002_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_002_BR()); + execute(TC_MEC_MEC030_SRV_V2X_002_NF()); + + execute(TC_MEC_MEC030_SRV_V2X_003_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_003_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_003_BR()); + execute(TC_MEC_MEC030_SRV_V2X_003_NF()); + + execute(TC_MEC_MEC030_SRV_V2X_004_OK()); + execute(TC_MEC_MEC030_SRV_V2X_004_BR()); + execute(TC_MEC_MEC030_SRV_V2X_004_NF()); + + execute(TC_MEC_MEC030_SRV_V2X_005_OK()); + execute(TC_MEC_MEC030_SRV_V2X_005_BR()); + execute(TC_MEC_MEC030_SRV_V2X_005_NF()); + + execute(TC_MEC_MEC030_SRV_V2X_006_OK()); + execute(TC_MEC_MEC030_SRV_V2X_006_BR()); + + execute(TC_MEC_MEC030_SRV_V2X_007_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_007_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_007_OK_03()); + execute(TC_MEC_MEC030_SRV_V2X_007_OK_04()); + execute(TC_MEC_MEC030_SRV_V2X_007_OK_05()); + execute(TC_MEC_MEC030_SRV_V2X_007_BR()); + + execute(TC_MEC_MEC030_SRV_V2X_008_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_008_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_008_OK_03()); + execute(TC_MEC_MEC030_SRV_V2X_008_OK_04()); + execute(TC_MEC_MEC030_SRV_V2X_008_OK_05()); + execute(TC_MEC_MEC030_SRV_V2X_008_BR()); + + execute(TC_MEC_MEC030_SRV_V2X_009_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_009_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_009_OK_03()); + execute(TC_MEC_MEC030_SRV_V2X_009_OK_04()); + execute(TC_MEC_MEC030_SRV_V2X_009_OK_05()); + execute(TC_MEC_MEC030_SRV_V2X_009_BR()); + execute(TC_MEC_MEC030_SRV_V2X_009_NF()); + + execute(TC_MEC_MEC030_SRV_V2X_010_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_010_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_010_OK_03()); + execute(TC_MEC_MEC030_SRV_V2X_010_OK_04()); + execute(TC_MEC_MEC030_SRV_V2X_010_OK_05()); + execute(TC_MEC_MEC030_SRV_V2X_010_BR()); + execute(TC_MEC_MEC030_SRV_V2X_010_NF()); } } // End of 'control' statement diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Functions.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Functions.ttcn index 8953fac..2a9abbb 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Functions.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Functions.ttcn @@ -38,7 +38,8 @@ module V2XInformationServiceAPI_Functions { import from LibMec_Pixits all; function f_create_prov_uu_uni_subscription( - out ProvChgUuUniSubscription p_prov_chg_uu_uni_subscription + out ProvChgUuUniSubscription p_prov_chg_uu_uni_subscription, + out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -47,7 +48,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_uu_uni", + PICS_ROOT_API & PX_ME_V2X_URI_SUB, v_headers, m_http_message_body_json( m_body_json_prov_chg_uu_uni_subscription( @@ -66,7 +67,7 @@ module V2XInformationServiceAPI_Functions { oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) )), PX_PROV_UU_UNI_SUB_CALLBACK - )))))); + )))))); tc_ac.start; alt { @@ -79,11 +80,21 @@ module V2XInformationServiceAPI_Functions { -, PX_PROV_UU_UNI_SUB_CALLBACK, ? - )))))) -> value v_response { + )))))) -> value v_response { tc_ac.stop; + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_V2X_URI_SUB & "/(?*)", + 0 + ); p_prov_chg_uu_uni_subscription := v_response.response.body.json_body.provChgUuUniSubscription; - log("f_create_prov_uu_uni_subscription: IUT successfully registers subscription: ", p_prov_chg_uu_uni_subscription); + log("f_create_prov_uu_uni_subscription: INFO: IUT successfully registers subscription: ", p_prov_chg_uu_uni_subscription); + log("f_create_prov_uu_uni_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_prov_uu_uni_subscription: Expected message not received"); @@ -93,7 +104,7 @@ module V2XInformationServiceAPI_Functions { } // End of function f_create_prov_uu_uni_subscription function f_delete_prov_uu_uni_subscription( - in ProvChgUuUniSubscription p_prov_chg_uu_uni_subscription + in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; @@ -101,16 +112,16 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & p_prov_chg_uu_uni_subscription.links.self_.href, + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & p_subscription_id, v_headers - ))); + ))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; } [] tc_ac.timeout { @@ -121,7 +132,8 @@ module V2XInformationServiceAPI_Functions { } // End of function f_delete_prov_uu_uni_subscription function f_create_prov_uu_mbms_subscription( - out ProvChgUuMbmsSubscription p_prov_chg_uu_mbms_subscription + out ProvChgUuMbmsSubscription p_prov_chg_uu_mbms_subscription, + out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -130,7 +142,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_uu_mbms", + PICS_ROOT_API & PX_ME_V2X_URI_SUB, v_headers, m_http_message_body_json( m_body_json_prov_chg_uu_mbms_subscription( @@ -157,7 +169,7 @@ module V2XInformationServiceAPI_Functions { ) )), PX_PROV_UU_MBMS_SUB_CALLBACK - )))))); + )))))); tc_ac.start; alt { @@ -173,8 +185,18 @@ module V2XInformationServiceAPI_Functions { )))))) -> value v_response { tc_ac.stop; + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_V2X_URI_SUB & "/(?*)", + 0 + ); p_prov_chg_uu_mbms_subscription := v_response.response.body.json_body.provChgUuMbmsSubscription; log("f_create_prov_uu_mbms_subscription: IUT successfully registers subscription: ", p_prov_chg_uu_mbms_subscription); + log("f_create_prov_uu_mbms_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_prov_uu_mbms_subscription: Expected message not received"); @@ -184,15 +206,15 @@ module V2XInformationServiceAPI_Functions { } // End of function f_create_prov_uu_mbms_subscription function f_delete_prov_uu_mbms_subscription( - in ProvChgUuMbmsSubscription p_prov_chg_uu_mbms_subscription - ) runs on HttpComponent { + in charstring p_subscription_id + ) runs on HttpComponent { var Headers v_headers; f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & p_prov_chg_uu_mbms_subscription.links.self_.href, + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & p_subscription_id, v_headers ))); @@ -201,7 +223,7 @@ module V2XInformationServiceAPI_Functions { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; } [] tc_ac.timeout { @@ -212,7 +234,8 @@ module V2XInformationServiceAPI_Functions { } // End of function f_delete_prov_uu_mbms_subscription function f_create_prov_pc5_subscription( - out ProvChgPc5Subscription p_prov_chg_pc5_subscription + out ProvChgPc5Subscription p_prov_chg_pc5_subscription, + out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -221,7 +244,7 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_pc5", + PICS_ROOT_API & PX_ME_V2X_URI_SUB, v_headers, m_http_message_body_json( m_body_json_prov_chg_pc5_subscription( @@ -237,7 +260,7 @@ module V2XInformationServiceAPI_Functions { 10.41 ))), PX_PROV_PC5_SUB_CALLBACK - )))))); + )))))); tc_ac.start; alt { @@ -250,11 +273,21 @@ module V2XInformationServiceAPI_Functions { -, PX_PROV_PC5_SUB_CALLBACK, ? - )))))) -> value v_response { + )))))) -> value v_response { tc_ac.stop; + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_V2X_URI_SUB & "/(?*)", + 0 + ); p_prov_chg_pc5_subscription := v_response.response.body.json_body.provChgPc5Subscription; - log("f_create_prov_pc5_subscription: IUT successfully registers subscription: ", p_prov_chg_pc5_subscription); + log("f_create_prov_pc5_subscription: INFO: IUT successfully registers subscription: ", p_prov_chg_pc5_subscription); + log("f_create_prov_pc5_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_prov_pc5_subscription: Expected message not received"); @@ -264,7 +297,7 @@ module V2XInformationServiceAPI_Functions { } // End of function f_create_prov_pc5_subscription function f_delete_prov_pc5_subscription( - in ProvChgPc5Subscription p_prov_chg_pc5_subscription + in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; @@ -272,16 +305,16 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & p_prov_chg_pc5_subscription.links.self_.href, + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & p_subscription_id, v_headers - ))); + ))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; } [] tc_ac.timeout { @@ -292,7 +325,8 @@ module V2XInformationServiceAPI_Functions { } // End of function f_delete_prov_pc5_subscription function f_create_v2x_msg_subscription( - out V2xMsgSubscription p_v2x_msg_subscription + out V2xMsgSubscription p_v2x_msg_subscription, + out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -301,14 +335,14 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/V2xMsgSubscription", + PICS_ROOT_API & PX_ME_V2X_URI_SUB, v_headers, m_http_message_body_json( m_body_json_v2x_msg_subscription( m_v2x_msg_subscription( m_v2x_msg_subscription_filter_criteria, PX_PROV_V2X_SUB_CALLBACK - )))))); + )))))); tc_ac.start; alt { @@ -321,11 +355,21 @@ module V2XInformationServiceAPI_Functions { -, PX_PROV_V2X_SUB_CALLBACK, ? - )))))) -> value v_response { + )))))) -> value v_response { tc_ac.stop; + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_V2X_URI_SUB & "/(?*)", + 0 + ); p_v2x_msg_subscription := v_response.response.body.json_body.v2xMsgSubscription; - log("f_create_v2x_msg_subscription: IUT successfully registers subscription: ", p_v2x_msg_subscription); + log("f_create_v2x_msg_subscription: INFO: IUT successfully registers subscription: ", p_v2x_msg_subscription); + log("f_create_v2x_msg_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_v2x_msg_subscription: Expected message not received"); @@ -335,7 +379,7 @@ module V2XInformationServiceAPI_Functions { } // End of function f_create_v2x_msg_subscription function f_delete_v2x_msg_subscription( - in V2xMsgSubscription p_v2x_msg_subscription + in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; @@ -343,16 +387,16 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & p_v2x_msg_subscription.links.self_.href, + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & p_subscription_id, v_headers - ))); + ))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; } [] tc_ac.timeout { @@ -362,4 +406,86 @@ module V2XInformationServiceAPI_Functions { } // End of function f_delete_v2x_msg_subscription + function f_create_pred_qos_subscription( + out PredQosSubscription p_pred_qos_subscription, + out charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_pred_qos_subscription( + m_pred_qos_subscription( + m_qos_pred_filter_criteria, + PX_PRED_QOS_SUB_CALLBACK + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_pred_qos_subscription( + mw_pred_qos_subscription( + -, + PX_PRED_QOS_SUB_CALLBACK, + ? + )))))) -> value v_response { + tc_ac.stop; + + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_V2X_URI_SUB & "/(?*)", + 0 + ); + p_pred_qos_subscription := v_response.response.body.json_body.predQosSubscription; + log("f_create_pred_qos_subscription: INFO: IUT successfully registers subscription: ", p_pred_qos_subscription); + log("f_create_pred_qos_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_pred_qos_subscription: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_pred_qos_subscription + + function f_delete_pred_qos_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & p_subscription_id, + v_headers + ))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_pred_qos_subscription: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_pred_qos_subscription + } // End of module V2XInformationServiceAPI_Functions diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Pixits.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Pixits.ttcn index fb98a4a..0d6601f 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Pixits.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Pixits.ttcn @@ -26,6 +26,8 @@ module V2XInformationServiceAPI_Pixits { modulepar charstring PX_UNKNOWN_MNC := "796"; + modulepar charstring PX_NON_EXISTENT_SUBSCRIPTION_ID := "subscription0666"; + modulepar Json.AnyURI PX_PROV_UU_UNI_SUB_CALLBACK := ""; modulepar Json.AnyURI PX_PROV_UU_MBMS_SUB_CALLBACK := ""; @@ -34,6 +36,8 @@ module V2XInformationServiceAPI_Pixits { modulepar Json.AnyURI PX_PROV_V2X_SUB_CALLBACK := ""; + modulepar Json.AnyURI PX_PRED_QOS_SUB_CALLBACK := ""; + modulepar charstring PX_V2X_SERVER_IP_ADDRESS := ""; modulepar charstring PX_V2X_SERVER_UDP_PORT := ""; @@ -48,4 +52,10 @@ module V2XInformationServiceAPI_Pixits { modulepar charstring PX_V2X_DST_LAYER_2_ID := ""; + modulepar charstring PX_PROT_IMPLEMENTATION := ""; + + modulepar Json.String PX_V2X_MSG_DISTRIBUTION_SERVER_IP_ADDRESS := "10.8.0.1"; + + modulepar Json.UInt16 PX_V2X_MSG_DISTRIBUTION_SERVER_PORT := 12345; + } // End of module V2XInformationServiceAPI_Pixits diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn index 72e6485..63a5bb4 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn @@ -71,6 +71,70 @@ module V2XInformationServiceAPI_Templates { proInfoPc5 := p_proInfoPc5 } // End of template mw_pc5_provisioning_info + template (omit) V2xMsgDistributionServerInfo m_v2x_msg_distribution_server_info( + in template (value) V2xMsgDistributionServer p_v2xMsgDistributionServer, + in template (omit) LocationInfo p_locationInfo := omit + ) := { + v2xMsgDistributionServer := p_v2xMsgDistributionServer, + locationInfo := p_locationInfo + } // End of template m_v2x_msg_distribution_server_info + + template (present) V2xMsgDistributionServerInfo mw_v2x_msg_distribution_server_info( + template (present) V2xMsgDistributionServer p_v2xMsgDistributionServer := ?, + template LocationInfo p_locationInfo := * + ) := { + v2xMsgDistributionServer := p_v2xMsgDistributionServer, + locationInfo := p_locationInfo + } // End of template mw_v2x_msg_distribution_server_info + + template (omit) V2xMsgDistributionServer m_v2x_msg_distribution_server( + in template (value) InfoProtocol p_infoProtocol, + in template (omit) InfoConnection p_infoConnection := omit + ) := { + infoProtocol := p_infoProtocol, + infoConnection := p_infoConnection + } // End of template m_v2x_msg_distribution_server + + template (present) V2xMsgDistributionServer mw_v2x_msg_distribution_server( + template (present) InfoProtocol p_infoProtocol := ?, + template InfoConnection p_infoConnection := * + ) := { + infoProtocol := p_infoProtocol, + infoConnection := p_infoConnection + } // End of template mw_v2x_msg_distribution_server + + template (value) InfoProtocol m_info_protocol( + in MsgProtocol p_msgProtocol := MQTT_v3_1_1, + in Json.String p_protImplementation := PX_PROT_IMPLEMENTATION + ) := { + msgProtocol := p_msgProtocol, + protImplementation := p_protImplementation + } // End of template m_info_protocol + + template (present) InfoProtocol mw_info_protocol( + template (present) MsgProtocol p_msgProtocol := MQTT_v3_1_1, + template (present) Json.String p_protImplementation := PX_PROT_IMPLEMENTATION + ) := { + msgProtocol := p_msgProtocol, + protImplementation := p_protImplementation + } // End of template mw_info_protocol + + template (value) InfoConnection m_info_connection( + in Json.String p_ipAddress, + in Json.UInt16 p_port_number + ) := { + ipAddress := p_ipAddress, + port_number := p_port_number + } // End of template m_info_connection + + template (present) InfoConnection mw_info_connection( + template (present) Json.String p_ipAddress := ?, + template (present) Json.UInt16 p_port_number := ? + ) := { + ipAddress := p_ipAddress, + port_number := p_port_number + } // End of template mw_info_connection + template (omit) PredictedQos m_predicted_qos( in template (value) PredictionTarget p_predictionTarget := E2E_APPLICATION_INSTANCE_PREDICTION, in template (value) Json.String p_locationGranularity, @@ -582,4 +646,50 @@ module V2XInformationServiceAPI_Templates { locationInfo := p_locationInfo } // End of template mw_v2x_msg_subscription_filter_criteria + template (omit) PredQosSubscription m_pred_qos_subscription( + in template (value) QosPredFilterCriteria p_filterCriteria, + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "PredQosSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline + } // End of template m_pred_qos_subscription + + template (present) PredQosSubscription mw_pred_qos_subscription( + template (present) QosPredFilterCriteria p_filterCriteria := ?, + template Json.AnyURI p_callbackReference := *, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "PredQosSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline + } // End of template mw_pred_qos_subscription + + template (omit) QosPredFilterCriteria m_qos_pred_filter_criteria( + in template (omit) Json.String p_streamId := omit + ) := { + streamId := p_streamId + } // End of template m_filterCriteria + + template QosPredFilterCriteria mw_qos_pred_filter_criteria( + template Json.String p_streamId := * + ) := { + streamId := p_streamId + } // End of template mw_filterCriteria + } // End of module V2XInformationServiceAPI_Templates diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn index 3521625..b39391d 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn @@ -798,7 +798,7 @@ module V2XInformationServiceAPI_TypesAndValues { /** * @desc Specifics of the application layer protocol of V2X Message Distribution Server * @member msgProtocol Numerical value corresponding to the application layer protocol supported by the service consumer - * @member Implementation specifics of application layer protocol, e.g. programming language + * @member protImplementation Implementation specifics of application layer protocol, e.g. programming language * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.16-1: Attributes of the V2xMsgDistributionServer */ type record InfoProtocol { @@ -837,7 +837,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.17-1: Attributes of the QosPredFilterCriteria */ type record QosPredFilterCriteria { - Json.String streamId + Json.String streamId optional } /** diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index 539f67d..7aa9929 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -36,9 +36,11 @@ module LibMec_Pixits { modulepar charstring PX_ME_WLAN_URI_MEAS := "wai/v2/measurements"; - modulepar charstring PX_ME_V2X_URI := "vis/v1"; + modulepar charstring PX_ME_V2X_URI := "vis/v2"; - modulepar charstring PX_ME_V2X_QUERIES_URI := "/vis/v1/queries"; + modulepar charstring PX_ME_V2X_URI_SUB := "vis/v2/subscriptions"; + + modulepar charstring PX_ME_V2X_QUERIES_URI := "vis/v2/queries"; modulepar charstring PX_ME_DEVICE_APP_URI := "dev_app/v1"; diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index 957ee15..24c1189 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -154,7 +154,9 @@ module LibHttp_JsonMessageBodyTypes { ProvChgUuUniSubscription provChgUuUniSubscription, ProvChgUuMbmsSubscription provChgUuMbmsSubscription, ProvChgPc5Subscription provChgPc5Subscription, + V2xMsgDistributionServerInfo v2xMsgDistributionServerInfo, // ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.5-1: Attributes of the V2xMsgDistributionServerInfo V2xMsgSubscription v2xMsgSubscription, + PredQosSubscription predQosSubscription, // ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.6-1: Attributes of the PredQosSubscription ProvChgUuUniNotification provChgUuUniNotification, ProvChgUuMbmsNotification provChgUuMbmsNotification, ProvChgPc5Notification provChgPc5Notification, diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn index b504dd6..3f31307 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -1358,6 +1358,18 @@ module LibHttp_JsonTemplates { provChgPc5Subscription := p_provChgPc5Subscription } // End of template mw_body_json_prov_pc5_subscription + template (value) JsonBody m_body_json_v2x_msg_distribution_server_info( + in template (value) V2xMsgDistributionServerInfo p_v2xMsgDistributionServerInfo + ) := { + v2xMsgDistributionServerInfo := p_v2xMsgDistributionServerInfo + } // End of template m_body_json_v2x_msg_distribution_server_info + + template (present) JsonBody mw_body_json_v2x_msg_distribution_server_info( + template (present) V2xMsgDistributionServerInfo p_v2xMsgDistributionServerInfo := ? + ) := { + v2xMsgDistributionServerInfo := p_v2xMsgDistributionServerInfo + } // End of template mw_body_json_v2x_msg_distribution_server_info + template (value) JsonBody m_body_json_v2x_msg_subscription( in template (value) V2xMsgSubscription p_v2xMsgSubscription ) := { @@ -1370,6 +1382,18 @@ module LibHttp_JsonTemplates { v2xMsgSubscription := p_v2xMsgSubscription } // End of template mw_body_json_v2x_msg_subscription + template (value) JsonBody m_body_json_pred_qos_subscription( + in template (value) PredQosSubscription p_predQosSubscription + ) := { + predQosSubscription := p_predQosSubscription + } // End of template m_body_json_pred_qos_subscription + + template (present) JsonBody mw_body_json_pred_qos_subscription( + template (present) PredQosSubscription p_predQosSubscription := ? + ) := { + predQosSubscription := p_predQosSubscription + } // End of template mw_body_json_pred_qos_subscription + template (value) JsonBody m_body_json_prov_chg_uu_uni_notification( in template (value) ProvChgUuUniNotification p_provChgUuUniNotification ) := { -- GitLab From 4940e0792a3f6e6c3e6a5495feccd0bf03a9628d Mon Sep 17 00:00:00 2001 From: garciay Date: Sun, 14 Jan 2024 16:00:10 +0100 Subject: [PATCH 49/58] TTF T027: Start review MEC-030 --- config.mk | 2 +- ...ec_V2XInformationServiceAPI_TestCases.ttcn | 817 +++++++++--------- ..._V2XInformationServiceAPI_TestControl.ttcn | 7 + 3 files changed, 440 insertions(+), 386 deletions(-) diff --git a/config.mk b/config.mk index d5d4014..b8bb114 100644 --- a/config.mk +++ b/config.mk @@ -1,5 +1,5 @@ TTCN3_COMPILER_OPTIONS := -b -d -e -f -g -l -L -M -n -O -r -R -U none -x -X -TTCN3_DIR := $(HOME)/frameworks/titan/titan.core/Install +#TTCN3_DIR := $(HOME)/frameworks/titan/titan.core/Install #WPCAP_DLL_PATH := /cygdrive/c/windows/system32/npcap/wpcap.dll #NPCAP_INCLUDE := /cygdrive/c/PROGRA~1/Npcap/sdk/include T3Q_PATH=./tools/t3q-v2.0.0b30 diff --git a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn index 7dc6bc0..c698320 100644 --- a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn +++ b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn @@ -2897,429 +2897,476 @@ module AtsMec_V2XInformationServiceAPI_TestCases { } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_05 /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested of updating subscription when queried by a MEC Application */ testcase TC_MEC_MEC030_SRV_V2X_010_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_uni_subscription.links.self_.href, - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_uu_uni_subscription( - m_prov_chg_uu_uni_subscription_invalid( - m_prov_chg_uu_uni_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.72, - 10.41 - )), - m_v2x_application_server( - oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), - oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) - )), - PX_PROV_UU_UNI_SUB_CALLBACK, - v_prov_chg_uu_uni_subscription.links - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_subscription_invalid( + m_prov_chg_uu_uni_filter_criteria( + m_location_info( + m_ecgi( + PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + )), + m_v2x_application_server( + oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), + oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) + )), + PX_PROV_UU_UNI_SUB_CALLBACK, + v_prov_chg_uu_uni_subscription.links + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_delete_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_cf_01_http_down(); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_uni_subscription(v_subscription_id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_010_BR /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested of updating subscription when queried by a MEC Application */ testcase TC_MEC_MEC030_SRV_V2X_010_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_subscription_invalid( + m_prov_chg_uu_uni_filter_criteria( + m_location_info( + m_ecgi( + PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + )), + m_v2x_application_server( + oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), + oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) + )), + PX_PROV_UU_UNI_SUB_CALLBACK, + v_prov_chg_uu_uni_subscription.links + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/invalid_links", - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_uu_uni_subscription( - m_prov_chg_uu_uni_subscription_invalid( - m_prov_chg_uu_uni_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.72, - 10.41 - )), - m_v2x_application_server( - oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), - oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) - )), - PX_PROV_UU_UNI_SUB_CALLBACK, - v_prov_chg_uu_uni_subscription.links - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_delete_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_cf_01_http_down(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_uni_subscription(v_subscription_id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_010_NF /** - * @desc Check that the IUT responds with the request of removing subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - ProvChgUuUniSubscription */ testcase TC_MEC_MEC030_SRV_V2X_011_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully removes subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_uni_subscription.links.self_.href, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully removes subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_011_OK_01 + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_011_OK_01 /** - * @desc Check that the IUT responds with the request of removing subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - ProvChgUuMbmsSubscription */ testcase TC_MEC_MEC030_SRV_V2X_011_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgUuMbmsSubscription v_prov_chg_uu_mbms_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_mbms_subscription.links.self_.href, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgUuMbmsSubscription v_prov_chg_uu_mbms_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully removes subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully removes subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_011_OK_02 /** - * @desc Check that the IUT responds with the request of removing subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - ProvChgPc5Subscription */ testcase TC_MEC_MEC030_SRV_V2X_011_OK_03() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgPc5Subscription v_prov_chg_pc5_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_pc5_subscription(v_prov_chg_pc5_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_pc5_subscription.links.self_.href, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgPc5Subscription v_prov_chg_pc5_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_pc5_subscription(v_prov_chg_pc5_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully removes subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully removes subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_011_OK_03 /** - * @desc Check that the IUT responds with the request of removing subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - V2xMsgSubscription */ testcase TC_MEC_MEC030_SRV_V2X_011_OK_04() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var V2xMsgSubscription v_v2x_msg_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_v2x_msg_subscription(v_v2x_msg_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_v2x_msg_subscription.links.self_.href, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var V2xMsgSubscription v_v2x_msg_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_v2x_msg_subscription(v_v2x_msg_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully removes subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_011_OK_04 /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - PredQosSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_011_OK_05() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var PredQosSubscription v_pred_qos_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_pred_qos_subscription(v_pred_qos_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully removes subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_011_OK_05 + + /** + * @desc Check that the IUT responds with the requested of removing subscription when queried by a MEC Application */ testcase TC_MEC_MEC030_SRV_V2X_011_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/invalid_links", - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // postamble - f_cf_01_http_down(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_011_NF } // End of group me_app_role diff --git a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn index f8dccdf..0bbe65b 100644 --- a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn +++ b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn @@ -67,6 +67,13 @@ module AtsMec_V2XInformationServiceAPI_TestControl { execute(TC_MEC_MEC030_SRV_V2X_010_OK_05()); execute(TC_MEC_MEC030_SRV_V2X_010_BR()); execute(TC_MEC_MEC030_SRV_V2X_010_NF()); + + execute(TC_MEC_MEC030_SRV_V2X_011_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_011_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_011_OK_03()); + execute(TC_MEC_MEC030_SRV_V2X_011_OK_04()); + execute(TC_MEC_MEC030_SRV_V2X_011_OK_05()); + execute(TC_MEC_MEC030_SRV_V2X_011_NF()); } } // End of 'control' statement -- GitLab From 4620d04f9804f31534586297d0e732bc9e253ba7 Mon Sep 17 00:00:00 2001 From: garciay Date: Mon, 5 Feb 2024 18:26:03 +0100 Subject: [PATCH 50/58] TTF T027: Finalyze review MEC-030 & MEC-029 --- ...AccessInformationServiceAPI_TestCases.ttcn | 1485 ++++++++--------- ...cessInformationServiceAPI_TestControl.ttcn | 40 +- .../AtsMec_WlanInformationAPI_TestCases.ttcn | 20 +- .../module.mk | 1 + ...AccessInformationServiceAPI_Functions.ttcn | 342 ++++ ...xedAccessInformationServiceAPI_Pixits.ttcn | 14 +- ...AccessInformationServiceAPI_Templates.ttcn | 174 +- ...sInformationServiceAPI_TypesAndValues.ttcn | 14 +- ttcn/LibMec/ttcn/LibMec_Pixits.ttcn | 10 +- .../ttcn/LibHttp_JsonMessageBodyTypes.ttcn | 3 + .../ttcn/LibHttp_JsonTemplates.ttcn | 48 +- 11 files changed, 1322 insertions(+), 829 deletions(-) create mode 100644 ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Functions.ttcn diff --git a/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestCases.ttcn b/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestCases.ttcn index 1d9036f..9a328e8 100644 --- a/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestCases.ttcn +++ b/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestCases.ttcn @@ -7,64 +7,64 @@ * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. - * @see ETSI GS MEC 003, ETSI GS MEC 029 V2.1.1 + * @see ETSI GS MEC 003, ETSI GS MEC 029 V2.2.1 */ module AtsMec_FixedAccessInformationServiceAPI_TestCases { - + // Libcommon import from LibCommon_Time all; import from LibCommon_VerdictControl all; import from LibCommon_Sync all; - + // LibHttp import from LibHttp_TypesAndValues all; import from LibHttp_Functions all; import from LibHttp_Templates all; import from LibHttp_JsonTemplates all; import from LibHttp_TestSystem all; - + // LibMec_FixedAccessInformationServiceAPI + import from FixedAccessInformationServiceAPI_TypesAndValues all; import from FixedAccessInformationServiceAPI_Templates all; + import from FixedAccessInformationServiceAPI_Functions all; import from FixedAccessInformationServiceAPI_Pics all; import from FixedAccessInformationServiceAPI_Pixits all; - + // LibMec + import from LibMec_Templates all; import from LibMec_Functions all; import from LibMec_Pics all; import from LibMec_Pixits all; - + /* * Fixed Access Information Service (FAIS) */ group fixedAccessInfoService { - + /** * @desc Check that the IUT responds with the current status of the fixed access information when queried by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } + testcase TC_MEC_MEC029_SRV_FAIS_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( + m_http_request_get( PX_FAI_FA_INFO_URI, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -74,9 +74,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { mw_http_message_body_json( mw_body_json_fai_fa_info( mw_fa_info - ))))) { + ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a FaInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -85,82 +85,79 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_001_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_001_OK + /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PX_FAI_FA_INFO_URI & "?interface=1", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { + testcase TC_MEC_MEC029_SRV_FAIS_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PX_FAI_FA_INFO_URI & "?if=1", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } + } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_001_BR - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_001_BR + /** * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_001_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC029_SRV_FAIS_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration // Preamble @@ -168,22 +165,20 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_FA_INFO_URI & "?interface=999", + PICS_ROOT_API & PX_FAI_FA_INFO_URI & "?interface=666", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found() - )) { + mw_http_response_404_not_found + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -192,43 +187,40 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_001_NF - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_001_NF + /** * @desc Check that the IUT responds with the current status of the device information when queried by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_002_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_DEVICE_INFO_URI, - v_headers - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_FAI_DEVICE_INFO_URI, + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -238,9 +230,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { mw_http_message_body_json( mw_body_json_fai_device_info( mw_device_info - ))))) { + ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -249,53 +241,50 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_002_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_002_OK + /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_002_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_002_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_DEVICE_INFO_URI & "?device=__any_value__", - v_headers - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_FAI_DEVICE_INFO_URI & "?dev=__any_value__", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { - + )) { + tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -304,28 +293,28 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_002_BR - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_002_BR + /** * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_002_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC029_SRV_FAIS_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration // Preamble @@ -333,22 +322,20 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_DEVICE_INFO_URI & "?gwId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_GW_ID[0], "UTF-8")), + PICS_ROOT_API & PX_FAI_DEVICE_INFO_URI & "?gwId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_GW_ID[0], "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -357,56 +344,53 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_002_NF + } // End of testcase TC_MEC_MEC029_SRV_FAIS_002_NF /** * @desc CCheck that the IUT responds with the current status of the cable line information when queried by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_003_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_CABLE_LINE_INFO_URI, + PICS_ROOT_API & PX_FAI_CABLE_LINE_INFO_URI, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_fai_cable_line_info( - mw_cable_line_info - ))))) { - + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fai_cable_line_info( + mw_cable_line_info + ))))) { + tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a CableLineInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -415,53 +399,50 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_003_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_003_OK + /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_003_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_003_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_CABLE_LINE_INFO_URI & "?cm=__any_value__", - v_headers - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_FAI_CABLE_LINE_INFO_URI & "?cm=__any_value__", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { - + )) { + tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -470,52 +451,49 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_003_BR + } // End of testcase TC_MEC_MEC029_SRV_FAIS_003_BR /** * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_003_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_CABLE_LINE_INFO_URI & "?cmId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_CM_ID, "UTF-8")), - v_headers - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_FAI_CABLE_LINE_INFO_URI & "?cmId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_CM_ID, "UTF-8")), + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with 404 Not Found ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -524,43 +502,40 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_003_NF - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_003_NF + /** * @desc Check that the IUT responds with the current status of the optical network information when queried by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_004_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_OPTICAL_NW_INFO_URI, + PICS_ROOT_API & PX_FAI_OPTICAL_NW_INFO_URI, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -570,9 +545,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { mw_http_message_body_json( mw_body_json_fai_pon_info( mw_pon_info - ))))) { + ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a PonInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -581,60 +556,50 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_004_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_004_OK + /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_004_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_004_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_OPTICAL_NW_INFO_URI & "?onu=__any_value__", + PICS_ROOT_API & PX_FAI_OPTICAL_NW_INFO_URI & "?onu=__any_value__", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { - + )) { + tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 400 bad request ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -643,59 +608,49 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_004_BR + } // End of testcase TC_MEC_MEC029_SRV_FAIS_004_BR /** * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_004_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_OPTICAL_NW_INFO_URI & "?onuId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_ONU_ID, "UTF-8")), - v_headers - ) - ) - ); + PICS_ROOT_API & PX_FAI_OPTICAL_NW_INFO_URI & "?onuId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_ONU_ID, "UTF-8")), + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found() - )) { + mw_http_response_404_not_found + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with 404 Not Found ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -704,43 +659,40 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_004_NF + } // End of testcase TC_MEC_MEC029_SRV_FAIS_004_NF /** * @desc Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_005_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration + testcase TC_MEC_MEC029_SRV_FAIS_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI, + PICS_ROOT_API & PX_FAI_SUB_URI, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -750,9 +702,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { mw_http_message_body_json( mw_body_json_fai_subscription_link_list( mw_subscription_link_list - ))))) { + ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SubscriptionLinkList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -761,52 +713,50 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_005_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_005_OK + /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_005_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_005_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & "?subscription=__any_value", + PICS_ROOT_API & PX_FAI_SUB_URI & "?subscription=__any_value", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 400 Bad Request ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -815,43 +765,40 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_005_BR + } // End of testcase TC_MEC_MEC029_SRV_FAIS_005_BR /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_005_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & "?subscription_type=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_SUB_ID, "UTF-8")), + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_SUB_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -859,9 +806,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { mw_http_response( mw_http_response_404_not_found )) { - + tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -870,51 +817,48 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_SRV_UEINFOLOOK_001_NF + } // End of testcase TC_MEC_MEC029_SRV_FAIS_005_NF /** * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications on Optical Network Unit alarm events */ - testcase TP_MEC_MEC029_SRV_FAIS_006_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_006_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_post( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI, + PICS_ROOT_API & PX_FAI_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_fai_onu_alarm_subscription_link_list( - m_onu_alarm_subscription( - PX_ONU_ALARM_SUB_CALLBACK_URI, // callbackReference - m_filter_criteria_onu_alarm - ) - ) - ) - ) - ) - ); + m_body_json_fai_onu_alarm_subscription( + m_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_onu_alarm + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -922,85 +866,84 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_fai_onu_alarm_subscription_link_list( - mw_onu_alarm_subscription( - PX_ONU_ALARM_SUB_CALLBACK_URI - )))))) { - // TODO how to send this? The TP has the IUT doing this immediately. Do we want this or will it be discarded as part of the test? - // MEC 029, clause 7.7.3.4 -// the IUT entity sends a vPOST containing -// uri indicating value CALLBACK_URL -// body containing -// OnuAlarmNotification containing -// notificationType set to "OnuAlarmSubscription" -// ; -// ; -// ; -// to the MEC_APP entity + mw_body_json_fai_onu_alarm_subscription( + mw_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI + )))))) -> value v_response { + tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a OnuAlarmSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_FAI_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a onuAlarmSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_onu_alarm_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_006_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_006_OK + /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_006_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_006_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_post( - "/" & PICS_ROOT_API & PX_UE_ZONAL_TRAF_SUB_URI, + PICS_ROOT_API & PX_FAI_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_fai_onu_alarm_subscription_link_list( - m_onu_alarm_subscription_bad_request( - PX_ONU_ALARM_SUB_CALLBACK_URI, // callbackReference - m_filter_criteria_onu_alarm - ) - ) - ) - ) - ) - ); + m_body_json_fai_onu_alarm_subscription( + m_onu_alarm_subscription_bad_request( + PX_ONU_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_onu_alarm + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1009,43 +952,45 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_006_BR - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_006_BR + /** * @desc Check that the IUT responds with the information on a given subscription when queried by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_007_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_007_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & v_subscription_id, v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -1053,11 +998,11 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_fai_onu_alarm_subscription_link_list( - mw_onu_alarm_subscription - ))))) { + mw_body_json_fai_onu_alarm_subscription( + mw_onu_alarm_subscription + ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a OnuAlarmSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1066,52 +1011,50 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_onu_alarm_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_007_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_007_OK + /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_007_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_007_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1120,52 +1063,48 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_007_NF + } // End of testcase TC_MEC_MEC029_SRV_FAIS_007_NF /** * @desc Check that the IUT updates an existing subscription when commanded by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_008_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_008_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble - // TODO If-Match header needs to have a PROPER_ETAG + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_put( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_fai_onu_alarm_subscription_link_list( - m_onu_alarm_subscription( - PX_ONU_ALARM_SUB_CALLBACK_URI, - m_filter_criteria_onu_alarm - ) - ) - ) - ) - ) - ); + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_fai_onu_alarm_subscription( + m_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_onu_alarm + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -1173,11 +1112,11 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_fai_onu_alarm_subscription_link_list( - mw_onu_alarm_subscription - ))))) { + mw_body_json_fai_onu_alarm_subscription( + mw_onu_alarm_subscription + ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userTrackingSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1186,61 +1125,58 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_onu_alarm_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_008_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_008_OK + /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_008_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_008_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble - // TODO If-Match header needs to have a PROPER_ETAG + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_put( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & v_subscription_id, v_headers, m_http_message_body_json( - m_body_json_fai_onu_alarm_subscription_link_list( - m_onu_alarm_subscription_bad_request( - PX_ONU_ALARM_SUB_CALLBACK_URI, - m_filter_criteria_onu_alarm - ) - ) - ) - ) - ) - ); + m_body_json_fai_onu_alarm_subscription( + m_onu_alarm_subscription_bad_request( + PX_ONU_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_onu_alarm + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1249,61 +1185,58 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_onu_alarm_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_008_BR - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_008_BR + /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_008_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_008_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble - // TODO If-Match header needs to have a PROPER_ETAG + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_put( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers, m_http_message_body_json( - m_body_json_fai_onu_alarm_subscription_link_list( - m_onu_alarm_subscription( - PX_ONU_ALARM_SUB_CALLBACK_URI, - m_filter_criteria_onu_alarm - ) - ) - ) - ) - ) - ); + m_body_json_fai_onu_alarm_subscription( + m_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_onu_alarm + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a HTTP error 404 ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1312,59 +1245,56 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_onu_alarm_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_008_NF + } // End of testcase TC_MEC_MEC029_SRV_FAIS_008_NF /** * @desc Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition */ - testcase TP_MEC_MEC029_SRV_FAIS_008_PF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_008_PF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble - // TODO If-Match header needs to have an INVALID_ETAG + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_put( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_fai_onu_alarm_subscription_link_list( - m_onu_alarm_subscription( - PX_ONU_ALARM_SUB_CALLBACK_URI, - m_filter_criteria_onu_alarm - ) - ) - ) - ) - ) - ); + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_fai_onu_alarm_subscription( + m_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_onu_alarm + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_412_precondition_failed - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 412 Precondition Failed ***"); @@ -1375,52 +1305,53 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_onu_alarm_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_008_PF + } // End of testcase TC_MEC_MEC029_SRV_FAIS_008_PF /** * @desc Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_009_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_009_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & v_subscription_id, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with no content ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1429,50 +1360,45 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_009_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_009_OK + /** * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_009_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_009_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -1481,7 +1407,7 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { mw_http_response_404_not_found )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with no 404 Not Found ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1490,148 +1416,133 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_onu_alarm_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_009_NF - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_009_NF + /** * @desc Check that the IUT sends notification on expiry of Fixed Access Information event subscription to a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_010_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_010_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DevInfoSubscription v_dev_info_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration - f_cf_01_http_up(); - + f_cf_01_http_notif_up(); + // Test adapter configuration - + // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI, - v_headers, - m_http_message_body_json( - m_body_json_fai_onu_alarm_subscription_link_list( - m_onu_alarm_subscription( - PX_ONU_ALARM_SUB_CALLBACK_URI, - m_filter_criteria_onu_alarm, - -, -, -, - m_time_stamp(1577836800) - ) - ) - ) - ) - ) - ); + f_create_dev_info_subscription(v_dev_info_subscription, v_subscription_id); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body - tc_ac.start; + tc_wait.start; alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_fai_onu_alarm_subscription_link_list( - mw_onu_alarm_subscription - ))))) { - // TODO Need to check Location header - - // TODO: how to wait for a timeout of (NOW_PLUS_X_SECONDS - guard time)? which guard time value to use? - // MEC 029, clause 5.2.6.2 -// the IUT entity sends a vPOST containing -// uri indicating value CALLBACK_URL -// body containing -// ExpiryNotification containing -// expiryDeadline indicating value NOW_PLUS_X_SECONDS // TODO: how to set this? -// ; -// ; -// ; -// to the MEC_APP entity - tc_ac.stop; + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PX_FAI_SUB_URI, + -, + mw_http_message_body_json( + mw_body_json_fai_dev_info_subscription( + mw_dev_info_subscription( + PX_DEV_ALARM_SUB_CALLBACK_URI + )))))) { + tc_wait.stop; + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send( + m_http_response( + m_http_response_ok_no_body( + v_headers + ))); log("*** " & testcasename() & ": PASS: IUT successfully responds with a DevInfoSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - [] tc_ac.timeout { + [] tc_wait.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble - f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_010_OK - + f_delete_dev_info_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC029_SRV_FAIS_010_OK + /** * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications on Optical Network Unit alarm events */ - testcase TP_MEC_MEC029_SRV_FAIS_011_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_011_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble - f_init_default_headers_list(-, -, v_headers); - -// TODO how to generate an event? -// Initial conditions with { -// the IUT entity being_in idle_state and -// the IUT entity having a subscriptions containing, -// subscriptionType indicating value "OnuAlarmSubscription" -// callbackReference indicating value CALLBACK_URL -// ; -// } -// -// // MEC 029, clause 5.2.7 -// Expected behaviour -// ensure that { -// when { -// the IUT entity generates a onu_alarm_event -// } -// then { -// // // MEC 029, clause 5.2.7 -// the IUT entity sends a vPOST containing -// Uri set to CALLBACK_URL -// body containing -// OnuAlarmSubscription containing -// notificationType set to "OnuAlarmSubscription" -// ; -// ; -// ; -// to the MEC_APP entity -// } -// } + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PX_FAI_SUB_URI, + -, + mw_http_message_body_json( + mw_body_json_fai_onu_alarm_subscription( + mw_onu_alarm_subscription( + PX_DEV_ALARM_SUB_CALLBACK_URI + )))))) { + tc_wait.stop; + + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send( + m_http_response( + m_http_response_ok_no_body( + v_headers + ))); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DevInfoSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_wait.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement // Postamble - f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_011_OK - + f_delete_onu_alarm_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC029_SRV_FAIS_011_OK + } // End of group fixedAccessInfoService - + } // End of module AtsMec_FixedAccessInformationServiceAPI_TestCases diff --git a/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestControl.ttcn b/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestControl.ttcn index 8aba18e..710a3e4 100644 --- a/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestControl.ttcn +++ b/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestControl.ttcn @@ -11,8 +11,44 @@ module AtsMec_FixedAccessInformationServiceAPI_TestControl { control { - if (PICS_MEC_PLAT and PICS_FAI_API_SUPPORTED) { - execute(TP_MEC_MEC029_SRV_FAIS_001_OK()); + if (PICS_MEC_PLAT and PICS_FAI_API_SUPPORTED and PICS_FAI_API_SUPPORTED) { + execute(TC_MEC_MEC029_SRV_FAIS_001_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_001_BR()); + execute(TC_MEC_MEC029_SRV_FAIS_001_NF()); + + execute(TC_MEC_MEC029_SRV_FAIS_002_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_002_BR()); + execute(TC_MEC_MEC029_SRV_FAIS_002_NF()); + + execute(TC_MEC_MEC029_SRV_FAIS_003_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_003_BR()); + execute(TC_MEC_MEC029_SRV_FAIS_003_NF()); + + execute(TC_MEC_MEC029_SRV_FAIS_004_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_004_BR()); + execute(TC_MEC_MEC029_SRV_FAIS_004_NF()); + + execute(TC_MEC_MEC029_SRV_FAIS_005_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_005_BR()); + execute(TC_MEC_MEC029_SRV_FAIS_005_NF()); + + execute(TC_MEC_MEC029_SRV_FAIS_006_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_006_BR()); + + execute(TC_MEC_MEC029_SRV_FAIS_007_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_007_NF()); + + execute(TC_MEC_MEC029_SRV_FAIS_008_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_008_BR()); + execute(TC_MEC_MEC029_SRV_FAIS_008_NF()); + execute(TC_MEC_MEC029_SRV_FAIS_008_PF()); + + execute(TC_MEC_MEC029_SRV_FAIS_009_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_009_NF()); + + execute(TC_MEC_MEC029_SRV_FAIS_010_OK()); + + execute(TC_MEC_MEC029_SRV_FAIS_011_OK()); } } // End of 'control' statement diff --git a/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn b/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn index dcaab23..e1ee4e6 100644 --- a/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn +++ b/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn @@ -1259,16 +1259,16 @@ module AtsMec_WlanInformationAPI_TestCases { alt { [] httpPort_notif.receive( mw_http_request( - mw_http_request_post( - -, - -, - mw_http_message_body_json( - mw_body_json_assoc_sta_subscription( - mw_assoc_sta_subscription( - PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, - -, - -, -, - ? + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_assoc_sta_subscription( + mw_assoc_sta_subscription( + PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, + -, + -, -, + ? )))))) { tc_wait.stop; diff --git a/ttcn/LibMec/FixedAccessInformationServiceAPI/module.mk b/ttcn/LibMec/FixedAccessInformationServiceAPI/module.mk index 341b7f8..2d89431 100644 --- a/ttcn/LibMec/FixedAccessInformationServiceAPI/module.mk +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/module.mk @@ -2,5 +2,6 @@ sources := \ ttcn/FixedAccessInformationServiceAPI_Pics.ttcn \ ttcn/FixedAccessInformationServiceAPI_Pixits.ttcn \ ttcn/FixedAccessInformationServiceAPI_Templates.ttcn \ + ttcn/FixedAccessInformationServiceAPI_Functions.ttcn \ ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn diff --git a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Functions.ttcn b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Functions.ttcn new file mode 100644 index 0000000..3ce305c --- /dev/null +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Functions.ttcn @@ -0,0 +1,342 @@ +module FixedAccessInformationServiceAPI_Functions { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + import from LibCommon_Time all; + import from LibCommon_VerdictControl all; + import from LibCommon_Sync all; + + // LibHttp + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec/FixedAccessInformationServiceAPI + import from FixedAccessInformationServiceAPI_TypesAndValues all; + import from FixedAccessInformationServiceAPI_Templates all; + import from FixedAccessInformationServiceAPI_Pixits all; + + // LibMec + import from LibMec_Templates all; + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + function f_create_onu_alarm_subscription( + out OnuAlarmSubscription p_onu_alarm_subscription, + out charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_FAI_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_fai_onu_alarm_subscription( + m_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_onu_alarm + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_fai_onu_alarm_subscription( + mw_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI + )))))) -> value v_response { + tc_ac.stop; + + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_FAI_SUB_URI & "/(?*)", + 0 + ); + p_onu_alarm_subscription := v_response.response.body.json_body.onuAlarmSubscription; + log("f_create_onu_alarm_subscription: INFO: IUT successfully responds to the subscription: ", p_onu_alarm_subscription); + log("f_create_onu_alarm_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_onu_alarm_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_onu_alarm_subscription + + function f_delete_onu_alarm_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & p_subscription_id, + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_onu_alarm_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_onu_alarm_subscription + + function f_create_dev_info_subscription( + out DevInfoSubscription p_dev_info_subscription, + out charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_FAI_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_fai_dev_info_subscription( + m_dev_info_subscription( + PX_DEV_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_dev_info + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_fai_onu_alarm_subscription( + mw_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI + )))))) -> value v_response { + tc_ac.stop; + + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_FAI_SUB_URI & "/(?*)", + 0 + ); + p_dev_info_subscription := v_response.response.body.json_body.devInfoSubscription; + log("f_create_dev_info_subscription: INFO: IUT successfully responds to the subscription: ", p_dev_info_subscription); + log("f_create_dev_info_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_onu_alarm_suf_create_dev_info_subscriptionbscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_dev_info_subscription + + function f_delete_dev_info_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & p_subscription_id, + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_dev_info_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_dev_info_subscription + + function f_create_cm_conn_subscription( + out CmConnSubscription p_cm_conn_subscription, + out charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_FAI_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_fai_cm_conn_subscription( + m_cm_conn_subscription( + PX_CM_CONN_SUB_CALLBACK_URI + //m_filter_criteria_dev_info + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_fai_onu_alarm_subscription( + mw_onu_alarm_subscription( + PX_CM_CONN_SUB_CALLBACK_URI + )))))) -> value v_response { + tc_ac.stop; + + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_FAI_SUB_URI & "/(?*)", + 0 + ); + p_cm_conn_subscription := v_response.response.body.json_body.cmConnSubscription; + log("f_create_cm_conn_subscription: INFO: IUT successfully responds to the subscription: ", p_cm_conn_subscription); + log("f_create_cm_conn_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_onu_alarm_suf_create_cm_conn_subscriptionbscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_cm_conn_subscription + + function f_delete_cm_conn_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & p_subscription_id, + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_cm_conn_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_cm_conn_subscription + + function f_create_ani_alarm_subscription( + out AniAlarmSubscription p_ani_alarm_subscription, + out charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_FAI_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_fai_ani_alarm_subscription( + m_ani_alarm_subscription( + PX_ANI_ALARM_SUB_CALLBACK_URI + //m_filter_criteria_ani_alarm + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_fai_ani_alarm_subscription( + mw_ani_alarm_subscription( + PX_ANI_ALARM_SUB_CALLBACK_URI + )))))) -> value v_response { + tc_ac.stop; + + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_FAI_SUB_URI & "/(?*)", + 0 + ); + p_ani_alarm_subscription := v_response.response.body.json_body.aniAlarmSubscription; + log("f_create_ani_alarm_subscription: INFO: IUT successfully responds to the subscription: ", p_ani_alarm_subscription); + log("f_create_ani_alarm_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_ani_alarm_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_ani_alarm_subscription + + function f_delete_ani_alarm_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & p_subscription_id, + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_ani_alarm_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_ani_alarm_subscription + +} // End of module FixedAccessInformationServiceAPI_Functions \ No newline at end of file diff --git a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pixits.ttcn b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pixits.ttcn index 183a6d9..28872c3 100644 --- a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pixits.ttcn +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pixits.ttcn @@ -6,10 +6,6 @@ module FixedAccessInformationServiceAPI_Pixits { // LibMec_FixedAccessInformationServiceAPI import from FixedAccessInformationServiceAPI_TypesAndValues all; - modulepar GatewayIdList PX_FAI_GW_ID := { "" }; - - modulepar GatewayIdList PX_NON_EXISTING_FAI_GW_ID := { "" }; - modulepar Json.String PX_FAI_CM_ID := ""; modulepar Json.String PX_NON_EXISTING_FAI_CM_ID := ""; @@ -18,12 +14,22 @@ module FixedAccessInformationServiceAPI_Pixits { modulepar Json.String PX_NON_EXISTING_FAI_ONU_ID := ""; + modulepar Json.String PX_FAI_GW_ID := ""; + + modulepar Json.String PX_NON_EXISTING_FAI_GW_ID := ""; + modulepar Json.String PX_FAI_SUB_ID := ""; modulepar Json.String PX_NON_EXISTING_FAI_SUB_ID := ""; modulepar Json.AnyURI PX_ONU_ALARM_SUB_CALLBACK_URI := ""; + modulepar Json.AnyURI PX_DEV_ALARM_SUB_CALLBACK_URI := ""; + + modulepar Json.AnyURI PX_CM_CONN_SUB_CALLBACK_URI := ""; + + modulepar Json.AnyURI PX_ANI_ALARM_SUB_CALLBACK_URI := ""; + modulepar Json.String PX_SUBSCRIPTION_ID := ""; modulepar Json.String PX_NON_EXISTENT_SUBSCRIPTION_ID := ""; diff --git a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Templates.ttcn b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Templates.ttcn index a5dfa5a..b97c9aa 100644 --- a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Templates.ttcn +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Templates.ttcn @@ -226,14 +226,14 @@ module FixedAccessInformationServiceAPI_Templates { subscriptionType := "BadSubscriptionType" } // End of template m_onu_alarm_subscription_bad_request - template OnuAlarmSubscription mw_onu_alarm_subscription( - template (present) Json.AnyURI p_callbackReference := ?, - template (present) FilterCriteriaOnuAlarm p_filterCriteriaOnuAlarm := ?, - template Links p_links := *, - template Json.Bool p_requestTestNotification := *, - template WebsockNotifConfig p_websockNotifConfig := *, - template TimeStamp p_expiryDeadline := * - ) := { + template (present) OnuAlarmSubscription mw_onu_alarm_subscription( + template (present) Json.AnyURI p_callbackReference := ?, + template (present) FilterCriteriaOnuAlarm p_filterCriteriaOnuAlarm := ?, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { subscriptionType := "OnuAlarmSubscription", callbackReference := p_callbackReference, requestTestNotification := p_requestTestNotification, @@ -263,4 +263,162 @@ module FixedAccessInformationServiceAPI_Templates { alarms := p_alarms } // End of template mw_filter_criteria_onu_alarm + template (omit) DevInfoSubscription m_dev_info_subscription( + in template (value) Json.AnyURI p_callbackReference, + in template (value) FilterCriteriaDevInfo p_filterCriteriaDevInfo, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "DevInfoSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaDevInfo := p_filterCriteriaDevInfo, + expiryDeadline := p_expiryDeadline + } // End of template m_dev_info_subscription + + template (present) DevInfoSubscription mw_dev_info_subscription( + template (present) Json.AnyURI p_callbackReference := ?, + template (present) FilterCriteriaDevInfo p_filterCriteriaDevInfo := ?, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "DevInfoSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaDevInfo := p_filterCriteriaDevInfo, + expiryDeadline := p_expiryDeadline + } // End of template mw_dev_info_subscription + + template (omit) FilterCriteriaDevInfo m_filter_criteria_dev_info( + in template (value) GatewayIdList p_gwId := { PX_FAI_GW_ID }, + in template (omit) DeviceIdList p_deviceId := omit, + in template (omit) DeviceErrStatus p_deviceErrStatus := omit + ) := { + gwId := p_gwId, + deviceId := p_deviceId, + deviceErrStatus := p_deviceErrStatus + } // End of template m_filter_criteria_dev_info + + template (present) FilterCriteriaDevInfo mw_filter_criteria_dev_info( + template (present) GatewayIdList p_gwId := ?, + template DeviceIdList p_deviceId := *, + template DeviceErrStatus p_deviceErrStatus := * + ) := { + gwId := p_gwId, + deviceId := p_deviceId, + deviceErrStatus := p_deviceErrStatus + } // End of template mw_filter_criteria_dev_info + + template (omit) CmConnSubscription m_cm_conn_subscription( + in template (value) Json.AnyURI p_callbackReference, + in template (omit) FilterCriteriaCmConn p_filterCriteriaCmConn := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "CmConnSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaCmConn := p_filterCriteriaCmConn, + expiryDeadline := p_expiryDeadline + } // End of template m_cm_conn_subscription + + template (present) CmConnSubscription mw_cm_conn_subscription( + template (present) Json.AnyURI p_callbackReference := ?, + template FilterCriteriaCmConn p_filterCriteriaCmConn := *, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "CmConnSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaCmConn := p_filterCriteriaCmConn, + expiryDeadline := p_expiryDeadline + } // End of template mw_cm_conn_subscription + + template (omit) FilterCriteriaCmConn m_filter_criteria_cm_conn( + in template (omit) CpInfo p_customerPremisesInfo := omit, + in template (omit) CmIf p_cmIf := omit + ) := { + customerPremisesInfo := p_customerPremisesInfo, + cmIf := p_cmIf + } // End of template m_filter_criteria_cm_conn + + template FilterCriteriaCmConn mw_filter_criteria_cm_conn( + template CpInfo p_customerPremisesInfo := *, + template CmIf p_cmIf := * + ) := { + customerPremisesInfo := p_customerPremisesInfo, + cmIf := p_cmIf + } // End of template mw_filter_criteria_cm_conn + + template (omit) AniAlarmSubscription m_ani_alarm_subscription( + in template (value) Json.AnyURI p_callbackReference, + in template (omit) FilterCriteriaAniAlarm p_filterCriteriaAniAlarm := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "AniAlarmSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaAniAlarm := p_filterCriteriaAniAlarm, + expiryDeadline := p_expiryDeadline + } // End of template m_ani_alarm_subscription + + template (present) AniAlarmSubscription mw_ani_alarm_subscription( + template (present) Json.AnyURI p_callbackReference := ?, + template FilterCriteriaAniAlarm p_filterCriteriaAniAlarm := *, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "AniAlarmSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaAniAlarm := p_filterCriteriaAniAlarm, + expiryDeadline := p_expiryDeadline + } // End of template mw_ani_alarm_subscription + + template (omit) FilterCriteriaAniAlarm m_filter_criteria_ani_alarm( + in template (value) OnuIds p_onuId, + in template (value) AniId p_aniId, + in template (omit) CpInfo p_customerPremisesInfo := omit + ) := { + customerPremisesInfo := p_customerPremisesInfo, + onuId := p_onuId, + aniId := p_aniId + } // End of template m_filter_criteria_ani_alarm + + template (present) FilterCriteriaAniAlarm mw_filter_criteria_ani_alarm( + template (present) OnuIds p_onuId := ?, + template (present) AniId p_aniId := ?, + template CpInfo p_customerPremisesInfo := * + ) := { + customerPremisesInfo := p_customerPremisesInfo, + onuId := p_onuId, + aniId := p_aniId + } // End of template mw_filter_criteria_ani_alarm + } // End of module FixedAccessInformationServiceAPI_Templates diff --git a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn index de9f30a..2145c5c 100644 --- a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn @@ -471,7 +471,7 @@ module FixedAccessInformationServiceAPI_TypesAndValues { Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, Links links optional, - FilterCriteriaCmConn filterCriteriaCmConn, + FilterCriteriaCmConn filterCriteriaCmConn, TimeStamp expiryDeadline optional } with { variant (links) "name as '_links'"; @@ -561,13 +561,13 @@ module FixedAccessInformationServiceAPI_TypesAndValues { * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.6-1: Attributes of the AniAlarmSubscription */ type record AniAlarmSubscription { - Json.String subscriptionType, - Json.AnyURI callbackReference optional, - Json.Bool requestTestNotification optional, - WebsockNotifConfig websockNotifConfig optional, - Links links optional, + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, FilterCriteriaAniAlarm filterCriteriaAniAlarm, - TimeStamp expiryDeadline optional + TimeStamp expiryDeadline optional } with { variant (links) "name as '_links'"; } diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index 7aa9929..8bda338 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -82,15 +82,15 @@ module LibMec_Pixits { modulepar charstring PX_ME_APP_SUPPORT_TIMING_CAPS_URI := "mec_app_support/v2/timing/timing_caps"; - modulepar charstring PX_FAI_FA_INFO_URI := "fai/v1/fa_info"; + modulepar charstring PX_FAI_FA_INFO_URI := "fai/v1/queries/fa_info"; - modulepar charstring PX_FAI_DEVICE_INFO_URI:= "fai/v1/device_info"; + modulepar charstring PX_FAI_DEVICE_INFO_URI:= "fai/v1/queries/device_info"; - modulepar charstring PX_FAI_CABLE_LINE_INFO_URI := "fai/v1/cable_line_info"; + modulepar charstring PX_FAI_CABLE_LINE_INFO_URI := "fai/v1/queries/cable_line_info"; - modulepar charstring PX_FAI_OPTICAL_NW_INFO_URI := "fai/v1/optical_network_info"; + modulepar charstring PX_FAI_OPTICAL_NW_INFO_URI := "fai/v1/queries/optical_network_info"; - modulepar charstring PX_FAI_SUB_URI := "fai/v1/optical_network_info"; + modulepar charstring PX_FAI_SUB_URI := "ai/v1/subscriptions"; modulepar charstring PX_UE_ZONAL_TRAF_SUB_URI := "fai/v1/optical_network_info"; diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index 24c1189..373d25b 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -144,6 +144,9 @@ module LibHttp_JsonMessageBodyTypes { CableLineInfo cableLineInfo, PonInfo ponInfo, OnuAlarmSubscription onuAlarmSubscription, + DevInfoSubscription devInfoSubscription, + CmConnSubscription cmConnSubscription, + AniAlarmSubscription aniAlarmSubscription, FixedAccessInformationServiceAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList_fai, UuUnicastProvisioningInfo uuUnicastProvisioningInfo, UuMbmsProvisioningInfo uuMbmsProvisioningInfo, diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn index 3f31307..71dc97c 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -1494,17 +1494,53 @@ module LibHttp_JsonTemplates { subscriptionLinkList_fai := p_subscriptionLinkList } // End of template mw_body_json_fai_subscription_link_list - template (value) JsonBody m_body_json_fai_onu_alarm_subscription_link_list( - in template (value) OnuAlarmSubscription p_onuAlarmSubscription + template (value) JsonBody m_body_json_fai_onu_alarm_subscription( + in template (value) OnuAlarmSubscription p_onuAlarmSubscription ) := { onuAlarmSubscription := p_onuAlarmSubscription - } // End of template m_body_json_fai_onu_alarm_subscription_link_list + } // End of template m_body_json_fai_onu_alarm_subscription - template (present) JsonBody mw_body_json_fai_onu_alarm_subscription_link_list( - template (present) OnuAlarmSubscription p_onuAlarmSubscription := ? + template (present) JsonBody mw_body_json_fai_onu_alarm_subscription( + template (present) OnuAlarmSubscription p_onuAlarmSubscription := ? ) := { onuAlarmSubscription := p_onuAlarmSubscription - } // End of template mw_body_json_fai_onu_alarm_subscription_link_list + } // End of template mw_body_json_fai_onu_alarm_subscription + + template (value) JsonBody m_body_json_fai_dev_info_subscription( + in template (value) DevInfoSubscription p_devInfoSubscription + ) := { + devInfoSubscription := p_devInfoSubscription + } // End of template m_body_json_fai_dev_info_subscription + + template (present) JsonBody mw_body_json_fai_dev_info_subscription( + template (present) DevInfoSubscription p_devInfoSubscription := ? + ) := { + devInfoSubscription := p_devInfoSubscription + } // End of template mw_body_json_fai_dev_info_subscription + + template (value) JsonBody m_body_json_fai_cm_conn_subscription( + in template (value) CmConnSubscription p_cmConnSubscription + ) := { + cmConnSubscription := p_cmConnSubscription + } // End of template m_body_json_fai_cm_conn_subscription + + template (present) JsonBody mw_body_json_fai_cm_conn_subscription( + template (present) CmConnSubscription p_cmConnSubscription := ? + ) := { + cmConnSubscription := p_cmConnSubscription + } // End of template mw_body_json_fai_cm_conn_subscription + + template (value) JsonBody m_body_json_fai_ani_alarm_subscription( + in template (value) AniAlarmSubscription p_aniAlarmSubscription + ) := { + aniAlarmSubscription := p_aniAlarmSubscription + } // End of template m_body_json_fai_ani_alarm_subscription + + template (present) JsonBody mw_body_json_fai_ani_alarm_subscription( + template (present) AniAlarmSubscription p_aniAlarmSubscription := ? + ) := { + aniAlarmSubscription := p_aniAlarmSubscription + } // End of template mw_body_json_fai_ani_alarm_subscription } // End of group fai -- GitLab From c38af3d5954545fc6114204ae16d7168854623f1 Mon Sep 17 00:00:00 2001 From: garciay Date: Wed, 7 Feb 2024 11:37:36 +0100 Subject: [PATCH 51/58] TTF T027: Finalyze review MEC-021 --- ...pplicationMobiltyServiceAPI_TestCases.ttcn | 3183 +++++++++-------- ...licationMobiltyServiceAPI_TestControl.ttcn | 46 + ttcn/LibMec/Ams_ToBeRemoved/module.mk | 7 - .../ttcn/Ams_EncdecDeclarations.ttcn | 22 - .../LibMec/Ams_ToBeRemoved/ttcn/Ams_Pics.ttcn | 8 - .../Ams_ToBeRemoved/ttcn/Ams_Pixits.ttcn | 27 - .../Ams_ToBeRemoved/ttcn/Ams_Templates.ttcn | 267 -- .../ttcn/Ams_TypesAndValues.ttcn | 539 --- ...plicationMobilityServiceAPI_Functions.ttcn | 337 ++ .../ApplicationMobilityServiceAPI_Pixits.ttcn | 15 +- ...plicationMobilityServiceAPI_Templates.ttcn | 282 +- ...tionMobilityServiceAPI_TypesAndValues.ttcn | 26 +- ttcn/LibMec/ttcn/LibMec_Pixits.ttcn | 4 +- .../ttcn/LibHttp_JsonMessageBodyTypes.ttcn | 12 +- .../ttcn/LibHttp_JsonTemplates.ttcn | 134 +- 15 files changed, 2432 insertions(+), 2477 deletions(-) delete mode 100644 ttcn/LibMec/Ams_ToBeRemoved/module.mk delete mode 100644 ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_EncdecDeclarations.ttcn delete mode 100644 ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_Pics.ttcn delete mode 100644 ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_Pixits.ttcn delete mode 100644 ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_Templates.ttcn delete mode 100644 ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_TypesAndValues.ttcn diff --git a/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestCases.ttcn b/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestCases.ttcn index 485c9ac..931930f 100644 --- a/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestCases.ttcn +++ b/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestCases.ttcn @@ -11,7 +11,10 @@ */ module AtsMec_ApplicationMobiltyServiceAPI_TestCases { - // Libcommon + // JSON + import from Json all; + + // Libcommon import from LibCommon_BasicTypesAndValues all; import from LibCommon_Sync all; @@ -23,7 +26,9 @@ import from LibHttp_TestSystem all; // LibMec_ApplicationMobiltyServiceAPI + import from ApplicationMobilityServiceAPI_TypesAndValues all; import from ApplicationMobilityServiceAPI_Templates all; + import from ApplicationMobilityServiceAPI_Functions all; import from ApplicationMobilityServiceAPI_Pics all; import from ApplicationMobilityServiceAPI_Pixits all; @@ -36,263 +41,55 @@ group appMobilityServices { - /** - * @desc Check that the AMS service returns information about the registered application mobility services when requested - * @see ETSI GS MEC 021 2.1.1, clause 8.3.3.1 - */ - // testcase TC_MEC_MEC012_SRV_AMS_001_OK() runs on HttpComponent system HttpTestAdapter { - // // Local variables - // var Headers v_headers; - // var HttpMessage v_response; - - // // Test control - // if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - // log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - // setverdict(inconc); - // stop; - // } - - // // Test component configuration - // f_cf_01_http_up(); - - // // Preamble - // f_init_default_headers_list(-, -, v_headers); - // httpPort.send( - // m_http_request( - // m_http_request_get( - // "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI, - // v_headers - // ))); - // f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // // Test Body - // tc_ac.start; - // alt { - // [] httpPort.receive( - // mw_http_response( - // mw_http_response_ok( - // mw_http_message_body_json( - // mw_body_json_app_mobility_service_info( - // mw_app_mobility_service_info( - // { - // mw_app_mobility_registration_info( - // mw_service_consumer_id( - // PX_APP_INS_ID, - // PX_MEP_ID - // ) - // ) - // } - // )))))) -> value v_response { - // tc_ac.stop; - - // if (f_check_headers(valueof(v_response.response.header)) == true) { - // log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppTerminationNotificationSubscription ***"); - // f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - // } else { - // log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); - // f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - // } - // } - // [] tc_ac.timeout { - // log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - // f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - // } - // } // End of 'alt' statement - // } // End of testcase TC_MEC_MEC012_SRV_AMS_001_OK - - /** - * @desc Check that the AMS service returns an error when receives a query about a registered application mobility service with wrong parameters - * @see ETSI GS MEC 021 2.1.1, clause 8.3.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "?appMobilityService=" & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, - -, - 400 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC012_SRV_AMS_001_BR - - - /** - * @desc Check that the AMS service creates a new application mobility services when requested - * @see ETSI GS MEC 021 2.1.1, clause 8.3.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_002_OK() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI, - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_info( - m_registration_info( - PX_APP_MOBILITY_SERVICE_ID, - m_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_app_mobility_service_info( - mw_app_mobility_service_info( - mw_registration_info( - mw_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ), - PX_APP_MOBILITY_SERVICE_ID - ) - ) - ) - ) - ) - ) - - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo and status code set to 201 Created ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_002_OK - - /** - * @desc Check that the AMS service sends an error when it receives a malformed request to create a new application mobility service - * @see ETSI GS MEC 021 2.1.1, clause 8.3.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_002_BR() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI, - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_info( - m_registration_info( - PX_APP_MOBILITY_SERVICE_ID, - m_service_consumer_error( - PX_APP_INS_ID, - - - ) - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - ) - ) - ) - ) - ) - ) - { + /** + * @desc Check that the AMS service returns information about the registered application mobility services when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(-, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_registration_info_list( + { + *, + v_registration_info_1, + v_registration_info_2, + * + } + ))))) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a Problem Details when bad request is performed ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of RegistrationInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -300,1087 +97,1723 @@ f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC012_SRV_AMS_002_BR - } // End of group appMobilityServices - - - group individualAppMobilityService{ - - /** - * @desc Check that the AMS service returns information about this individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_011_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_app_mobility_service_info( - mw_app_mobility_service_info( - -, - PX_APP_MOBILITY_SERVICE_ID - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_011_OK - - /** - * @desc Check that the AMS service sends an error when receives a query about a not existing individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_011_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; + + // Postamble + f_delete_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_001_OK_01 + + /** + * @desc Check that the AMS service returns information about the a specific registered application mobility service when requested - filter + */ + testcase TC_MEC_MEC021_SRV_AMS_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(-, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI & "?filter=(eq,appMobilityServiceId," & v_registration_info_1.appMobilityServiceId & ")", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_registration_info_list( + { + *, + v_registration_info_1, + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of RegistrationInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - ))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC012_SRV_AMS_011_NF - - - - /** - * @desc Check that the AMS service modifies the individual application mobility service when requested - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_012_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_info( - m_registration_info( - PX_APP_MOBILITY_SERVICE_ID, - m_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ) - ) - ) - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_app_mobility_service_info( - mw_app_mobility_service_info({ - *, - mw_app_mobility_registration_info( - mw_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ), - *}, - - - ) - ) - ) - ))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_012_OK - - /** - * @desc Check that the AMS service sends an error when receives a request to modify a not existing individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_012_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; + } // End of 'alt' statement + + // Postamble + f_delete_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_001_OK_02 + + /** + * @desc Check that the AMS service returns information about the a specific registered application mobility service when requested - filter + */ + testcase TC_MEC_MEC021_SRV_AMS_001_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(-, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI & "?filter=(eq,serviceConsumerId[appInstanceId]," & PX_APP_INS_ID_2 & ")", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_registration_info_list( + { + *, + v_registration_info_2, + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of RegistrationInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_info( - m_registration_info( - PX_APP_MOBILITY_SERVICE_ID, - m_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ) - ) - ) - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - ))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC012_SRV_AMS_012_NF - - /** - * @desc Check that the AMS service sends an error when receives a request to modify a individual application mobility service using bad parameters - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_012_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_request( - m_registration_info( - PX_APP_MOBILITY_SERVICE_ID, - m_service_consumer_id_with_error( - PX_APP_INS_ID, - - - ), - -, - - - ) - ) - ) - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - ))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC012_SRV_AMS_012_BR - - - /** - * @desc Check that the AMS service de-register the individual application mobility service and delete the resource - * that represents the individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.5 - */ - testcase TC_MEC_MEC012_SRV_AMS_013_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; + } // End of 'alt' statement + + // Postamble + f_delete_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_001_OK_03 + + /** + * @desc Check that the AMS service returns information about the a specific registered application mobility service when requested - exclude_fields + */ + testcase TC_MEC_MEC021_SRV_AMS_001_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(-, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI & "?filter=(eq,appMobilityServiceId," & v_registration_info_1.appMobilityServiceId & "&exclude_fields=[deviceInformation])", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_registration_info_list( + { + *, + mw_registration_info( + v_registration_info_1.appMobilityServiceId, + mw_service_consumer_id( + PX_APP_INS_ID, + PX_MEP_ID + )), + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of RegistrationInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content( - ))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 204 No Content ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_013_OK - - /** - * @desc Check that the AMS service sends an error when is requested to delete the resource - * that represents the individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.5 - */ - testcase TC_MEC_MEC012_SRV_AMS_013_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - ))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC012_SRV_AMS_013_NF - - } - - group appMobilityServiceDeregisterTask { - - /** - * @desc Check that the AMS service deregister an individual application mobility service on expiry of the timer associated with the service - * @see ETSI GS MEC 021 2.0.10, clause 8.5.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_014_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; + } // End of 'alt' statement + + // Postamble + f_delete_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_001_OK_04 + + /** + * @desc Check that the AMS service returns information about the registered application mobility services when requested - No registered application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_001_OK_05() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok_no_body + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an empty body ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")) & "/deregisterTask", - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_app_mobility_service_info( - mw_app_mobility_service_info({ - *, - mw_app_mobility_registration_info( - mw_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ), - *}, - - - ) - ) - ) - ))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_014_OK - - /** - * @desc Check that the AMS service send an error when is requested to deregister a not existent individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.5.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_014_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")) & "/deregisterTask", - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - ))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_012_OK - - - } - - group appMobilityServicesSubscriptions { + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_001_OK_05 + + /** + * @desc Check that the AMS service returns an error when receives a query about a registered application mobility service with wrong parameters + */ + testcase TC_MEC_MEC021_SRV_AMS_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(-, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI & "?appMobilityService=" & "?filter=(appMobilityServiceId,eq," & v_registration_info_1.appMobilityServiceId & ")", // Wrong syntax + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_problem_details( + mw_problem_details( + -, + -, + 400 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_001_BR + + /** + * @desc Check that the AMS service creates a new application mobility services when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var Json.String v_app_mobility_service_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_URI, + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + m_registration_info( + -, + m_service_consumer_id( + PX_APP_INS_ID + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_ams_registration_info( + mw_registration_info( + ?, + mw_service_consumer_id( + PX_APP_INS_ID + ))))))) -> value v_response { + tc_ac.stop; + + v_app_mobility_service_id := v_response.response.body.json_body.registrationInfo.appMobilityServiceId; + log("*** " & testcasename() & ": PASS: IUT successfully responds with a v_app_mobility_service_id ", v_app_mobility_service_id, " ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_application_mobility_services(v_app_mobility_service_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_002_OK + + /** + * @desc Check that the AMS service sends an error when it receives a malformed request to create a new application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_002_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var Json.String v_app_mobility_service_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_URI, + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + m_registration_info( + PX_APP_INS_ID, // Wrong field value: Shall be absent in POST requests, and present otherwise + m_service_consumer_id( + PX_APP_INS_ID + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_problem_details( + mw_problem_details( + -, -, 400 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Problem Details when bad request is performed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_002_BR + + } // End of group appMobilityServices + + group appMobilityServicesSubscriptions { + + /** + * @desc Check that the AMS service returns information about the available subscriptions when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionType=" & v_mobility_procedure_subscription.subscriptionType, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_subscriptions( + mw_subscription_link_list( + v_mobility_procedure_subscription.links, + mw_subscription( + -, + v_mobility_procedure_subscription.subscriptionType + ))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of subscriptions type MobilityProcedureSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // END TC_MEC_MEC021_SRV_AMS_003_OK + + /** + * @desc Check that the AMS service sends an error when it receives a malformed query about the available subscriptions + */ + testcase TC_MEC_MEC021_SRV_AMS_003_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionType=info_app_adj", // Wrong parameter + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // END TC_MEC_MEC021_SRV_AMS_003_BR + + /** + * @desc Check that the AMS service creates a notification subscriptions when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_ams_mobility_procedure_subscription( + m_mobility_procedure_subscription( + PX_CALLBACK_REFERENCE, + m_filter_criteria + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_ams_mobility_procedure_subscription( + mw_mobility_procedure_subscription( + PX_CALLBACK_REFERENCE, + mw_filter_criteria, + mw_links + )))))) -> value v_response { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_ME_APP_AMS_SUBS & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AMS Subscription and 201 Created status code, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_004_OK + + /** + * @desc Check that the AMS service sends an error when it receives a malformed request to create a notification subscription + */ + testcase TC_MEC_MEC021_SRV_AMS_004_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_ams_mobility_procedure_subscription( + m_mobility_procedure_subscription_error( + PX_CALLBACK_REFERENCE, + m_filter_criteria + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_004_BR + + /** + * @desc Check that the AMS service returns information about a given subscription when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_mobility_procedure_subscription( + v_mobility_procedure_subscription + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_005_OK + + /** + * @desc Check that the AMS service returns an error when receives a query about a not existing subscription + */ + testcase TC_MEC_MEC021_SRV_AMS_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_005_NF + + /** + * @desc Check that the AMS service deletes a given subscription when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_006_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_006_OK - /** - * @desc Check that the AMS service returns information about the available subscriptions when requested. - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.6.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_003_OK() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; + /** + * @desc Check that the AMS service sends an error when it receives a delete request for a not existing subscription + */ + testcase TC_MEC_MEC021_SRV_AMS_006_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_006_NF + + /** + * @desc Check that the AMS service modifies a given subscription when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_007_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_ams_mobility_procedure_subscription( + m_mobility_procedure_subscription( + PX_CALLBACK_REFERENCE, + m_filter_criteria( + PX_APP_INS_ID + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_mobility_procedure_subscription( + m_mobility_procedure_subscription( + PX_CALLBACK_REFERENCE, + m_filter_criteria( + PX_APP_INS_ID + ))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates successfully the subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_007_OK + + /** + * @desc Check that the AMS service sends an error when it receives a malformed modify request for a given subscription + */ + testcase TC_MEC_MEC021_SRV_AMS_007_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_ams_mobility_procedure_subscription( + m_mobility_procedure_subscription_error( + PX_CALLBACK_REFERENCE, + m_filter_criteria( + PX_APP_INS_ID + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_007_BR + + /** + * @desc Check that the AMS service sends an error when it receives a modify request for a not existing subscription + */ + testcase TC_MEC_MEC021_SRV_AMS_007_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers, + m_http_message_body_json( + m_body_json_ams_mobility_procedure_subscription( + m_mobility_procedure_subscription( + PX_CALLBACK_REFERENCE, + m_filter_criteria( + PX_APP_INS_ID + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_007_NF + + } // End of group appMobilityServicesSubscriptions + + group ams_notifications { + + /** + * @desc Check that the AMS service sends an AMS notification about a mobility procedure if the AMS service has an associated subscription and the event is generated + */ + testcase TC_MEC_MEC021_SRV_AMS_008_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + action("Trigger a mobility procedure event"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_mobility_procedure_notification( + mw_mobility_procedure_notification( + v_mobility_procedure_subscription.links + )))))) { + tc_wait.stop; + + // Send 204 No Content + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully sends mobility procedure notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_wait.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of TC_MEC_MEC021_SRV_AMS_008_OK + + /** + * @desc Check that the AMS service sends an AMS notification about adjacent application instances if the AMS service has an associated subscription and the event is generated + */ + testcase TC_MEC_MEC021_SRV_AMS_009_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AdjacentAppInfoSubscription v_adjacent_appInfo_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Preamble + f_create_adjacent_appInfo_subscription(v_adjacent_appInfo_subscription, v_subscription_id); + action("Trigger a mobility procedure event"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_adjacent_app_info_notification( + mw_adjacent_app_info_notification( + v_adjacent_appInfo_subscription.links + )))))) { + tc_wait.stop; + + // Send 204 No Content + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully sends adjacent appInfo notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_wait.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_adjacent_appInfo_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of TC_MEC_MEC021_SRV_AMS_009_OK + + /** + * @desc Check that the AMS service sends an AMS notification on subscription expiration if the AMS service has an associated subscription and the event is generated + */ + testcase TC_MEC_MEC021_SRV_AMS_010_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + action("Trigger a mobility procedure event"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_mobility_procedure_notification( + mw_mobility_procedure_notification( + v_mobility_procedure_subscription.links + )))))) { + tc_wait.stop; + + // Send 204 No Content + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); + + log("*** " & testcasename() & ": INFO: IUT successfully sends mobility procedure notification ***"); + repeat; } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - //@TODO: How can we convert enums in strings? - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionType=" & int2str(enum2int(PX_SUBSCRIPTION_TYPE)), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_ams_subscriptions( - mw_ams_subscription( - PX_SUBSCRIPTION_TYPE, - -, - -, - -, - - - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of subscriptions type MobilityProcedureSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // END TC_MEC_MEC012_SRV_AMS_003_OK - - /** - * @desc Check that the AMS service sends an error when it receives a malformed query about the available subscriptions - * @see ETSI GS MEC 021 2.1.1, clause 8.6.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_003_BR() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_expire_notification( + mw_expire_notification + ))))) { + tc_wait.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully sends expiry notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } + [] tc_wait.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + } // End of TC_MEC_MEC021_SRV_AMS_009_OK + + } // End of group ams_notifications + + group individualAppMobilityService { - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionTyp=" & int2str(enum2int(PX_SUBSCRIPTION_TYPE)), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + /** + * @desc Check that the AMS service returns information about this individual application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_011_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(v_registration_info_1.appMobilityServiceId, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_registration_info( + v_registration_info_1 + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a the correct RegistrationInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // END of TC_MEC_MEC012_SRV_AMS_003_BR - - /** - * @desc Check that the AMS service creates a notification subscriptions when requested. - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.6.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_004_OK() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS, - v_headers, - m_http_message_body_json( - m_body_json_ams_subscriptions( - m_ams_subscription( - PX_SUBSCRIPTION_TYPE, - PX_CALLBACK_REFERENCE, - -, - -, - - - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_ams_subscriptions( - mw_ams_subscription( - PX_SUBSCRIPTION_TYPE, - PX_CALLBACK_REFERENCE, - -, - -, - - - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AMS Subscription and 201 Created status code ***"); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_011_OK + + /** + * @desc Check that the AMS service sends an error when receives a query about a not existing individual application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_011_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_004_OK - - /** - * @desc Check that the AMS service sends an error when it receives a malformed request to create a notification subscription - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.6.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_004_BR() runs on HttpComponent system HttpTestAdapter { + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_011_NF + + /** + * @desc Check that the AMS service modifies the individual application mobility service when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_012_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - - + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + v_registration_info_1.serviceConsumerId.appInstanceId := PX_APP_INS_ID_NEW; f_init_default_headers_list(-, -, v_headers); httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS, - v_headers, - m_http_message_body_json( - m_body_json_ams_subscriptions( - m_ams_subscription_error( - PX_SUBSCRIPTION_TYPE, - PX_CALLBACK_REFERENCE, - -, - -, - - - ) - ) - ) - ) - ) - ); + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(v_registration_info_1.appMobilityServiceId, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + v_registration_info_1 + ))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - ) - ) - ) - ) - ) - ) - { + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_registration_info( + v_registration_info_1 + ))))) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a Problem Details and 400 Bad request status code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + log("*** " & testcasename() & ": PASS: IUT successfully updates with a the correct RegistrationInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_004_BR - - /** - * @desc Check that the AMS service returns information about a given subscription when requested. - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_005_OK() runs on HttpComponent system HttpTestAdapter { + + // Postamble + f_delete_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_012_OK + + /** + * @desc Check that the AMS service sends an error when receives a request to modify a individual application mobility service using bad parameters + */ + testcase TC_MEC_MEC021_SRV_AMS_012_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + var Json.String v_appMobilityServiceId; + + // Test control if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - - + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + v_appMobilityServiceId := v_registration_info_1.appMobilityServiceId; f_init_default_headers_list(-, -, v_headers); httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), - v_headers - ) - ) - ); + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(v_registration_info_1.appMobilityServiceId, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + v_registration_info_1 + ))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_ams_subscriptions( - mw_ams_subscription(PX_SUBSCRIPTION_TYPE, -, -, -, -) - ) - ) - ) - ) - ) - { + mw_http_response( + mw_http_response_400_bad_request + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of subscriptions type MobilityProcedureSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + log("*** " & testcasename() & ": PASS: IUT successfully updates with a the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_005_OK - - /** - * @desc Check that the AMS service returns an error when receives a query about a not existing subscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_005_NF() runs on HttpComponent system HttpTestAdapter { + + // Postamble + f_delete_application_mobility_services(v_appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_012_BR + + /** + * @desc Check that the AMS service sends an error when receives a request to modify a not existing individual application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_012_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - - + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + v_registration_info_1.serviceConsumerId.appInstanceId := PX_APP_INS_ID_NEW; f_init_default_headers_list(-, -, v_headers); httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), - v_headers - ) - ) - ); + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + v_registration_info_1 + ))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 404 - ) - ) - ) - ) - ) - ) - { + mw_http_response( + mw_http_response_404_not_found + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + log("*** " & testcasename() & ": PASS: IUT successfully updates with a the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_005_NF - - /** - * @desc Check that the AMS service deletes a given subscription when requested - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.5 - */ - testcase TC_MEC_MEC012_SRV_AMS_006_OK() runs on HttpComponent system HttpTestAdapter { + + // Postamble + f_delete_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_012_NF + + /** + * @desc Check that the AMS service de-register the individual application mobility service and delete the resource that represents the individual application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_013_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables var Headers v_headers; + var RegistrationInfo v_registration_info; + + // Test control if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - - + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( - m_http_request( - m_http_request_delete( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), - v_headers - ) - ) - ); + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(v_registration_info.appMobilityServiceId, "UTF-8")), + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - ) - ) - { + mw_http_response( + mw_http_response_204_no_content + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 No Content on deletion request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + log("*** " & testcasename() & ": PASS: IUT successfully deletes the RegistrationInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_006_OK - - /** - * @desc Check that the AMS service sends an error when it receives a delete request for a not existing subscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.5 - */ - testcase TC_MEC_MEC012_SRV_AMS_006_NF() runs on HttpComponent system HttpTestAdapter { + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_013_OK + + /** + * @desc Check that the AMS service sends an error when is requested to delete the resource that represents the individual application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_013_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables var Headers v_headers; + var RegistrationInfo v_registration_info; + + // Test control if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - - + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( - m_http_request( - m_http_request_delete( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), - v_headers - ) - ) - ); + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - mw_http_message_body_json( - mw_body_json_problem_details( - ) - ) - ) - ) - ) - { + mw_http_response( + mw_http_response_404_not_found + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + log("*** " & testcasename() & ": PASS: IUT successfully de-registers the RegistrationInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_013_NF + + } // End of group individualAppMobilityService - } // End of TC_MEC_MEC012_SRV_AMS_006_NF - - /** - * @desc Check that the AMS service modifies a given subscription when requested. - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_007_OK() runs on HttpComponent system HttpTestAdapter { + group appMobilityServiceDeregisterTask { + + /** + * @desc Check that the AMS service deregister an individual application mobility service on expiry of the timer associated with the service + */ + testcase TC_MEC_MEC021_SRV_AMS_014_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables var Headers v_headers; + var RegistrationInfo v_registration_info; + + // Test control if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - - + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_subscriptions( - m_ams_subscription( - PX_SUBSCRIPTION_TYPE, PX_CALLBACK_REFERENCE, -, -, - - ) - ) - ) - ) - ) - ); + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(v_registration_info.appMobilityServiceId, "UTF-8")) & "/deregisterTask", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_ams_subscriptions( - mw_ams_subscription(PX_SUBSCRIPTION_TYPE, -, -, -, -) - ) - ) - ) - ) - ) - { + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_registration_info_list( + { + *, + v_registration_info, + * + } + ))))) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully deregisters the registerInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1388,67 +1821,50 @@ f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_007_OK - - /** - * @desc Check that the AMS service sends an error when it receives a malformed modify request for a given subscription. - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_007_BR() runs on HttpComponent system HttpTestAdapter { + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_014_OK + + /** + * @desc Check that the AMS service send an error when is requested to deregister a not existent individual application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_014_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables var Headers v_headers; + var RegistrationInfo v_registration_info; + + // Test control if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - - + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_info( - m_registration_info( - PX_APP_MOBILITY_SERVICE_ID, - m_service_consumer_error(PX_APP_INS_ID, -), - -, - - - ) - ) - ) - ) - ) - ); + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")) & "/deregisterTask", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - ) - ) - ) - ) - ) - { + mw_http_response( + mw_http_response_404_not_found + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 400 Bad Request ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully deregisters the registerInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1456,61 +1872,64 @@ f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_007_BR - - /** - * @desc Check that the AMS service sends an error when it receives a modify request for a not existing subscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_007_NF() runs on HttpComponent system HttpTestAdapter { + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_014_NF + + } // End of group appMobilityServiceDeregisterTask + + group adjacentApplicationInstances { + + /** + * @desc Check that the AMS service returns information about the registered application mobility services when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_015_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables var Headers v_headers; + var AdjacentAppInstanceInfo v_adjacent_app_instance_info_1; + var AdjacentAppInstanceInfo v_adjacent_app_instance_info_2; + + // Test control if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - - + // Preamble + f_create_adjacent_app_instance_info(-, -, m_communication_interface({{ host := PX_HOST, port_ := PX_PORT }}), v_adjacent_app_instance_info_1); + f_create_adjacent_app_instance_info(PX_APP_INS_ID_2, PX_APP_ID_2, m_communication_interface({{ host := PX_HOST, port_ := PX_PORT }}), v_adjacent_app_instance_info_2); f_init_default_headers_list(-, -, v_headers); httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_subscriptions( - m_ams_subscription( - PX_SUBSCRIPTION_TYPE, PX_CALLBACK_REFERENCE, -, -, - - ) - ) - ) - ) - ) - ); + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_QUERIES_URI, + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - mw_http_message_body_json( - mw_body_json_problem_details( - ) - ) - ) - ) - ) - { + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_adjacent_app_instance_info_list( + { + *, + v_adjacent_app_instance_info_1, + v_adjacent_app_instance_info_2, + * + } + ))))) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of RegistrationInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1518,217 +1937,15 @@ f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_007_NF - - - } // End of group appMobilityServicesSubscriptions - - group ams_notifications { - - /** - * @desc Check that the AMS service sends an AMS notification about a mobility procedure if the AMS service has an associated subscription and the event is generated - * @see ETSI GS MEC 021 2.1.1, clause 7.4.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_008_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_NOTIFICATIONS)) { - log("*** " & testcasename() & ": PICS_AMS and PICS_AMS_NOTIFICATIONS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_notif_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - action("Trigger a mobility procedure event"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] httpPort_notif.receive( - mw_http_request( - mw_http_request_post( - PX_CALLBACK_URI, - -, - mw_http_message_body_json( - mw_body_json_mobility_procedure_notification( - mw_mobility_procedure_notification( - -, - PX_CALLBACK_REFERENCE, - -, - -, - - - ) - ) - ) - ) - ) - ) { - tc_wait.stop; - log("*** " & testcasename() & ": INFO: IUT successfully sends mobility procedure notification ***"); - - // Send 204 No Content - httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); - - log("*** " & testcasename() & ": PASS: IUT successfully sends mobility procedure notification ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_notif_down(); - } // End of TC_MEC_MEC012_SRV_AMS_008_OK - - /** - * @desc Check that the AMS service sends an AMS notification about adjacent application instances if the AMS service has an associated subscription and the event is generated - * @see ETSI GS MEC 021 2.1.1, clause 7.4.3 - */ - testcase TC_MEC_MEC012_SRV_AMS_009_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_NOTIFICATIONS)) { - log("*** " & testcasename() & ": PICS_AMS and PICS_AMS_NOTIFICATIONS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_notif_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - action("Trigger a adjacent application info event"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] httpPort_notif.receive( - mw_http_request( - mw_http_request_post( - PX_CALLBACK_URI, - -, - mw_http_message_body_json( - mw_body_json_adjacent_application_info_notification( - mw_adjacent_application_info_notification( - -, - PX_CALLBACK_REFERENCE, - -, - -, - - - ) - ) - ) - ) - ) - ) { - tc_wait.stop; - log("*** " & testcasename() & ": INFO: IUT successfully sends adjacent application info notification ***"); - - // Send 204 No Content - httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); - - log("*** " & testcasename() & ": PASS: IUT successfully sends adjacent application info notification ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_notif_down(); - } - - - /** - * @desc Check that the AMS service sends an AMS notification on subscription expiration if the AMS service has an associated subscription and the event is generated - * @see ETSI GS MEC 021 2.1.1, clause 7.4.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_010_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var UInt64 v_timestamp; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_NOTIFICATIONS)) { - log("*** " & testcasename() & ": PICS_AMS and PICS_AMS_NOTIFICATIONS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_notif_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - action("Trigger a expire notification event"); - v_timestamp := f_get_current_timestamp_utc(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] httpPort_notif.receive( - mw_http_request( - mw_http_request_post( - PX_CALLBACK_URI, - -, - mw_http_message_body_json( - mw_body_json_expire_notification( - mw_expire_notification( - -, - -, - { seconds := v_timestamp / 1000, nanoSeconds := 1000 * v_timestamp mod 1000 } - ) - ) - ) - ) - ) - ) { - tc_wait.stop; - log("*** " & testcasename() & ": INFO: IUT successfully sends adjacent application info notification ***"); - - // Send 204 No Content - httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); - - log("*** " & testcasename() & ": PASS: IUT successfully sends adjacent applicationinfo notification ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_notif_down(); - } - - - - } // End of group ams_notifications - + + // Postamble + f_delete_adjacent_app_instance_info(v_adjacent_app_instance_info_1.appInstanceId); + f_delete_adjacent_app_instance_info(v_adjacent_app_instance_info_2.appInstanceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_015_OK_01 + + } // End of group adjacentApplicationInstances + } // End of module AtsMec_ApplicationMobiltyServiceAPI_TestCases diff --git a/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestControl.ttcn b/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestControl.ttcn index ca476c0..afa12b3 100644 --- a/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestControl.ttcn +++ b/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestControl.ttcn @@ -13,6 +13,52 @@ module AtsMec_ApplicationMobiltyServiceAPI_TestControl { control { if (PICS_MEC_PLAT and PICS_SERVICES) { + execute(TC_MEC_MEC021_SRV_AMS_001_OK_01()); + execute(TC_MEC_MEC021_SRV_AMS_001_OK_02()); + execute(TC_MEC_MEC021_SRV_AMS_001_OK_03()); + execute(TC_MEC_MEC021_SRV_AMS_001_OK_04()); + execute(TC_MEC_MEC021_SRV_AMS_001_OK_05()); + execute(TC_MEC_MEC021_SRV_AMS_001_BR()); + + execute(TC_MEC_MEC021_SRV_AMS_002_OK()); + execute(TC_MEC_MEC021_SRV_AMS_002_BR()); + + execute(TC_MEC_MEC021_SRV_AMS_003_OK()); + execute(TC_MEC_MEC021_SRV_AMS_003_BR()); + + execute(TC_MEC_MEC021_SRV_AMS_004_OK()); + execute(TC_MEC_MEC021_SRV_AMS_004_BR()); + + execute(TC_MEC_MEC021_SRV_AMS_005_OK()); + execute(TC_MEC_MEC021_SRV_AMS_005_NF()); + + execute(TC_MEC_MEC021_SRV_AMS_006_OK()); + execute(TC_MEC_MEC021_SRV_AMS_006_NF()); + + execute(TC_MEC_MEC021_SRV_AMS_007_OK()); + execute(TC_MEC_MEC021_SRV_AMS_007_BR()); + execute(TC_MEC_MEC021_SRV_AMS_007_NF()); + + execute(TC_MEC_MEC021_SRV_AMS_008_OK()); + + execute(TC_MEC_MEC021_SRV_AMS_009_OK()); + + execute(TC_MEC_MEC021_SRV_AMS_009_OK()); + + execute(TC_MEC_MEC021_SRV_AMS_011_OK()); + execute(TC_MEC_MEC021_SRV_AMS_011_NF()); + + execute(TC_MEC_MEC021_SRV_AMS_012_OK()); + execute(TC_MEC_MEC021_SRV_AMS_012_BR()); + execute(TC_MEC_MEC021_SRV_AMS_012_NF()); + + execute(TC_MEC_MEC021_SRV_AMS_013_OK()); + execute(TC_MEC_MEC021_SRV_AMS_013_NF()); + + execute(TC_MEC_MEC021_SRV_AMS_014_OK()); + execute(TC_MEC_MEC021_SRV_AMS_014_NF()); + + execute(TC_MEC_MEC021_SRV_AMS_015_OK_01()); } } // End of 'control' statement diff --git a/ttcn/LibMec/Ams_ToBeRemoved/module.mk b/ttcn/LibMec/Ams_ToBeRemoved/module.mk deleted file mode 100644 index bce6cc1..0000000 --- a/ttcn/LibMec/Ams_ToBeRemoved/module.mk +++ /dev/null @@ -1,7 +0,0 @@ -sources := \ - ttcn/Ams_Pics.ttcn \ - ttcn/Ams_Pixits.ttcn \ - ttcn/Ams_EncdecDeclarations.ttcn \ - ttcn/Ams_Templates.ttcn \ - ttcn/Ams_TypesAndValues.ttcn \ - diff --git a/ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_EncdecDeclarations.ttcn b/ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_EncdecDeclarations.ttcn deleted file mode 100644 index 2a189e1..0000000 --- a/ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_EncdecDeclarations.ttcn +++ /dev/null @@ -1,22 +0,0 @@ -module Ams_EncdecDeclarations { - - import from Ams_TypesAndValues all; - - external function enc_AppMobilityServiceInfo(in AppMobilityServiceInfo p_app_mobility_service_info) return octetstring - with { extension "prototype (convert) encode(JSON)"; extension "printing(pretty)" }; - external function dec_AppMobilityServiceInfo(in octetstring p_pdu) return AppMobilityServiceInfo - with { extension "prototype (convert) decode(JSON)" }; - - external function enc_RegistrationRequest(in RegistrationRequest p_registration_request) return octetstring - with { extension "prototype (convert) encode(JSON)"; extension "printing(pretty)" }; - external function dec_RegistrationRequest(in octetstring p_pdu) return RegistrationRequest - with { extension "prototype (convert) decode(JSON)" }; - - - external function enc_RegistrationInfo(in RegistrationInfo p_registration_info) return octetstring - with { extension "prototype (convert) encode(JSON)"; extension "printing(pretty)" }; - external function dec_Registrationinfo(in octetstring p_pdu) return RegistrationInfo - with { extension "prototype (convert) decode(JSON)" }; - - -} // End of module Ams_EncdecDeclarations diff --git a/ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_Pics.ttcn b/ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_Pics.ttcn deleted file mode 100644 index 89089fa..0000000 --- a/ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_Pics.ttcn +++ /dev/null @@ -1,8 +0,0 @@ -module Ams_Pics { - - /** - * @desc Does the IUT support LocationAPI? - */ - modulepar boolean PICS_AMS_API_SUPPORTED := true; - -} // End of module LocationAPI_Pics diff --git a/ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_Pixits.ttcn b/ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_Pixits.ttcn deleted file mode 100644 index 1a4870e..0000000 --- a/ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_Pixits.ttcn +++ /dev/null @@ -1,27 +0,0 @@ -module Ams_Pixits { - - // JSON - import from Json all; - - // LibMec/LocationAPI - import from Ams_TypesAndValues all; - - modulepar Json.String PX_APP_MOBILITY_SERVICE_ID := "KtRGymNQ84dG3mQfRepa"; - - modulepar Json.String PX_APP_INS_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f"; - - modulepar SubscriptionType PX_SUBSCRIPTION_TYPE := MobilityProcedureSubscription; - - modulepar Json.String PX_SUBSCRIPTION_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3"; - - modulepar Json.String PX_NON_EXISTENT_SUBSCRIPTION_ID := "NON_EXISTENT_SUBSCRIPTION_ID"; - - modulepar Json.String PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID := "PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID"; - - modulepar Json.String PX_CALLBACK_REFERENCE := "http://127.0.0.1/callback"; - - modulepar charstring PX_CALLBACK_URI := "http://127.0.0.1/callback"; - - modulepar Json.String PX_MEP_ID := ""; - -} // End of module LocationAPI_Pixits diff --git a/ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_Templates.ttcn b/ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_Templates.ttcn deleted file mode 100644 index ee4630a..0000000 --- a/ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_Templates.ttcn +++ /dev/null @@ -1,267 +0,0 @@ -module Ams_Templates { - - // JSON - import from Json all; - - // LibCommon - import from LibCommon_BasicTypesAndValues all; - - // LibMec/LocationAPI - import from Ams_TypesAndValues all; - import from Ams_Pixits all; - - template (omit) AppMobilityServiceInfo m_app_mobility_service_info( - in String p_app_mobility_service_id := PX_APP_MOBILITY_SERVICE_ID, - in template (omit) RegistrationInfos p_registration_info := omit - ) := { - registeredAppMobilityService := p_registration_info, - appMobilityServiceId := p_app_mobility_service_id - } // End of template m_app_mobility_service_info - - - template (present) AppMobilityServiceInfo mw_app_mobility_service_info( - template (present) RegistrationInfos p_registration_info := ?, - template (present) String p_app_mobility_service_id := ? - ) := { - registeredAppMobilityService := p_registration_info, - appMobilityServiceId := p_app_mobility_service_id - } - - template (omit) RegistrationInfo m_app_mobility_registration_info( - in template (value) ServiceConsumerId p_serviceConsumerId, - in template (omit) DeviceInformations p_deviceInformation := omit, - in template (omit) UInt32 p_expiryTime := omit - ) := { - serviceConsumerId := p_serviceConsumerId, - deviceInformation := p_deviceInformation, - expiryTime := p_expiryTime - } - - template RegistrationInfo mw_app_mobility_registration_info( - template (present) ServiceConsumerId p_serviceConsumerId := ?, - template DeviceInformations p_deviceInformation := *, - template UInt32 p_expiryTime := * - ) := { - serviceConsumerId := p_serviceConsumerId, - deviceInformation := p_deviceInformation, - expiryTime := p_expiryTime - } - - template (omit) ServiceConsumerId m_service_consumer_id( - in template (omit) String p_appInstanceId := omit, - in template (omit) String p_mepId := omit - ) := { - appInstanceId := p_appInstanceId, - mepId := p_mepId - } - - template (omit) ServiceConsumerIdWithError m_service_consumer_id_with_error( - in template (omit) String p_appId := omit, - in template (omit) String p_mepId := omit - ) := { - appId := p_appId, - mepId := p_mepId - } - - template (omit) ServiceConsumer m_service_consumer_error( - in template (omit) String p_appInstance := omit, - in template (omit) String p_mepId := omit - ) := { - appInstance := p_appInstance, - mepId := p_mepId - } - - template ServiceConsumerId mw_service_consumer_id( - template String p_appInstanceId := *, - template String p_mepId := * - ) := { - appInstanceId := p_appInstanceId, - mepId := p_mepId - } - - template (omit) RegistrationRequest m_registration_request ( - in template (omit) ServiceConsumerId p_service_consumer_id := omit, - in template (omit) DeviceInformations p_device_info := omit, - in template (omit) UInt32 p_expire_time := omit - ) := { - serviceConsumerId := p_service_consumer_id, - deviceInformation := p_device_info, - expiryTime := p_expire_time - } - - - template (omit) RegistrationRequestWithError m_registration_request_with_error ( - in template (omit) ServiceConsumerIdWithError p_service_consumer_id_with_error := omit, - in template (omit) DeviceInformations p_device_info := omit, - in template (omit) UInt32 p_expire_time := omit - ) := { - serviceConsumerIdWithError := p_service_consumer_id_with_error, - deviceInformation := p_device_info, - expiryTime := p_expire_time - } - - - template (omit) RegistrationRequest m_registration_request_error ( - in template (omit) ServiceConsumer p_service_consumer := omit, - in template (omit) DeviceInformations p_device_info := omit, - in template (omit) UInt32 p_expire_time := omit - ) := { - serviceConsumerId := p_service_consumer, - deviceInformation := p_device_info, - expiryTime := p_expire_time - } - - - template RegistrationRequest mw_registration_request( - template ServiceConsumerId p_service_consumer_id := ?, - template DeviceInformations p_device_info := omit, - template UInt32 p_expire_time := omit - ) := { - serviceConsumerId := p_service_consumer_id, - deviceInformation := p_device_info, - expiryTime := p_expire_time - } - - - template (value) RegistrationInfo m_registration_info ( - in template (omit) ServiceConsumerId p_service_consumer_id := omit, - in template (omit) DeviceInformations p_device_info := omit, - in UInt32 p_expire_time - ) := { - serviceConsumerId := p_service_consumer_id, - deviceInformation := p_device_info, - expiryTime := p_expire_time - } - - template (present) RegistrationInfos mw_registration_info( - template (present) ServiceConsumerId p_service_consumer_id := ?, - template (present) DeviceInformations p_device_info := ?, - template (present) UInt32 p_expire_time := ? - ) := { - - } - - - template (value) ServiceConsumer m_service_consumer ( - in String p_app_instance, - in String p_mep_id - ) := { - appInstance := p_app_instance, - mepId := p_mep_id - } - - template (omit) ServiceConsumer mw_service_consumer ( - in String p_app_instance, - in template (omit) String p_mep_id := omit - ) := { - appInstance := p_app_instance, - mepId := p_mep_id - } - - template (value) DeviceInformation m_device_info ( - in String p_associate_id - ) := { - associateId := p_associate_id - } - - template (omit) DeviceInformation mw_device_info ( - in String p_associate_id - ) := { - associateId := p_associate_id - } - type record AmsSubscriptionLinkList { - Json.AnyURI links, - Subscription subscription - } - - template (value) AdjacentAppInfoSubscription_ mw_adjacent_application_info_notification ( - in template (omit) SubscriptionType p_subscriptionType := omit, - in Json.AnyURI p_callbackReference, - in template (omit) Json.AnyURI p_links := omit, - in template (omit) AdjacentFilterCriteria p_filterCriteria := omit, - in template (omit) TimeStamp p_expiryDeadline := omit - - ) := { - subscriptionType := p_subscriptionType , - callbackReference := p_callbackReference, - links := p_links, - filterCriteria := p_filterCriteria, - expiryDeadline := p_expiryDeadline - } - - - template (value) MobilityProcedureSubscription_ m_ams_subscription ( - in SubscriptionType p_subscriptionType := PX_SUBSCRIPTION_TYPE, - in Json.AnyURI p_callbackReference, - in template (omit) Json.AnyURI p_links := omit, - in template (omit) FilterCriteria p_filterCriteria := omit, - in template (omit) TimeStamp p_expiryDeadline := omit - - ) := { - subscriptionType := p_subscriptionType , - callbackReference := p_callbackReference, - links := p_links, - filterCriteria := p_filterCriteria, - expiryDeadline := p_expiryDeadline - } - - - - template (value) MobilityProcedureSubscription_ mw_mobility_procedure_notification ( - in template (omit) SubscriptionType p_subscriptionType := omit, - in Json.AnyURI p_callbackReference, - in template (omit) Json.AnyURI p_links := omit, - in template (omit) FilterCriteria p_filterCriteria := omit, - in template (omit) TimeStamp p_expiryDeadline := omit - - ) := { - subscriptionType := p_subscriptionType , - callbackReference := p_callbackReference, - links := p_links, - filterCriteria := p_filterCriteria, - expiryDeadline := p_expiryDeadline - } - - template (value) MobilityProcedureSubscriptionError m_ams_subscription_error ( - in SubscriptionType p_subscriptionType, - in Json.AnyURI p_callbackReference, - in template (omit) Json.AnyURI p_links := omit, - in template (omit) FilterCriteria p_filterCriteria := omit, - in template (omit) TimeStamp p_expiryDeadline := omit - - ) := { - subscriptionType := p_subscriptionType, - callbackReference := p_callbackReference, - links := p_links, - filterCriteria := p_filterCriteria, - expiryDeadline := p_expiryDeadline - } - - template (present) MobilityProcedureSubscription_ mw_ams_subscription ( - in SubscriptionType p_subscriptionType, - in template (omit) Json.AnyURI p_callbackReference := omit, - in template (omit) Json.AnyURI p_links := omit, - in template (omit) FilterCriteria p_filterCriteria := omit, - in template (omit) TimeStamp p_expiryDeadline := omit - ) := { - subscriptionType := p_subscriptionType , - callbackReference := p_callbackReference, - links := p_links, - filterCriteria := p_filterCriteria, - expiryDeadline := p_expiryDeadline - } - - template (present) ExpiryNotification mw_expire_notification ( - in template (omit) TimeStamp p_timestamp := omit, - in template (omit) Json.AnyURI p_links := omit, - in TimeStamp p_expiryDeadline - ) := { - timeStamp := p_timestamp, - links := p_links, - expiryDeadline := p_expiryDeadline - } - - - - -} // End of module LocationAPI_Templates diff --git a/ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_TypesAndValues.ttcn b/ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_TypesAndValues.ttcn deleted file mode 100644 index 2ac176f..0000000 --- a/ttcn/LibMec/Ams_ToBeRemoved/ttcn/Ams_TypesAndValues.ttcn +++ /dev/null @@ -1,539 +0,0 @@ -module Ams_TypesAndValues { - -// JSON -import from Json all; - -// LibCommon -import from LibCommon_BasicTypesAndValues all; - - -type record of AppMobilityServiceInfo AppMobilityServiceInfos; -type record AppMobilityServiceInfo { - RegistrationInfos registeredAppMobilityService , - String appMobilityServiceId -} - - -type record RegistrationRequest { - ServiceConsumerId serviceConsumerId, - DeviceInformations deviceInformation optional, - UInt32 expiryTime optional -} - - -type record RegistrationRequestWithError { - ServiceConsumerIdWithError serviceConsumerIdWithError, - DeviceInformations deviceInformation optional, - UInt32 expiryTime optional -} - - -type record ServiceConsumerIdWithError { - String appId optional, - String mepId optional -} - -// Erroneous parameter: appInstance should be appInstanceId -type record of ServiceConsumer ServiceConsumers; -type record ServiceConsumer { - String appInstance optional, - String mepId optional -} - - -type Json.AnyURI links; - -type enumerated SubscriptionType { - MobilityProcedureSubscription, - AdjacentAppInfoSubscription -} - -type record Subscription { - Json.AnyURI href, - SubscriptionType subscriptionType -} - - -type record of AmsSubscriptionLinkList AmsSubscriptionLinkLists; -type record AmsSubscriptionLinkList { - Json.AnyURI links, - Subscription subscription -} - - -type record MobilityProcedureSubscriptionError { - SubscriptionType subscriptionType, - Json.AnyURI callbackReference, - Json.AnyURI links optional, - FilterCriteria filterCriteria, - TimeStamp expiryDeadline optional -} - - - - -type record of MobilityProcedureSubscription_ MobilityProcedureSubscriptions; -type record MobilityProcedureSubscription_ { - SubscriptionType subscriptionType, - Json.AnyURI callbackReference, - Json.AnyURI links optional, - FilterCriteria filterCriteria, - TimeStamp expiryDeadline optional -} - -type enumerated MobilityStatusType { - INTERHOST_MOVEOUT_TRIGGERED, - TARGET_APPINST_CONFIRMED, - TARGET_TRAFFIC_RULE_ACTIVATED, - INTERHOST_MOVEOUT_COMPLETED, - INTERHOST_MOVEOUT_FAILED -} - -type record AssociateIdList { - String associateId -} - -type record of FilterCriteria FilterCriterias; -type record FilterCriteria { - String appInstanceId optional, - AssociateIdList associateId optional, - MobilityStatusType mobilityStatus -} - - - -type record AdjacentFilterCriteria { - String appInstanceId optional -} - - -type record of ExpiryNotification ExpiryNotifications; -type record ExpiryNotification { - TimeStamp timeStamp, - Json.AnyURI links optional, - TimeStamp expiryDeadline -} - -type record of AdjacentAppInfoSubscription_ AdjacentAppInfoSubscriptions; -type record AdjacentAppInfoSubscription_ { - SubscriptionType subscriptionType, - Json.AnyURI callbackReference, - Json.AnyURI links optional, - AdjacentFilterCriteria filterCriteria, - TimeStamp expiryDeadline optional -} - - /** - * @desc - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds - } - - -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// /** -// * @desc -// * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC -// * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC -// */ -// type record TimeStamp { -// Seconds seconds, -// NanoSeconds nanoSeconds -// } -// -// /** -// * @desc A type containing list of users. -// * @member user Collection of the zone information list. -// * @member resourceURL Self referring URL. -// */ -// type record of UserInfo UserInfos; -// type record UserList { -// UserInfos user optional, -// ResourceURL resourceURL -// } -// -// /** -// * @desc A type containing location information with latitude, longitude and altitude, in addition the accuracy of the information are provided. -// * @member latitude -// * @member longitude -// * @member altitude -// * @member accuracy -// */ -// type record LocationInfo { -// Json.Number latitude, -// Json.Number longitude, -// Json.Number altitude optional, -// UInt32 accuracy -// } // End of type LocationInfo -// -// /** -// * @desc A type containing zone information. -// * @member zoneId Identifier of zone -// * @member numberOfAccessPoints The number of access points within the zone -// * @member numberOfUnservicableAccessPoints Number of inoperable access points within the zone. -// * @member numberOfUsers The number of users currently on the access point. -// * @member resourceURL Self referring URL. -// */ -// type record ZoneInfo { -// ZoneId zoneId, -// NumberOfAccessPoints numberOfAccessPoints, -// NumberOfUnserviceableAccessPoints numberOfUnservicableAccessPoints, -// NumberOfUsers numberOfUsers, -// ResourceURL resourceURL -// } -// -// /** -// * @desc Collection of the zone information list. -// * @member zone Collection of the zone information list. -// * @member resourceURL Self referring URL. -// */ -// type record of ZoneInfo ZoneInfos; -// type record ZoneList { -// ZoneInfos zone optional, -// ResourceURL resourceURL -// } -// -// /** -// * @desc Identifier of access point, (reference ETSI TS 129 171). Where the E-CGI is made up of the PLMN and Cell Identity (28 bit string). Then the PLMN is made up of the 3 digit MCC & 2 or 3 digit MNC. The Cell Portion is an optional element -// */ -// type Json.String AccessPointId; -// -// /** -// * @desc A type containing access point information. -// * @member accessPointId -// * @member connectionType The connection type for the access poin -// * @member operationStatus The operation status of the access point -// * @member numberOfUsers The number of users currently on the access point. -// * @member resourceURL Self referring URL. -// */ -// type record AccessPointInfo { -// AccessPointId accessPointId, -// LocationInfo locationInfo optional, -// ConnectionType connectionType, -// OperationStatus operationStatus, -// NumberOfUsers numberOfUsers, -// InterestRealm interestRealm, -// ResourceURL resourceURL -// } -// type record of AccessPointInfo AccessPointInfos; -// -// /** -// * @desc A type containing list of access points. -// * @member zoneId -// * @member accessPoint Collection of the access point information list. -// * @member resourceURL -// */ -// type record AccessPointList { -// ZoneId zoneId, -// AccessPointInfos accessPoint optional, -// ResourceURL resourceURL -// } -// -// /** -// * @desc Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI). -// */ -// type Json.String Address -// -// /** -// * @desc Reserved for future use. -// */ -// type Json.String AncillaryInfo; -// -// /** -// * @desc CallBackData if passed by the application during the associated ZonalTrafficSubscription and UserTrackingSubscription operation. See [\ -//REST_NetAPI_Common]. -// */ -// type Json.String CallbackData; -// -// /** -// * @desc Notification callback definition. -// * @member notifyURL -// */ -// type record CallbackReference { -// NotifyURL notifyURL -// } -// -// /** -// * @desc Uniquely identifies this create subscription request. If there is a communication failure during the request, using the same clientCorrelator when retrying the request allows the operator to avoid creating a duplicate subscription. -// */ -// type Json.String ClientCorrelator; -// -// /** -// * @desc The connection type for the access point -// */ -// type enumerated ConnectionType { -// Femto, -// LTE_femto, -// Smallcell, -// LTE_smallcell, -// Wifi, -// Pico, -// Micro, -// Macro, -// Wimax, -// Unknown -// } -// -// /** -// * @desc Contextual information of a user location (e.g., aisle, floor, room number, etc.) -// */ -// type Json.String ContextLocationInfo; -// -// /** -// * @desc Zone ID -// */ -// type Json.String CurrentAccessPointId; -// -// /** -// * @desc Period (in seconds) of time notifications are provided for. If set to \"0\" (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications. This element MAY be given by the client during resource creation in order to signal the desired lifetime of the subscription. The server MUST return in this element the period of time for which the subscription will still be valid. -// */ -// type Json.Date Duration; -// -// /** -// * @desc Interest realm of access point (e.g. geographical area, a type of industry etc.). -// */ -// type Json.String InterestRealm; -// -// /** -// * @desc Link to other resources -// * @member rel Describes the relationship between the URI and the resource. -// * @member href UTI -// */ -// type record Link { -// Json.String rel, -// Json.String href -// } -// -// /** -// * @desc The URL of your own listener application. -// */ -// type Json.String NotifyURL; -// -// /** -// * @desc The number of access points within the zone -// */ -// type UInt32 NumberOfAccessPoints; -// -// /** -// * @desc Number of inoperable access points within the zone. -// */ -// type UInt32 NumberOfUnserviceableAccessPoints; -// -// /** -// * @desc The number of users currently on the access point. -// */ -// type UInt32 NumberOfUsers; -// -// /** -// * @desc Threshold number of users in an access point which if crossed shall cause a notification. -// */ -// type UInt32 NumberOfUsersAPThreshold; -// -// /** -// * @desc This element shall be present when ZoneStatusSubscription includes numberOfUsersAPThreshold element and the number of users in an access point exceeds the threshold defined in the subscription. -// */ -// type UInt32 NumberOfUsersInAP; -// -// /** -// * @desc Threshold number of users in a zone which if crossed shall cause a notification. -// */ -// type UInt32 NumberOfUsersInZone; -// -// /** -// * @desc Threshold number of users in a zone which if crossed shall cause a notification. -// */ -// type UInt32 NumberOfUsersZoneThreshold; -// -// /** -// * @desc The operation status of the access point -// */ -// type enumerated OperationStatus { -// Serviceable, -// Unserviceable, -// Unknown -// } -// -// /** -// * @desc Zone ID -// */ -// type Json.String PreviousAccessPointId; -// -// /** -// * @desc Self referring URL -// */ -// type Json.AnyURI ResourceURL; -// -// /** -// * @desc Indicates the time of day for zonal presence notification. -// */ -// type Json.String Timestamp; -// -// /** -// * @desc Time zone of access point -// */ -// type Json.String Timezone; -// -// /** -// * @desc User event -// */ -// type enumerated UserEventType { -// Entering, -// Leaving, -// Transferring -// } -// -// /** -// * @desc List of user event values to generate notifications for (these apply to address specified). If this element is missing, a notification is requested to be generated for any change in user event. -// */ -// type record of UserEventType UserEventCriteria; -// -// /** -// * @desc A type containing user information. -// * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI). -// * @member accessPointId Identifier of access point, (reference ETSI TS 129 171). -// * @member zoneId Identifier of zone -// * @member resourceURL Self referring URL. -// * @member locationInfo A type containing location information with latitude, longitude and altitude, in addition the accuracy of the information are provided. -// * @member contextLocationInfo -// * @member ancillaryInfo -// */ -// type record UserInfo { -// Address address_, -// AccessPointId accessPointId, -// ZoneId zoneId, -// ResourceURL resourceURL, -// LocationInfo locationInfo optional, -// ContextLocationInfo contextLocationInfo optional, -// AncillaryInfo ancillaryInfo optional -// } with { -// variant (address_) "name as 'address'"; -// } // End of type UserInfo -// -// /** -// * @desc A type containing user tracking subscription. -// * @member -// */ -// type record UserTrackingSubscription { -// ClientCorrelator clientCorrelator optional, -// CallbackReference callbackReference, -// Address address_, -// UserEventCriteria userEventCriteria optional, -// ResourceURL resourceURL optional -// } with { -// variant (address_) "name as 'address'"; -// } -// -// /** -// * @desc A type containing zonal presence notification -// * @member -// * @member link Link to other resources that are in relationship with this notification. The server SHOULD include a link to the related subscription. No other links are required or suggested by this specification. -// */ -// type record ZonalPresenceNotification { -// CallbackReference callbackReference optional, -// ZoneId zoneId, -// Address address_, -// InterestRealm interestRealm optional, -// UserEventType userEventType, -// CurrentAccessPointId currentAccessPointId, -// PreviousAccessPointId previousAccessPointId optional, -// Timestamp timestamp_, -// Link link optional -// } with { -// variant (address_) "name as 'address'"; -// variant (timestamp_) "name as 'timestamp'"; -// } -// -// /** -// * @desc A type containing zonal traffic subscription -// * @member -// * @member interestRealm Interest realms of access points within a zone (e.g. geographical area, a type of industry etc.). -// * @member userEventCriteria List of user event values to generate notifications for (these apply to zone identifier or all interest realms within zone identifier specified). If this element is missing, a notification is requested to be generated for any change in user event. -// * @member resourceURL -// */ -// type record ZonalTrafficSubscription { -// ClientCorrelator clientCorrelator optional, -// CallbackReference callbackReference, -// ZoneId zoneId, -// InterestRealm interestRealm optional, -// UserEventCriteria userEventCriteria optional, -// Duration duration optional, -// ResourceURL resourceURL optional -// } -// -// /** -// * @desc Identifier of zone -// */ -// type Json.String ZoneId; -// -// /** -// * @desc A type containing zone status notification. -// * @member zoneId -// * @member -// */ -// type record ZoneStatusNotification { -// CallbackData callbackData optional, -// ZoneId zoneId, -// AccessPointId accessPointId optional, -// NumberOfUsersInZone numberOfUsersInZone optional, -// NumberOfUsersInAP numberOfUsersInAP optional, -// OperationStatus operationStatus optional, -// Timestamp timestamp_, -// Link link -// } with { -// variant (timestamp_) "name as 'timestamp'"; -// } -// -// /** -// * @desc A type containing zone status subscription. -// * @member zoneId -// * @member -// * @member -// * @member -// * @member operationStatus List of operation status values to generate notifications for (these apply to all access points within a zone). -// */ -// type record ZoneStatusSubscription { -// ClientCorrelator clientCorrelator optional, -// ResourceURL resourceURL optional, -// CallbackReference callbackReference, -// ZoneId zoneId, -// NumberOfUsersZoneThreshold numberOfUsersZoneThreshold optional, -// NumberOfUsersAPThreshold numberOfUsersAPThreshold optional, -// OperationStatus operationStatus optional -// } -// -// /** -// * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC -// */ -// type UInt32 Seconds; -// -// /** -// * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC -// */ -// type UInt32 NanoSeconds; - -} with { -encode "JSON" -} diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Functions.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Functions.ttcn index d5f9d63..443257a 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Functions.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Functions.ttcn @@ -3,4 +3,341 @@ module ApplicationMobilityServiceAPI_Functions { // JSON import from Json all; + // LibCommon + import from LibCommon_BasicTypesAndValues all; + import from LibCommon_Time all; + import from LibCommon_VerdictControl all; + import from LibCommon_Sync all; + + // LibHttp + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec/ApplicationMobilityServiceAPI + import from ApplicationMobilityServiceAPI_TypesAndValues all; + import from ApplicationMobilityServiceAPI_Templates all; + import from ApplicationMobilityServiceAPI_Pixits all; + + // LibMec + import from LibMec_Templates all; + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + function f_create_application_mobility_services( + in Json.String p_app_instance_id := PX_APP_INS_ID, + out RegistrationInfo p_registration_info + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_URI, + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + m_registration_info( + -, + m_service_consumer_id( + p_app_instance_id + ))))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_ams_registration_info( + mw_registration_info( + ?, + mw_service_consumer_id( + p_app_instance_id + ))))))) -> value v_response { + tc_ac.stop; + + p_registration_info := v_response.response.body.json_body.registrationInfo; + log("f_create_application_mobility_services: INFO: IUT successfully responds to the registration: ", p_registration_info); + } + [] tc_ac.timeout { + log("f_create_application_mobility_services: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_application_mobility_services + + function f_delete_application_mobility_services( + in Json.String p_app_mobility_service_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(p_app_mobility_service_id, "UTF-8")), + v_headers + ))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_application_mobility_services: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_delete_application_mobility_services + + function f_create_adjacent_app_instance_info( + in Json.String p_app_instance_id := PX_APP_INS_ID, + in Json.String p_app_id := PX_APP_ID, + in template (value) CommunicationInterface p_communication_interface, + out AdjacentAppInstanceInfo p_adjacent_app_instance_info + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_URI, + v_headers, + m_http_message_body_json( + m_body_json_ams_adjacent_app_instance_info( + m_adjacent_app_instance_info( + p_app_instance_id, + p_app_id, + p_communication_interface + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_ams_adjacent_app_instance_info( + mw_adjacent_app_instance_info( + p_app_instance_id, + p_app_id + )))))) -> value v_response { + tc_ac.stop; + + p_adjacent_app_instance_info := v_response.response.body.json_body.adjacentAppInstanceInfo; + log("f_create_adjacent_app_instance_info: INFO: IUT successfully responds to the adjacentAppInstanceInfo: ", p_adjacent_app_instance_info); + } + [] tc_ac.timeout { + log("f_create_adjacent_app_instance_info: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_adjacent_app_instance_info + + function f_delete_adjacent_app_instance_info( + in Json.String p_app_instance_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(p_app_instance_id, "UTF-8")), + v_headers + ))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_adjacent_app_instance_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_delete_adjacent_app_instance_info + + function f_create_mobility_procedure_subscription( + out MobilityProcedureSubscription p_mobility_procedure_subscription, + out charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_ams_mobility_procedure_subscription( + m_mobility_procedure_subscription( + PX_CALLBACK_REFERENCE, + m_filter_criteria, + -, -, -, + { seconds := (f_get_current_timestamp_utc() / 1000) + 60, nanoSeconds := 0 } + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_ams_mobility_procedure_subscription( + mw_mobility_procedure_subscription( + PX_CALLBACK_REFERENCE, + mw_filter_criteria, + mw_links + )))))) -> value v_response { + tc_ac.stop; + + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_APP_AMS_SUBS & "/(?*)", + 0 + ); + p_mobility_procedure_subscription := v_response.response.body.json_body.mobilityProcedureSubscription; + log("f_create_mobility_procedure_subscription: INFO: IUT successfully responds to the subscription: ", p_mobility_procedure_subscription); + log("f_create_mobility_procedure_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_mobility_procedure_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_mobility_procedure_subscription + + function f_delete_mobility_procedure_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & p_subscription_id, + v_headers + ))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + } + [] tc_ac.timeout { + log("f_delete_mobility_procedure_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_delete_mobility_procedure_subscription + + function f_create_adjacent_appInfo_subscription( + out AdjacentAppInfoSubscription p_adjacent_appInfo_subscription, + out charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_ams_adjacent_appInfo_subscription( + m_adjacent_app_info_subscription( + PX_CALLBACK_REFERENCE, + m_adjacent_filter_criteria + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_ams_adjacent_appInfo_subscription( + mw_adjacent_app_info_subscription( + PX_CALLBACK_REFERENCE, + mw_adjacent_filter_criteria, + mw_links + )))))) -> value v_response { + tc_ac.stop; + + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_APP_AMS_SUBS & "/(?*)", + 0 + ); + p_adjacent_appInfo_subscription := v_response.response.body.json_body.adjacentAppInfoSubscription; + log("f_create_adjacent_appInfo_subscription: INFO: IUT successfully responds to the subscription: ", p_adjacent_appInfo_subscription); + log("f_create_adjacent_appInfo_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_adjacent_appInfo_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_adjacent_appInfo_subscription + + function f_delete_adjacent_appInfo_subscription( // FIXME To be merged with f_delete_mobility_procedure_subscription into f_delete_subscription + in charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & p_subscription_id, + v_headers + ))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + } + [] tc_ac.timeout { + log("f_delete_adjacent_appInfo_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_delete_adjacent_appInfo_subscription + } // End of module ApplicationMobilityServiceAPI_Functions diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pixits.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pixits.ttcn index e4d5979..6b6d485 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pixits.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pixits.ttcn @@ -6,11 +6,15 @@ module ApplicationMobilityServiceAPI_Pixits { // LibMec/ApplicationMobilityServiceAPI import from ApplicationMobilityServiceAPI_TypesAndValues all; - modulepar Json.String PX_APP_MOBILITY_SERVICE_ID := "KtRGymNQ84dG3mQfRepa"; - modulepar Json.String PX_APP_INS_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f"; - modulepar Json.String PX_SUBSCRIPTION_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3"; + modulepar Json.String PX_APP_INS_ID_2 := "4e92055c-c594-11ee-8535-13445063b38e"; + + modulepar Json.String PX_APP_INS_ID_NEW := "d1e24122-c596-11ee-9ffa-33159308a999"; + + modulepar Json.String PX_APP_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f"; + + modulepar Json.String PX_APP_ID_2 := "4e92055c-c594-11ee-8535-13445063b38e"; modulepar Json.String PX_NON_EXISTENT_SUBSCRIPTION_ID := "NON_EXISTENT_SUBSCRIPTION_ID"; @@ -21,4 +25,9 @@ module ApplicationMobilityServiceAPI_Pixits { modulepar charstring PX_CALLBACK_URI := "http://127.0.0.1/callback"; modulepar Json.String PX_MEP_ID := ""; + + modulepar Json.String PX_HOST := ""; + + modulepar UInt16 PX_PORT := 12345 + } // End of module ApplicationMobilityServiceAPI_Pixits diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn index 60d997e..6426d06 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn @@ -13,25 +13,8 @@ module ApplicationMobilityServiceAPI_Templates { // LibCommon import from LibCommon_BasicTypesAndValues all; - // template (omit) AppMobilityServiceInfo m_app_mobility_service_info( - // in String p_app_mobility_service_id := PX_APP_MOBILITY_SERVICE_ID, - // in template (omit) RegistrationInfos p_registration_info := omit - // ) := { - // registeredAppMobilityService := p_registration_info, - // appMobilityServiceId := p_app_mobility_service_id - // } // End of template m_app_mobility_service_info - - - // template (present) AppMobilityServiceInfo mw_app_mobility_service_info( - // template (present) RegistrationInfos p_registration_info := ?, - // template (present) String p_app_mobility_service_id := ? - // ) := { - // registeredAppMobilityService := p_registration_info, - // appMobilityServiceId := p_app_mobility_service_id - // } - template (omit) RegistrationInfo m_registration_info( - in Json.String p_app_mobility_service_id, + in template (omit) Json.String p_app_mobility_service_id := omit, in template (value) ServiceConsumerId p_serviceConsumerId, in template (omit) DeviceInformation p_deviceInformation := omit, in template (omit) UInt32 p_expiryTime := omit @@ -39,15 +22,15 @@ module ApplicationMobilityServiceAPI_Templates { appMobilityServiceId := p_app_mobility_service_id, serviceConsumerId := p_serviceConsumerId, deviceInformation := p_deviceInformation, - expiryTime := p_expiryTime + expiryTime := p_expiryTime } // End of template m_registration_info - template RegistrationInfo mw_registration_info( - template (present) Json.String p_app_mobility_service_id := ?, - template (present) ServiceConsumerId p_serviceConsumerId := ?, - template DeviceInformation p_deviceInformation := *, - template UInt32 p_expiryTime := * - ) := { + template (present) RegistrationInfo mw_registration_info( + template (present) Json.String p_app_mobility_service_id := ?, + template (present) ServiceConsumerId p_serviceConsumerId := ?, + template DeviceInformation p_deviceInformation := *, + template UInt32 p_expiryTime := * + ) := { appMobilityServiceId := p_app_mobility_service_id, serviceConsumerId := p_serviceConsumerId, deviceInformation := p_deviceInformation, @@ -55,8 +38,8 @@ module ApplicationMobilityServiceAPI_Templates { } // End of template m_registration_info template (omit) ServiceConsumerId m_service_consumer_id( - in template (omit) String p_appInstanceId := omit, - in template (omit) String p_mepId := omit + in template (omit) Json.String p_appInstanceId := omit, + in template (omit) Json.String p_mepId := omit ) := { appInstanceId := p_appInstanceId, mepId := p_mepId @@ -71,7 +54,7 @@ module ApplicationMobilityServiceAPI_Templates { } // End of template mw_service_consumer_id template (omit) DeviceInformation_ m_device_info( - in String p_associate_id, + in Json.String p_associate_id, in template (omit) AppMobilityServiceLevel p_appMobilityServiceLevel := omit, in template (omit) ContextTransferState p_contextTransferState := omit ) := { @@ -81,7 +64,7 @@ module ApplicationMobilityServiceAPI_Templates { } // End of template m_device_info template (present) DeviceInformation_ mw_device_info( - template (present) String p_associate_id := ?, + template (present) Json.String p_associate_id := ?, template AppMobilityServiceLevel p_appMobilityServiceLevel := *, template ContextTransferState p_contextTransferState := * ) := { @@ -90,51 +73,165 @@ module ApplicationMobilityServiceAPI_Templates { contextTransferState := p_contextTransferState } // End of template mw_device_info - template (value) AdjacentAppInfoSubscription m_adjacent_app_info_subscription( - in Json.String p_subscriptionType, - in template (omit) Json.AnyURI p_callbackReference := omit, - in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := omit, - in template (omit) AdjacentFilterCriteria p_filterCriteria := omit, - in template (omit) TimeStamp p_expiryDeadline := omit, - in template (omit) Json.Bool p_requestTestNotification := omit, - in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := omit - ) := { - subscriptionType := p_subscriptionType , + template (omit) MobilityProcedureSubscription m_mobility_procedure_subscription( + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (value) FilterCriteria p_filterCriteria, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "MobilityProcedureSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline + } // End of template m_mobility_procedure_subscription + + template (omit) MobilityProcedureSubscription m_mobility_procedure_subscription_error( + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (value) FilterCriteria p_filterCriteria, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) modifies m_mobility_procedure_subscription := { + subscriptionType := "MobilityProcedureSub" + } // End of template m_mobility_procedure_subscription_error + + template (present) MobilityProcedureSubscription mw_mobility_procedure_subscription( + template Json.AnyURI p_callbackReference := *, + template (present) FilterCriteria p_filterCriteria := ?, + template ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "MobilityProcedureSubscription", callbackReference := p_callbackReference, requestTestNotification := p_requestTestNotification, websockNotifConfig := p_websockNotifConfig, links := p_links, filterCriteria := p_filterCriteria, - expiryDeadline := p_expiryDeadline + expiryDeadline := p_expiryDeadline + } // End of template mw_mobility_procedure_subscription + + template (omit) FilterCriteria m_filter_criteria( + in template (omit) Json.String p_appInstanceId := omit, + in template (omit) AssociateId p_associateId := omit, + in template (omit) MobilityStatus p_mobilityStatus := omit + ) := { + appInstanceId := p_appInstanceId, + associateId := p_associateId, + mobilityStatus := p_mobilityStatus + } // End of template m_filter_criteria + + template FilterCriteria mw_filter_criteria( + template Json.String p_appInstanceId := *, + template AssociateId p_associateId := *, + template MobilityStatus p_mobilityStatus := * + ) := { + appInstanceId := p_appInstanceId, + associateId := p_associateId, + mobilityStatus := p_mobilityStatus + } // End of template mw_filter_criteria + + template (omit) AdjacentAppInstanceInfo m_adjacent_app_instance_info( + in template (value) Json.String p_appInstanceId, + in template (value) Json.String p_appDId, + in template (value) CommunicationInterface p_appInstanceCommLink, + in template (omit) MECHostInformation p_mecHostInformation := omit, + in template (omit) Json.String p_registeredInstanceId := omit + ) := { + appInstanceId := p_appInstanceId, + appDId := p_appDId, + appInstanceCommLink := p_appInstanceCommLink, + mecHostInformation := p_mecHostInformation, + registeredInstanceId := p_registeredInstanceId + } // End of template m_adjacent_app_instance_info + + template (present) AdjacentAppInstanceInfo mw_adjacent_app_instance_info( + template (present) Json.String p_appInstanceId := ?, + template (present) Json.String p_appDId := ?, + template (present) CommunicationInterface p_appInstanceCommLink := ?, + template MECHostInformation p_mecHostInformation := *, + template Json.String p_registeredInstanceId := * + ) := { + appInstanceId := p_appInstanceId, + appDId := p_appDId, + appInstanceCommLink := p_appInstanceCommLink, + mecHostInformation := p_mecHostInformation, + registeredInstanceId := p_registeredInstanceId + } // End of template mw_adjacent_app_instance_info + + template (omit) CommunicationInterface m_communication_interface( + in template (omit) IpAddresses p_ipAddresses := omit + ) := { + ipAddresses := p_ipAddresses + } // End of template m_communication_interface + + template CommunicationInterface mw_communication_interface( + template IpAddresses p_ipAddresses := * + ) := { + ipAddresses := p_ipAddresses + } // End of template mw_communication_interface + + template (omit) AdjacentAppInfoSubscription m_adjacent_app_info_subscription( + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (value) AdjacentFilterCriteria p_filterCriteria, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "AdjacentAppInfoSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template m_adjacent_app_info_subscription template (present) AdjacentAppInfoSubscription mw_adjacent_app_info_subscription( - template (present) Json.String p_subscriptionType := ?, template Json.AnyURI p_callbackReference := *, + template (present) AdjacentFilterCriteria p_filterCriteria := ?, template ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := *, - template AdjacentFilterCriteria p_filterCriteria := *, - template TimeStamp p_expiryDeadline := *, template Json.Bool p_requestTestNotification := *, - template ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := * - ) := { - subscriptionType := p_subscriptionType , + template ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "AdjacentAppInfoSubscription", callbackReference := p_callbackReference, requestTestNotification := p_requestTestNotification, websockNotifConfig := p_websockNotifConfig, links := p_links, filterCriteria := p_filterCriteria, - expiryDeadline := p_expiryDeadline + expiryDeadline := p_expiryDeadline } // End of template mw_adjacent_app_info_subscription + template (omit) AdjacentFilterCriteria m_adjacent_filter_criteria( + in template (omit) Json.String p_appInstanceId := omit + ) := { + appInstanceId := p_appInstanceId + } // End of template m_adjacent_filter_criteria + + template AdjacentFilterCriteria mw_adjacent_filter_criteria( + template Json.String p_appInstanceId := * + ) := { + appInstanceId := p_appInstanceId + } // End of template mw_adjacent_filter_criteria + template (value) MobilityProcedureNotification m_mobility_procedure_notification( - in Json.String p_notificationType, - in template (value) Links_Notification p_links, + in template (value) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links, in template (value) AssociateId p_associateId, in template (value) MobilityStatus p_mobilityStatus, in template (omit) TimeStamp p_timeStamp := omit, in template (omit) TargetAppInfo p_targetAppInfo := omit ) := { - notificationType := p_notificationType, + notificationType := "MobilityProcedureNotification", timeStamp := p_timeStamp, associateId := p_associateId, mobilityStatus := p_mobilityStatus, @@ -143,14 +240,13 @@ module ApplicationMobilityServiceAPI_Templates { } // End of template m_mobility_procedure_notification template (present) MobilityProcedureNotification mw_mobility_procedure_notification( - template (present) Json.String p_notificationType := ?, - template (present) Links_Notification p_links := ?, + template (present) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := ?, template (present) AssociateId p_associateId := ?, template (present) MobilityStatus p_mobilityStatus := ?, template TimeStamp p_timeStamp := *, template TargetAppInfo p_targetAppInfo := * ) := { - notificationType := p_notificationType, + notificationType := "MobilityProcedureNotification", timeStamp := p_timeStamp, associateId := p_associateId, mobilityStatus := p_mobilityStatus, @@ -158,24 +254,88 @@ module ApplicationMobilityServiceAPI_Templates { links := p_links } // End of template mw_mobility_procedure_notification + template (omit) AdjacentAppInfoNotification m_adjacent_app_info_notification( + in template (value) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links, + in template (omit) AdjacentAppInfo p_adjacentAppInfo := omit, + in template (omit) TimeStamp p_timeStamp := omit + ) :={ + notificationType := "AdjacentAppInfoNotification", + timeStamp := p_timeStamp, + adjacentAppInfo := p_adjacentAppInfo, + links := p_links + } // End of template m_adjacent_app_info_notification + + template (present) AdjacentAppInfoNotification mw_adjacent_app_info_notification( + template (present) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := ?, + template AdjacentAppInfo p_adjacentAppInfo := *, + template TimeStamp p_timeStamp := * + ) :={ + notificationType := "AdjacentAppInfoNotification", + timeStamp := p_timeStamp, + adjacentAppInfo := p_adjacentAppInfo, + links := p_links + } // End of template mw_adjacent_app_info_notification + template (omit) ApplicationMobilityServiceAPI_TypesAndValues.ExpiryNotification m_expire_notification( - in Json.String p_notificationType, - in template (omit) TimeStamp p_timestamp := omit, - in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := omit + in template (value) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links, + in template (omit) TimeStamp p_timestamp := omit ) := { - notificationType := p_notificationType, + notificationType := "ExpiryNotification", timeStamp := p_timestamp, links := p_links } // End of template m_expire_notification template (present) ApplicationMobilityServiceAPI_TypesAndValues.ExpiryNotification mw_expire_notification( - template (present) Json.String p_notificationType := ?, - template TimeStamp p_timestamp := *, - template ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := * + template (present) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := ?, + template TimeStamp p_timestamp := * ) := { - notificationType := p_notificationType, + notificationType := "ExpiryNotification", timeStamp := p_timestamp, links := p_links } // End of template mw_expire_notification + template (value) ApplicationMobilityServiceAPI_TypesAndValues.SubscriptionLinkList m_subscription_link_list( + in template (value) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links, + in template (value) ApplicationMobilityServiceAPI_TypesAndValues.Subscription p_subscription + ) := { + links := p_links, + subscription := p_subscription + } // End of template m_subscription_link_list + + template (present) ApplicationMobilityServiceAPI_TypesAndValues.SubscriptionLinkList mw_subscription_link_list( + template (present) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := ?, + template (present) ApplicationMobilityServiceAPI_TypesAndValues.Subscription p_subscription := ? + ) := { + links := p_links, + subscription := p_subscription + } // End of template mw_subscription_link_list + + template (value) ApplicationMobilityServiceAPI_TypesAndValues.Links m_links( + in template (value) ApplicationMobilityServiceAPI_TypesAndValues.LinkType p_self_ + ) := { + self_ := p_self_ + } // End of template m_links + + template (present) ApplicationMobilityServiceAPI_TypesAndValues.Links mw_links( + template (present) ApplicationMobilityServiceAPI_TypesAndValues.LinkType p_self_ := ? + ) := { + self_ := p_self_ + } // End of template mw_links + + template (value) ApplicationMobilityServiceAPI_TypesAndValues.Subscription m_subscription( + in template (value) Json.AnyURI p_href, + in template (value) Json.String p_subscriptionType + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template m_subscription + + template (present) ApplicationMobilityServiceAPI_TypesAndValues.Subscription mw_subscription( + template (present) Json.AnyURI p_href := ?, + template (present) Json.String p_subscriptionType := ? + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template mw_subscription + } // End of module ApplicationMobilityServiceAPI_Templates diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn index 4a79f59..f6dc762 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn @@ -85,6 +85,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { MECHostInformation mecHostInformation optional, Json.String registeredInstanceId optional } + type record of AdjacentAppInstanceInfo AdjacentAppInstanceInfos; /** * @desc This type represents a subscription to mobility procedure notifications from AMS @@ -98,7 +99,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.2-1: Attributes of the MobilityProcedureSubscription */ type record MobilityProcedureSubscription { - Json.String subscriptionType, + Json.String subscriptionType, Json.AnyURI callbackReference optional, Json.Bool requestTestNotification optional, WebsockNotifConfig websockNotifConfig optional, @@ -123,10 +124,14 @@ module ApplicationMobilityServiceAPI_TypesAndValues { /** * @desc List of filtering criteria for the subscription * @member appInstanceId Identifier of the application instance that registers to the Application Mobility Service + * @member associateId Identifiers to associate the information for specific UE(s) and flow(s) + * @member mobilityStatus In case mobilityStatus is not included in the subscription request * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.2-1: Attributes of the MobilityProcedureSubscription */ type record FilterCriteria { - Json.String appInstanceId optional + Json.String appInstanceId optional, + AssociateId associateId optional, + MobilityStatus mobilityStatus optional } type record of FilterCriteria FilterCriterias; @@ -203,7 +208,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { AssociateId associateId, MobilityStatus mobilityStatus, TargetAppInfo targetAppInfo optional, - Links_Notification links + Links links } with { variant (links) "name as '_links'"; } @@ -231,15 +236,6 @@ module ApplicationMobilityServiceAPI_TypesAndValues { variant "JSON: as number" } - /** - * @desc Object containing hyperlinks related to the resource - * @member subscription Link to the related subscription - * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.2-1: Attributes of the MobilityProcedureNotification - */ - type record Links_Notification { - LinkType subscription - } - /** * @desc This type represents a notification from AMS with regards to change on adjacent application instances information * @member notificationType Shall be set to "MobilityProcedureNotification" @@ -252,7 +248,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { Json.String notificationType, TimeStamp timeStamp optional, AdjacentAppInfo adjacentAppInfo optional, - Links_Notification links + Links links } with { variant (links) "name as '_links'"; } @@ -269,7 +265,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { type record ExpiryNotification { Json.String notificationType, TimeStamp timeStamp optional, - Links_Notification links + Links links } with { variant (links) "name as '_links'"; } @@ -303,7 +299,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { */ type record TestNotification { Json.String notificationType, - Links_Notification links + Links links } with { variant (links) "name as '_links'"; } diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index 8bda338..c074fe3 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -44,7 +44,9 @@ module LibMec_Pixits { modulepar charstring PX_ME_DEVICE_APP_URI := "dev_app/v1"; - modulepar charstring PX_ME_APP_AMS_URI := "amsi/v1/appMobilityServices" + modulepar charstring PX_ME_APP_AMS_URI := "amsi/v1/app_mobility_services" + + modulepar charstring PX_ME_APP_AMS_QUERIES_URI := "amsi/v1/queries/adjacent_app_instances" modulepar charstring PX_ME_APP_AMS_SUBS := "amsi/v1/subscriptions"; diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index 373d25b..2dc8d1c 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -85,9 +85,15 @@ module LibHttp_JsonMessageBodyTypes { TrafficRuleList trafficRuleList, TrafficRule trafficRule, /*AppMobilityServiceInfo appMobilityServiceInfo,*/ - RegistrationInfo registrationInfo, - ApplicationMobilityServiceAPI_TypesAndValues.MobilityProcedureSubscription subscriptionLinkList_ams, - ApplicationMobilityServiceAPI_TypesAndValues.AdjacentAppInfoSubscription adjacentAppInfoSubscription_ams, + RegistrationInfos registrationInfos, + RegistrationInfo registrationInfo, + AdjacentAppInstanceInfos adjacentAppInstanceInfos, + AdjacentAppInstanceInfo adjacentAppInstanceInfo, + MobilityProcedureSubscription mobilityProcedureSubscription, + AdjacentAppInfoSubscription adjacentAppInfoSubscription, + MobilityProcedureNotification mobilityProcedureNotification, + AdjacentAppInfoNotification adjacentAppInfoNotification, + ApplicationMobilityServiceAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList_ams, ApplicationMobilityServiceAPI_TypesAndValues.ExpiryNotification expireNotification_ams, /* ApplicationMobilityServiceAPI_TypesAndValues.RegistrationRequestWithError registrationRequestWithError_ams, */ GrantRequest grantRequest, diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn index 71dc97c..553c55c 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -331,62 +331,114 @@ module LibHttp_JsonTemplates { group application_mobilty_service_api { - // template (value) JsonBody m_body_json_app_mobility_service_info( - // in template (value) AppMobilityServiceInfo p_app_mobility_service_info - // ) := { - // appMobilityServiceInfo := p_app_mobility_service_info - // } // End of template mw_body_json_app_mobility_service_info - - // template (present) JsonBody mw_body_json_app_mobility_service_info( - // template (present) AppMobilityServiceInfo p_app_mobility_service_info := ? - // ) := { - // appMobilityServiceInfo := p_app_mobility_service_info - // } // End of template mw_body_json_app_mobility_service_info + template (value) JsonBody m_body_json_ams_registration_info_list( + in template (value) RegistrationInfos p_registrationInfos + ) := { + registrationInfos := p_registrationInfos + } // End of template m_body_json_ams_registration_info_list + template (present) JsonBody mw_body_json_ams_registration_info_list( + template (present) RegistrationInfos p_registrationInfos := ? + ) := { + registrationInfos := p_registrationInfos + } // End of template mw_body_json_ams_registration_info_list template (value) JsonBody m_body_json_ams_registration_info( in template (value) RegistrationInfo p_registrationInfo - ) := { + ) := { registrationInfo := p_registrationInfo } // End of template m_body_json_ams_registration_info - template (present) JsonBody mw_body_json_ams_registration_request( - template (present) RegistrationInfo p_registrationInfo := ? - ) := { + template (present) JsonBody mw_body_json_ams_registration_info( + template (present) RegistrationInfo p_registrationInfo := ? + ) := { registrationInfo := p_registrationInfo - } // End of template mw_body_json_ams_registration_request - - // template (value) JsonBody m_body_json_ams_registration_request_with_error( - // in template (value) ApplicationMobilityServiceAPI_TypesAndValues.RegistrationRequestWithError p_registrationRequestWithError - // ) := { - // registrationRequestWithError_ams := p_registrationRequestWithError - // } // End of template m_body_json_ue_identity_problem_details - - // template (present) JsonBody mw_body_json_ams_subscriptions( - // template (present) ApplicationMobilityServiceAPI_TypesAndValues.MobilityProcedureSubscription p_amsSubscriptionLinkList := ? - // ) := { - // subscriptionLinkList_ams := p_amsSubscriptionLinkList - // } // End of template mw_body_json_ue_identity_problem_details - - template (present) JsonBody m_body_json_ams_subscriptions( - template (present) ApplicationMobilityServiceAPI_TypesAndValues.MobilityProcedureSubscription p_amsSubscriptionLinkList := ? - ) := { + } // End of template mw_body_json_ams_registration_info + + template (value) JsonBody m_body_json_ams_adjacent_app_instance_info_list( + in template (value) AdjacentAppInstanceInfos p_adjacentAppInstanceInfos + ) := { + adjacentAppInstanceInfos := p_adjacentAppInstanceInfos + } // End of template m_body_json_ams_adjacent_app_instance_info_list + + template (present) JsonBody mw_body_json_ams_adjacent_app_instance_info_list( + template (present) AdjacentAppInstanceInfos p_adjacentAppInstanceInfos := ? + ) := { + adjacentAppInstanceInfos := p_adjacentAppInstanceInfos + } // End of template mw_body_json_ams_adjacent_app_instance_info_list + + template (value) JsonBody m_body_json_ams_adjacent_app_instance_info( + in template (value) AdjacentAppInstanceInfo p_adjacentAppInstanceInfo + ) := { + adjacentAppInstanceInfo := p_adjacentAppInstanceInfo + } // End of template m_body_json_ams_adjacent_app_instance_info + + template (present) JsonBody mw_body_json_ams_adjacent_app_instance_info( + template (present) AdjacentAppInstanceInfo p_adjacentAppInstanceInfo := ? + ) := { + adjacentAppInstanceInfo := p_adjacentAppInstanceInfo + } // End of template mw_body_json_ams_adjacent_app_instance_info + + template (value) JsonBody m_body_json_ams_subscriptions( + in template (value) ApplicationMobilityServiceAPI_TypesAndValues.SubscriptionLinkList p_amsSubscriptionLinkList + ) := { subscriptionLinkList_ams := p_amsSubscriptionLinkList - } // End of template mw_body_json_ue_identity_problem_details + } // End of template m_body_json_ams_subscriptions + template (present) JsonBody mw_body_json_ams_subscriptions( + template (present) ApplicationMobilityServiceAPI_TypesAndValues.SubscriptionLinkList p_amsSubscriptionLinkList := ? + ) := { + subscriptionLinkList_ams := p_amsSubscriptionLinkList + } // End of template mw_body_json_ams_subscriptions + + template (value) JsonBody m_body_json_ams_mobility_procedure_subscription( + in template (value) MobilityProcedureSubscription p_mobilityProcedureSubscription + ) := { + mobilityProcedureSubscription := p_mobilityProcedureSubscription + } // End of template m_body_json_ams_mobility_procedure_subscription + + template (present) JsonBody mw_body_json_ams_mobility_procedure_subscription( + template (present) MobilityProcedureSubscription p_mobilityProcedureSubscription + ) := { + mobilityProcedureSubscription := p_mobilityProcedureSubscription + } // End of template mw_body_json_ams_mobility_procedure_subscription + + template (value) JsonBody m_body_json_ams_adjacent_appInfo_subscription( + in template (value) AdjacentAppInfoSubscription p_adjacentAppInfoSubscription + ) := { + adjacentAppInfoSubscription := p_adjacentAppInfoSubscription + } // End of template m_body_json_ams_adjacent_appInfo_subscription + + template (present) JsonBody mw_body_json_ams_adjacent_appInfo_subscription( + template (present) AdjacentAppInfoSubscription p_adjacentAppInfoSubscription + ) := { + adjacentAppInfoSubscription := p_adjacentAppInfoSubscription + } // End of template mw_body_json_ams_adjacent_appInfo_subscription + + template (value) JsonBody m_body_json_mobility_procedure_notification( + in template (value) MobilityProcedureNotification p_mobilityProcedureNotification + ) := { + mobilityProcedureNotification := p_mobilityProcedureNotification + } // End of template m_body_json_mobility_procedure_notification template (present) JsonBody mw_body_json_mobility_procedure_notification( - template (present) ApplicationMobilityServiceAPI_TypesAndValues.MobilityProcedureSubscription p_amsSubscriptionLinkList := ? - ) := { - subscriptionLinkList_ams := p_amsSubscriptionLinkList + template (present) MobilityProcedureNotification p_mobilityProcedureNotification := ? + ) := { + mobilityProcedureNotification := p_mobilityProcedureNotification } // End of template mw_body_json_mobility_procedure_notification - template (present) JsonBody mw_body_json_adjacent_application_info_notification( - template (present) ApplicationMobilityServiceAPI_TypesAndValues.AdjacentAppInfoSubscription p_adjacentAppInfoSubscription := ? - ) := { - adjacentAppInfoSubscription_ams := p_adjacentAppInfoSubscription - } // End of template mw_body_json_mobility_procedure_notification + template (value) JsonBody m_body_json_adjacent_app_info_notification( + in template (value) AdjacentAppInfoNotification p_adjacentAppInfoNotification + ) := { + adjacentAppInfoNotification := p_adjacentAppInfoNotification + } // End of template m_body_json_adjacent_app_info_notification + + template (present) JsonBody mw_body_json_adjacent_app_info_notification( + template (present) AdjacentAppInfoNotification p_adjacentAppInfoNotification := ? + ) := { + adjacentAppInfoNotification := p_adjacentAppInfoNotification + } // End of template mw_body_json_adjacent_app_info_notification template (present) JsonBody mw_body_json_expire_notification( template (present) ApplicationMobilityServiceAPI_TypesAndValues.ExpiryNotification p_expire_notification := ? -- GitLab From bb9651c66da2007649d6e281b88b0cbe07069728 Mon Sep 17 00:00:00 2001 From: garciay Date: Thu, 8 Feb 2024 08:05:17 +0100 Subject: [PATCH 52/58] TTF T027: Finalyze review MEC-016 --- .../AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn | 1 - .../ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn b/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn index 2f39915..904a4d0 100644 --- a/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn +++ b/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn @@ -11,7 +11,6 @@ */ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { - // JSON import from Json all; diff --git a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn index b70a27f..791a797 100644 --- a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn @@ -10,7 +10,6 @@ */ module DeviceApplicationInterfaceAPI_TypesAndValues { - // JSON import from Json all; @@ -51,9 +50,9 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { Json.String appDId, Json.String appName, Json.String appProvider, - Json.String appSoftVersion optional, + Json.String appSoftVersion, Json.String appDVersion, - Json.String appDescription optional, + Json.String appDescription, LocationConstraintsList appLocation optional, AppCharcs appCharcs optional } -- GitLab From 1b3a7c70a5895fb7f2adf2d3cbd0448361936bfe Mon Sep 17 00:00:00 2001 From: garciay Date: Fri, 8 Mar 2024 17:21:51 +0100 Subject: [PATCH 53/58] Validation VIS ATS against MEC Sanbox --- ccsrc/Protocols/Json/json_codec.cc | 12 +- .../AtsMec_V2XInformationService.cfg | 77 --------- .../AtsMec_V2XInformationService.cfg_ | 154 ++++++++++++++++++ .../AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn | 46 +++--- ...ec_V2XInformationServiceAPI_TestCases.ttcn | 140 +++++++++++----- ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn | 4 +- .../V2XInformationServiceAPI_Functions.ttcn | 6 +- .../ttcn/V2XInformationServiceAPI_Pixits.ttcn | 24 +-- .../V2XInformationServiceAPI_Templates.ttcn | 28 +++- ...XInformationServiceAPI_TypesAndValues.ttcn | 8 +- 10 files changed, 331 insertions(+), 168 deletions(-) delete mode 100644 etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg create mode 100644 etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg_ diff --git a/ccsrc/Protocols/Json/json_codec.cc b/ccsrc/Protocols/Json/json_codec.cc index 8d8bdec..aeb97ea 100644 --- a/ccsrc/Protocols/Json/json_codec.cc +++ b/ccsrc/Protocols/Json/json_codec.cc @@ -80,6 +80,12 @@ int json_codec::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTE const V2XInformationServiceAPI__TypesAndValues::PredictedQos& predicted_qos = msg.predictedQos(); predicted_qos.encode(V2XInformationServiceAPI__TypesAndValues::PredictedQos_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_v2xMsgDistributionServerInfo)) { + const V2XInformationServiceAPI__TypesAndValues::V2xMsgDistributionServerInfo& v2x_msg_distribution_server_info = msg.v2xMsgDistributionServerInfo(); + v2x_msg_distribution_server_info.encode(V2XInformationServiceAPI__TypesAndValues::V2xMsgDistributionServerInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_assocStaSubscription)) { const WlanInformationAPI__TypesAndValues::AssocStaSubscription& assoc_sta_subscription = msg.assocStaSubscription(); assoc_sta_subscription.encode(WlanInformationAPI__TypesAndValues::AssocStaSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); @@ -430,7 +436,11 @@ int json_codec::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); prov_chg_pc5_notification.decode(V2XInformationServiceAPI__TypesAndValues::ProvChgPc5Notification_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); msg.provChgPc5Notification() = prov_chg_pc5_notification; - + } else if (it->second.find("\"v2xMsgDistributionServer\"") != std::string::npos) { + V2XInformationServiceAPI__TypesAndValues::V2xMsgDistributionServerInfo v2x_msg_distribution_server_info; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + v2x_msg_distribution_server_info.decode(V2XInformationServiceAPI__TypesAndValues::V2xMsgDistributionServerInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.v2xMsgDistributionServerInfo() = v2x_msg_distribution_server_info; } else if (it->second.find("\"AssocStaSubscription\"") != std::string::npos) { if (it->second.find("\"subscription\"") != std::string::npos) { // SubscriptionLinkList diff --git a/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg b/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg deleted file mode 100644 index c79eb24..0000000 --- a/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg +++ /dev/null @@ -1,77 +0,0 @@ -[MODULE_PARAMETERS] -# This section shall contain the values of all parameters that are defined in your TTCN-3 modules. - -# IUT roles - -LibCommon_Time.PX_TAC := 30.0 -#LibCommon_Time.PX_TWAIT := 30.0 -LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; -LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; - -LibHttp_Pics.PICS_HEADER_HOST := "sandbox-mec.etsi.org" #"192.168.1.39" - -LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" -LibHttp_Pics.PICS_USE_TOKEN_HEADER := true -#LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" - -LibMec_Pics.PICS_ROOT_API := "/sbx8tunqyy/mep1" # Need to sign in on https://sandbox-mec.etsi.org/, section 'Try-it from your MEC application' - -LibMec_Pics.PICS_MEC_PLAT := true - -[LOGGING] -# In this section you can specify the name of the log file and the classes of events -# you want to log into the file or display on console (standard error). - -LogFile := "../logs/AtsMec_V2XInformationService/%e.%h-%r.%s" -#FileMask := LOG_ALL | USER | DEBUG | MATCHING -#ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING -FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT -ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT -LogSourceInfo := Stack -LogEntityName:= Yes -LogEventTypes:= Yes -#TimeStampFormat := DateTime - -[TESTPORT_PARAMETERS] -# In this section you can specify parameters that are passed to Test Ports. -system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=sandbox-mec.etsi.org,port=443,use_ssl=1,trusted_ca_list=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem,privkey=/home/yann/var/ssl/archive/yanngarcia.ddns.net/privkey1.pem,certificate=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem)" -system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=443,use_ssl=1,mutual_auth=1,mutual_tls=1,trusted_ca_list=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem,privkey=/home/yann/var/ssl/archive/yanngarcia.ddns.net/privkey1.pem,certificate=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem)" - -[DEFINE] -# In this section you can create macro definitions, -# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE]. - -[INCLUDE] -# To use configuration settings given in other configuration files, -# the configuration files just need to be listed in this section, with their full or relative pathnames. - -[ORDERED_INCLUDE] -# To use configuration settings given in other configuration files, -# the configuration files just need to be listed in this section, with their full or relative pathnames. - -[EXTERNAL_COMMANDS] -# This section can define external commands (shell scripts) to be executed by the ETS -# whenever a control part or test case is started or terminated. - -#BeginTestCase := "" -#EndTestCase := "" -#BeginControlPart := "" -#EndControlPart := "" - -[EXECUTE] -# In this section you can specify what parts of your test suite you want to execute. -AtsMec_TestControl.control - -[GROUPS] -# In this section you can specify groups of hosts. These groups can be used inside the -# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts. - -[COMPONENTS] -# This section consists of rules restricting the location of created PTCs. - -[MAIN_CONTROLLER] -# The options herein control the behavior of MC. -KillTimer := 10.0 -LocalAddress := 127.0.0.1 -TCPPort := 12000 -NumHCs := 1 diff --git a/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg_ b/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg_ new file mode 100644 index 0000000..bb44d0d --- /dev/null +++ b/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg_ @@ -0,0 +1,154 @@ +[MODULE_PARAMETERS] +# This section shall contain the values of all parameters that are defined in your TTCN-3 modules. + +# IUT roles + +LibCommon_Time.PX_TAC := 30.0 +#LibCommon_Time.PX_TWAIT := 30.0 +LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; +LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; + +LibHttp_Pics.PICS_HEADER_HOST := "mec-platform.etsi.org" #"192.168.1.39" + +LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" +LibHttp_Pics.PICS_USE_TOKEN_HEADER := true +#LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" + +LibMec_Pics.PICS_ROOT_API := "/sbxykqjr17/mep1/" # Need to sign in on https://mec-platform.etsi.org/, section 'Try-it from your MEC application' + +LibMec_Pics.PICS_MEC_PLAT := true + +# 5g-small-cell-1 +V2XInformationServiceAPI_Pixits.PX_V2X_ECGI := "268804901557" +V2XInformationServiceAPI_Pixits.PX_V2X_CELL_ID := "101010101" +V2XInformationServiceAPI_Pixits.PX_V2X_ECGI_LAT := 43.730846 +V2XInformationServiceAPI_Pixits.PX_V2X_ECGI_LONG := 7.415385 + +[LOGGING] +# In this section you can specify the name of the log file and the classes of events +# you want to log into the file or display on console (standard error). + +LogFile := "../logs/AtsMec_V2XInformationService/%e.%h-%r.%s" +FileMask := LOG_ALL | USER | DEBUG | MATCHING +ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING +#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT +#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT +LogSourceInfo := Stack +LogEntityName:= Yes +LogEventTypes:= Yes +#TimeStampFormat := DateTime + +[TESTPORT_PARAMETERS] +# In this section you can specify parameters that are passed to Test Ports. +system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=mec-platform.etsi.org,port=443,use_ssl=1,trusted_ca_list=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem,privkey=/home/yann/var/ssl/archive/yanngarcia.ddns.net/privkey1.pem,certificate=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem)" +system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=443,use_ssl=1,mutual_auth=1,mutual_tls=1,trusted_ca_list=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem,privkey=/home/yann/var/ssl/archive/yanngarcia.ddns.net/privkey1.pem,certificate=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem)" + +[DEFINE] +# In this section you can create macro definitions, +# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE]. + +[INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[ORDERED_INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[EXTERNAL_COMMANDS] +# This section can define external commands (shell scripts) to be executed by the ETS +# whenever a control part or test case is started or terminated. + +#BeginTestCase := "" +#EndTestCase := "" +#BeginControlPart := "" +#EndControlPart := "" + +[EXECUTE] +# In this section you can specify what parts of your test suite you want to execute. +#AtsMec_TestControl.control + +# Check that the IUT responds with a configured provisioning information over Uu unicast when queried by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_001_OK_01 +# Check that the IUT responds with a configured provisioning information over Uu unicast when queried by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_001_OK_02 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_001_BR +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_001_NF + +# Check that the IUT responds with a configured provisioning information over Uu MBMS when queried by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_OK_01 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_OK_02 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_BR +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_NF + +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_003_OK_01 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_003_OK_02 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_003_BR +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_003_NF + +# Check that the IUT processes properly a request to information of V2X Message Distribution servers +AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_004_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_004_BR +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_004_NF + +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_005_OK +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_005_BR +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_005_NF + +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_006_OK +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_006_BR + +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_01 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_02 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_03 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_04 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_05 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_BR + +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_01 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_02 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_03 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_04 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_05 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_BR + +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_01 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_02 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_03 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_04 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_05 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_BR +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_NF + +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_01 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_02 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_03 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_04 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_05 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_BR +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_NF + +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_OK_01 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_OK_02 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_OK_03 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_OK_04 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_OK_05 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_NF + +[GROUPS] +# In this section you can specify groups of hosts. These groups can be used inside the +# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts. + +[COMPONENTS] +# This section consists of rules restricting the location of created PTCs. + +[MAIN_CONTROLLER] +# The options herein control the behavior of MC. +KillTimer := 10.0 +LocalAddress := 127.0.0.1 +TCPPort := 12000 +NumHCs := 1 diff --git a/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn b/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn index 1e79a3c..7fd34ac 100644 --- a/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn +++ b/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn @@ -100,7 +100,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -809,7 +809,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ))))))); @@ -945,7 +945,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ))))))); @@ -1028,7 +1028,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1080,7 +1080,7 @@ module AtsMec_RnisAPI_TestCases { { mw_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1151,7 +1151,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1191,7 +1191,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ), @@ -1222,7 +1222,7 @@ module AtsMec_RnisAPI_TestCases { { mw_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1283,7 +1283,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1432,7 +1432,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1472,7 +1472,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1546,7 +1546,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1660,7 +1660,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")), v_headers ) ) @@ -1681,7 +1681,7 @@ module AtsMec_RnisAPI_TestCases { { *, mw_cell_user_info( mw_ecgi( mw_plmn, - PX_CELL_ID + PX_V2X_CELL_ID ), ? ), @@ -1804,7 +1804,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")), v_headers ) ) @@ -1826,7 +1826,7 @@ module AtsMec_RnisAPI_TestCases { -, // TODO use superset instead of { mw_associate_id }, mw_ecgi( mw_plmn, - PX_CELL_ID + PX_V2X_CELL_ID ) ) }, @@ -1872,7 +1872,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")), v_headers ) ) @@ -1945,7 +1945,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info_invalid?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info_invalid?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")), v_headers ) ) @@ -1999,7 +1999,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info?cell_id=" & oct2char(unichar2oct(PX_UNKNOWN_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info?cell_id=" & oct2char(unichar2oct(PX_V2X_UNKNOWN_CELL_ID, "UTF-8")), v_headers ) ) @@ -2161,7 +2161,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info_invalid?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info_invalid?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")), v_headers ) ) @@ -2215,7 +2215,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info?cell_id=" & oct2char(unichar2oct(PX_UNKNOWN_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info?cell_id=" & oct2char(unichar2oct(PX_V2X_UNKNOWN_CELL_ID, "UTF-8")), v_headers ) ) @@ -2269,7 +2269,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas_invalid?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas_invalid?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")), v_headers ) ) @@ -2323,7 +2323,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas?cell_id=" & oct2char(unichar2oct(PX_UNKNOWN_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas?cell_id=" & oct2char(unichar2oct(PX_V2X_UNKNOWN_CELL_ID, "UTF-8")), v_headers ) ) diff --git a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn index c698320..381f82b 100644 --- a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn +++ b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn @@ -65,7 +65,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?location_info=" & PX_V2X_ECGI, + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?location_info=ecgi," & PX_V2X_ECGI, v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -78,8 +78,26 @@ module AtsMec_V2XInformationServiceAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_uu_unicast_provisioning_info( - mw_uu_unicast_provisioning_info - ))))) { + mw_uu_unicast_provisioning_info( + { + mw_proInfoUuUnicast( + mw_location_info( + mw_ecgi( + PX_V2X_CELL_ID, + mw_plmn( + PX_MCC, + PX_MNC + )), + mw_location_info_geo_area( + PX_V2X_ECGI_LAT, + PX_V2X_ECGI_LONG + )), + mw_v2x_application_server( + PX_V2X_MC_SERVER, + PX_V2X_MC_PORT) + ) + } + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuUnicastProvisioningInfo ***"); @@ -132,8 +150,26 @@ module AtsMec_V2XInformationServiceAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_uu_unicast_provisioning_info( - mw_uu_unicast_provisioning_info - ))))) { + mw_uu_unicast_provisioning_info( + { + mw_proInfoUuUnicast( + mw_location_info( + mw_ecgi( + PX_V2X_CELL_ID, + mw_plmn( + PX_MCC, + PX_MNC + )), + mw_location_info_geo_area( + PX_V2X_ECGI_LAT, + PX_V2X_ECGI_LONG + )), + mw_v2x_application_server( + PX_V2X_MC_SERVER, + PX_V2X_MC_PORT) + ) + } + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuUnicastProvisioningInfo ***"); @@ -173,7 +209,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/invalid_uu_unicast_provisioning_info?location_info=" & PX_V2X_LATITUDE, + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?info=" & PX_V2X_LATITUDE, v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -224,7 +260,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?location_info=" & PX_V2X_UNKNOWN_ECGI, + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?location_info=ecgi," & PX_V2X_UNKNOWN_ECGI, v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -275,7 +311,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?location_info=" & PX_V2X_ECGI, + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?location_info=ecgi," & PX_V2X_ECGI, v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -434,7 +470,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?location_info=" & PX_V2X_UNKNOWN_ECGI, + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?location_info=ecgi," & PX_V2X_UNKNOWN_ECGI, v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -485,7 +521,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=" & PX_V2X_ECGI, + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=ecgi," & PX_V2X_ECGI, v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -644,7 +680,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=" & PX_V2X_UNKNOWN_ECGI, + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=ecgi," & PX_V2X_UNKNOWN_ECGI, v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -699,10 +735,13 @@ module AtsMec_V2XInformationServiceAPI_TestCases { v_headers, m_http_message_body_json( m_body_json_v2x_msg_distribution_server_info( - m_v2x_msg_distribution_server_info( + m_v2x_msg_distribution_server_info( + { m_v2x_msg_distribution_server( m_info_protocol - ))))))); + ) + } + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -714,10 +753,15 @@ module AtsMec_V2XInformationServiceAPI_TestCases { mw_http_message_body_json( mw_body_json_v2x_msg_distribution_server_info( mw_v2x_msg_distribution_server_info( - mw_v2x_msg_distribution_server( - mw_info_protocol, - mw_info_connection - ))))))) { + { + mw_v2x_msg_distribution_server( + m_info_protocol, + mw_info_connection( + PX_V2X_MC_SERVER, + oct2int(str2oct(PX_V2X_MC_PORT)) + )) + } + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct connection information ***"); @@ -734,7 +778,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { } // End of testcase TC_MEC_MEC030_SRV_V2X_004_OK /** - * @desc Check that the IUT processes properly a request to information of V2X Message Distribution servers + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ testcase TC_MEC_MEC030_SRV_V2X_004_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -762,12 +806,15 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_http_message_body_json( m_body_json_v2x_msg_distribution_server_info( m_v2x_msg_distribution_server_info( - m_v2x_msg_distribution_server( - m_info_protocol, - m_info_connection( // Wrong field value: Shall only be included in the response - PX_V2X_MSG_DISTRIBUTION_SERVER_IP_ADDRESS, - PX_V2X_MSG_DISTRIBUTION_SERVER_PORT - )))))))); + { + m_v2x_msg_distribution_server( + m_info_protocol, + m_info_connection( // Wrong field value: Shall only be included in the response + PX_V2X_MSG_DISTRIBUTION_SERVER_IP_ADDRESS, + PX_V2X_MSG_DISTRIBUTION_SERVER_PORT + )) + } + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -793,7 +840,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { } // End of testcase TC_MEC_MEC030_SRV_V2X_004_BR /** - * @desc Check that the IUT processes properly a request to information of V2X Message Distribution servers + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ testcase TC_MEC_MEC030_SRV_V2X_004_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -821,9 +868,12 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_http_message_body_json( m_body_json_v2x_msg_distribution_server_info( m_v2x_msg_distribution_server_info( - m_v2x_msg_distribution_server( - m_info_protocol(MQTT_SN) - ))))))); + { + m_v2x_msg_distribution_server( + m_info_protocol + ) + } + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -892,7 +942,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_route_info( m_location_info( m_ecgi( - PX_CELL_ID, + PX_V2X_CELL_ID, m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area(43.72, 10.41) @@ -904,7 +954,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_route_info( m_location_info( m_ecgi( - PX_CELL_ID, + PX_V2X_CELL_ID, m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area(43.75, 10.5) @@ -990,7 +1040,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_route_info( m_location_info( m_ecgi( - PX_CELL_ID, + PX_V2X_CELL_ID, m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area(43.72, 10.41) @@ -1002,7 +1052,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_route_info( m_location_info( m_ecgi( - PX_CELL_ID, + PX_V2X_CELL_ID, m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area(43.75, 10.5) @@ -1083,7 +1133,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_route_info( m_location_info( m_ecgi( - PX_UNKNOWN_CELL_ID, + PX_V2X_UNKNOWN_CELL_ID, m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area(43.72, 10.41) @@ -1095,7 +1145,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_route_info( m_location_info( m_ecgi( - PX_CELL_ID, + PX_V2X_CELL_ID, m_plmn(PX_UNKNOWN_MCC, PX_UNKNOWN_MNC) ), m_location_info_geo_area(43.75, 10.5) @@ -1165,7 +1215,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { -, -, -, m_location_info( m_ecgi( - PX_CELL_ID, + PX_V2X_CELL_ID, m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area(43.72, 10.41) // FIXME Use PIXITs @@ -1227,7 +1277,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { -, -, -, m_location_info( m_ecgi( - PX_CELL_ID, + PX_V2X_CELL_ID, m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area(43.72, 10.41) @@ -1630,7 +1680,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_prov_chg_uu_uni_filter_criteria( m_location_info( m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area( 43.72, @@ -1720,7 +1770,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_prov_chg_uu_mbms_filter_criteria( m_location_info( m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area( 43.72, @@ -1818,7 +1868,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { PX_V2X_DST_LAYER_2_ID, m_location_info( m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area( 43.72, @@ -2058,7 +2108,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_prov_chg_uu_uni_filter_criteria( m_location_info( m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area( 43.72, @@ -2552,7 +2602,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_prov_chg_uu_uni_filter_criteria( m_location_info( m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area( 43.77, @@ -2632,7 +2682,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_prov_chg_uu_mbms_filter_criteria( m_location_info( m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area( 43.77, @@ -2720,7 +2770,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { PX_V2X_DST_LAYER_2_ID, m_location_info( m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area( 43.77, @@ -2931,7 +2981,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_prov_chg_uu_uni_filter_criteria( m_location_info( m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area( 43.72, @@ -3004,7 +3054,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_prov_chg_uu_uni_filter_criteria( m_location_info( m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area( 43.72, diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn index c5deed7..3277c32 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn @@ -21,9 +21,9 @@ module RnisAPI_Pixits { modulepar Json.String PX_ASSOCIATE_ID_VALUE := "192.0.0.2"; - modulepar CellId PX_CELL_ID := "0x0800000A"; + modulepar CellId PX_V2X_CELL_ID := "0x0800000A"; - modulepar CellId PX_UNKNOWN_CELL_ID := "0x0800000A"; + modulepar CellId PX_V2X_UNKNOWN_CELL_ID := "0x0800000A"; modulepar CellId PX_C_ID := "0xFFFFFFFF"; diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Functions.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Functions.ttcn index 2a9abbb..7f606ce 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Functions.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Functions.ttcn @@ -56,7 +56,7 @@ module V2XInformationServiceAPI_Functions { m_prov_chg_uu_uni_filter_criteria( m_location_info( m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area( 43.72, @@ -150,7 +150,7 @@ module V2XInformationServiceAPI_Functions { m_prov_chg_uu_mbms_filter_criteria( m_location_info( m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area( 43.72, @@ -253,7 +253,7 @@ module V2XInformationServiceAPI_Functions { PX_V2X_DST_LAYER_2_ID, m_location_info( m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area( 43.72, diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Pixits.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Pixits.ttcn index 0d6601f..e58c575 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Pixits.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Pixits.ttcn @@ -6,21 +6,25 @@ module V2XInformationServiceAPI_Pixits { // JSON import from Json all; - modulepar charstring PX_V2X_ECGI := "ecgi,135792468"; + modulepar charstring PX_V2X_ECGI := "268804901557"; - modulepar charstring PX_V2X_UNKNOWN_ECGI := "ecgi,1357924689"; + modulepar charstring PX_V2X_CELL_ID := "101010101"; - modulepar charstring PX_V2X_LATITUDE := "latitude,000.000,001.000,longitude,000.000,001.000"; + modulepar Json.Number PX_V2X_ECGI_LAT := 43.730846; - modulepar charstring PX_LOC_GRANULARITY := "17"; + modulepar Json.Number PX_V2X_ECGI_LONG := 7.415385; + + modulepar charstring PX_V2X_UNKNOWN_ECGI := "1357924689"; - modulepar charstring PX_CELL_ID := "4680"; + modulepar charstring PX_V2X_UNKNOWN_CELL_ID := "666666666"; - modulepar charstring PX_UNKNOWN_CELL_ID := "4680"; + modulepar charstring PX_V2X_LATITUDE := "latitude,43.730846,longitude,7.415385"; + + modulepar charstring PX_LOC_GRANULARITY := "17"; - modulepar charstring PX_MCC := "135"; + modulepar charstring PX_MCC := "1"; - modulepar charstring PX_MNC := "792"; + modulepar charstring PX_MNC := "1"; modulepar charstring PX_UNKNOWN_MCC := "136"; @@ -44,9 +48,9 @@ module V2XInformationServiceAPI_Pixits { modulepar charstring PX_V2X_MBMS_SERVICE_ID := ""; - modulepar charstring PX_V2X_MC_SERVER := ""; + modulepar charstring PX_V2X_MC_SERVER := "test.mosquito.org"; - modulepar charstring PX_V2X_MC_PORT := ""; + modulepar charstring PX_V2X_MC_PORT := "1338"; modulepar charstring PX_V2X_SERVICE_AREA_ID := ""; diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn index 63a5bb4..dc06b56 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn @@ -71,8 +71,28 @@ module V2XInformationServiceAPI_Templates { proInfoPc5 := p_proInfoPc5 } // End of template mw_pc5_provisioning_info + template (omit) ProInfoUuUnicast m_proInfoUuUnicast( + in template (value) LocationInfo p_locationInfo, + in template (value) V2xApplicationServer p_v2xApplicationServer, + in template (omit) UuUniNeighbourCellInfoList p_neighbourCellInfo := omit + ) := { + locationInfo := p_locationInfo, + v2xApplicationServer := p_v2xApplicationServer, + neighbourCellInfo := p_neighbourCellInfo + } // End of template m_proInfoUuUnicast + + template (present) ProInfoUuUnicast mw_proInfoUuUnicast( + template (present) LocationInfo p_locationInfo := ?, + template (present) V2xApplicationServer p_v2xApplicationServer := ?, + template UuUniNeighbourCellInfoList p_neighbourCellInfo := omit + ) := { + locationInfo := p_locationInfo, + v2xApplicationServer := p_v2xApplicationServer, + neighbourCellInfo := p_neighbourCellInfo + } // End of template mw_proInfoUuUnicast + template (omit) V2xMsgDistributionServerInfo m_v2x_msg_distribution_server_info( - in template (value) V2xMsgDistributionServer p_v2xMsgDistributionServer, + in template (value) V2xMsgDistributionServers p_v2xMsgDistributionServer, in template (omit) LocationInfo p_locationInfo := omit ) := { v2xMsgDistributionServer := p_v2xMsgDistributionServer, @@ -80,7 +100,7 @@ module V2XInformationServiceAPI_Templates { } // End of template m_v2x_msg_distribution_server_info template (present) V2xMsgDistributionServerInfo mw_v2x_msg_distribution_server_info( - template (present) V2xMsgDistributionServer p_v2xMsgDistributionServer := ?, + template (present) V2xMsgDistributionServers p_v2xMsgDistributionServer := ?, template LocationInfo p_locationInfo := * ) := { v2xMsgDistributionServer := p_v2xMsgDistributionServer, @@ -104,7 +124,7 @@ module V2XInformationServiceAPI_Templates { } // End of template mw_v2x_msg_distribution_server template (value) InfoProtocol m_info_protocol( - in MsgProtocol p_msgProtocol := MQTT_v3_1_1, + in MsgProtocols p_msgProtocol := { MQTT_v3_1_1 }, in Json.String p_protImplementation := PX_PROT_IMPLEMENTATION ) := { msgProtocol := p_msgProtocol, @@ -112,7 +132,7 @@ module V2XInformationServiceAPI_Templates { } // End of template m_info_protocol template (present) InfoProtocol mw_info_protocol( - template (present) MsgProtocol p_msgProtocol := MQTT_v3_1_1, + template (present) MsgProtocols p_msgProtocol := { MQTT_v3_1_1 }, template (present) Json.String p_protImplementation := PX_PROT_IMPLEMENTATION ) := { msgProtocol := p_msgProtocol, diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn index b39391d..eff1971 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn @@ -97,8 +97,8 @@ module V2XInformationServiceAPI_TypesAndValues { * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.5-1: Attributes of the V2xMsgDistributionServerInfo */ type record V2xMsgDistributionServerInfo { - V2xMsgDistributionServer v2xMsgDistributionServer, - LocationInfo locationInfo optional + V2xMsgDistributionServers v2xMsgDistributionServer, + LocationInfo locationInfo optional } /** @@ -794,6 +794,7 @@ module V2XInformationServiceAPI_TypesAndValues { InfoProtocol infoProtocol, InfoConnection infoConnection optional } + type record of V2xMsgDistributionServer V2xMsgDistributionServers; /** * @desc Specifics of the application layer protocol of V2X Message Distribution Server @@ -802,7 +803,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.16-1: Attributes of the V2xMsgDistributionServer */ type record InfoProtocol { - MsgProtocol msgProtocol, + MsgProtocols msgProtocol, Json.String protImplementation } @@ -819,6 +820,7 @@ module V2XInformationServiceAPI_TypesAndValues { } with { variant "JSON: as number" } + type record of MsgProtocol MsgProtocols /** * @desc Connection information of the V2X Message Distribution Server the service consumer can use for direct connection -- GitLab From 207a72dbbbaf2e19e655fad0ded961c395be31a9 Mon Sep 17 00:00:00 2001 From: garciay Date: Sun, 10 Mar 2024 15:00:30 +0100 Subject: [PATCH 54/58] Validation VIS ATS against MEC Sanbox --- ccsrc/Protocols/Json/json_codec.cc | 27 ++++-- .../AtsMec_V2XInformationService.cfg_ | 20 ++++- ...ec_V2XInformationServiceAPI_TestCases.ttcn | 87 +++++++++++++++++-- ..._V2XInformationServiceAPI_TestControl.ttcn | 3 +- 4 files changed, 116 insertions(+), 21 deletions(-) diff --git a/ccsrc/Protocols/Json/json_codec.cc b/ccsrc/Protocols/Json/json_codec.cc index aeb97ea..5d072d6 100644 --- a/ccsrc/Protocols/Json/json_codec.cc +++ b/ccsrc/Protocols/Json/json_codec.cc @@ -67,33 +67,42 @@ int json_codec::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTE } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_trafficRule)) { const EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRule& traffic_rule = msg.trafficRule(); traffic_rule.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRule_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_bwInfo)) { const TrafficManagementAPI__TypesAndValues::BwInfo& bw_info = msg.bwInfo(); bw_info.encode(TrafficManagementAPI__TypesAndValues::BwInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_mtsSessionInfo)) { const TrafficManagementAPI__TypesAndValues::MtsSessionInfo& mts_session_info = msg.mtsSessionInfo(); mts_session_info.encode(TrafficManagementAPI__TypesAndValues::MtsSessionInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_predictedQos)) { const V2XInformationServiceAPI__TypesAndValues::PredictedQos& predicted_qos = msg.predictedQos(); predicted_qos.encode(V2XInformationServiceAPI__TypesAndValues::PredictedQos_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; - + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_v2xMsgDistributionServerInfo)) { const V2XInformationServiceAPI__TypesAndValues::V2xMsgDistributionServerInfo& v2x_msg_distribution_server_info = msg.v2xMsgDistributionServerInfo(); v2x_msg_distribution_server_info.encode(V2XInformationServiceAPI__TypesAndValues::V2xMsgDistributionServerInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_provChgUuUniSubscription)) { + const V2XInformationServiceAPI__TypesAndValues::ProvChgUuUniSubscription& prov_chg_uu_uni_subscription = msg.provChgUuUniSubscription(); + prov_chg_uu_uni_subscription.encode(V2XInformationServiceAPI__TypesAndValues::ProvChgUuUniSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_provChgUuMbmsSubscription)) { + const V2XInformationServiceAPI__TypesAndValues::ProvChgUuMbmsSubscription& prov_chg_uu_mbms_subscription = msg.provChgUuMbmsSubscription(); + prov_chg_uu_mbms_subscription.encode(V2XInformationServiceAPI__TypesAndValues::ProvChgUuMbmsSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_assocStaSubscription)) { const WlanInformationAPI__TypesAndValues::AssocStaSubscription& assoc_sta_subscription = msg.assocStaSubscription(); assoc_sta_subscription.encode(WlanInformationAPI__TypesAndValues::AssocStaSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_staDataRateSubscription)) { const WlanInformationAPI__TypesAndValues::StaDataRateSubscription& sta_data_rate_subscription = msg.staDataRateSubscription(); sta_data_rate_subscription.encode(WlanInformationAPI__TypesAndValues::StaDataRateSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else { loggers::get_instance().error("json_codec::encode: Not supported"); } @@ -335,7 +344,7 @@ int json_codec::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes RnisAPI__TypesAndValues::RabRelSubscription rab_rel_subscription; rab_rel_subscription.decode(RnisAPI__TypesAndValues::RabRelSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.rabRelSubscription() = rab_rel_subscription; - } else if ((it->second.find("\"_links\"") != std::string::npos) && (it->second.find("subscriptions") != std::string::npos)) { // SubscriptionLinkList + } else if ((it->second.find("\"_links\"") != std::string::npos) && (it->second.find("subscriptions\"") != std::string::npos)) { // SubscriptionLinkList // FIXME Conflict with MEC-028 SubscriptionLinkList data type RnisAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; subscription_link_list.decode(RnisAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); diff --git a/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg_ b/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg_ index bb44d0d..4a16139 100644 --- a/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg_ +++ b/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg_ @@ -23,6 +23,7 @@ V2XInformationServiceAPI_Pixits.PX_V2X_ECGI := "268804901557" V2XInformationServiceAPI_Pixits.PX_V2X_CELL_ID := "101010101" V2XInformationServiceAPI_Pixits.PX_V2X_ECGI_LAT := 43.730846 V2XInformationServiceAPI_Pixits.PX_V2X_ECGI_LONG := 7.415385 +V2XInformationServiceAPI_Pixits.PX_PROV_UU_UNI_SUB_CALLBACK := "https://yanngarcia.ddns.net:36001/vis/v2/" [LOGGING] # In this section you can specify the name of the log file and the classes of events @@ -89,7 +90,7 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_003_NF # Check that the IUT processes properly a request to information of V2X Message Distribution servers -AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_004_OK +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_004_OK # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_004_BR # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application @@ -109,19 +110,32 @@ AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_004_OK #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_05 #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_BR +# Check that the IUT responds with the requested to create a subscription - ProvChgUuUniSubscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_01 +# Check that the IUT responds with the requested to create a subscription - ProvChgUuMbmsSubscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_02 +# Check that the IUT responds with the requested to create a subscription - ProvChgPc5Subscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_03 +# Check that the IUT responds with the requested to create a subscription - V2xMsgSubscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_04 +# Check that the IUT responds with the requested to create a subscription - PredQosSubscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_05 -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_BR +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Wrong SubscriptionType +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_BR_01 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - No Callback neitheir WebSocket +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_BR_02 +# Check that the IUT responds with the requested of subscription information when queried by a MEC Application - ProvChgUuUniSubscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_01 +# Check that the IUT responds with the requested of subscription information when queried by a MEC Application - ProvChgUuMbmsSubscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_02 +# Check that the IUT responds with the requested of subscription information when queried by a MEC Application - ProvChgPc5Subscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_03 +# Check that the IUT responds with the requested of subscription information when queried by a MEC Application - PredQosSubscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_04 +# Check that the IUT responds with the requested of subscription information when queried by a MEC Application - PredQosSubscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_05 -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_BR +AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_BR #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_NF #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_01 diff --git a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn index 381f82b..e1853cc 100644 --- a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn +++ b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn @@ -758,7 +758,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_info_protocol, mw_info_connection( PX_V2X_MC_SERVER, - oct2int(str2oct(PX_V2X_MC_PORT)) + str2int(PX_V2X_MC_PORT) )) } )))))) { @@ -870,7 +870,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_v2x_msg_distribution_server_info( { m_v2x_msg_distribution_server( - m_info_protocol + m_info_protocol({ AMQP_1_0 }) ) } )))))); @@ -1706,12 +1706,12 @@ module AtsMec_V2XInformationServiceAPI_TestCases { -, PX_PROV_UU_UNI_SUB_CALLBACK, ? - )))))) { + )))))) -> value v_response{ tc_ac.stop; // Check HTTP Location header if (f_check_headers(v_response.response.header) == false) { - log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + log("*** " & testcasename() & ": FAIL: IUT failed in ProvChgUuUniSubscription subscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } else { var charstring_list v_header_location; @@ -1723,6 +1723,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { ); log("*** " & testcasename() & ": PASS: IUT successfully responds with a provChgUuUniSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } } [] tc_ac.timeout { @@ -1820,6 +1821,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { ); log("*** " & testcasename() & ": PASS: IUT successfully responds with a provChgUuMbmsSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } } [] tc_ac.timeout { @@ -1907,6 +1909,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { ); log("*** " & testcasename() & ": PASS: IUT successfully responds with a provChgPc5Subscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } } [] tc_ac.timeout { @@ -2077,9 +2080,9 @@ module AtsMec_V2XInformationServiceAPI_TestCases { } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_05 /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Wrong SubscriptionType */ - testcase TC_MEC_MEC030_SRV_V2X_008_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC030_SRV_V2X_008_BR_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; @@ -2131,7 +2134,75 @@ module AtsMec_V2XInformationServiceAPI_TestCases { )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_008_BR_01 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - No Callback neitheir WebSocket + */ + testcase TC_MEC_MEC030_SRV_V2X_008_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_filter_criteria( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + )), + m_v2x_application_server( + oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), + oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) + )), + "" + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2142,7 +2213,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { // postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_008_BR + } // End of testcase TC_MEC_MEC030_SRV_V2X_008_BR_02 /** * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - ProvChgUuUniSubscription diff --git a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn index 0bbe65b..5b60233 100644 --- a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn +++ b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn @@ -50,7 +50,8 @@ module AtsMec_V2XInformationServiceAPI_TestControl { execute(TC_MEC_MEC030_SRV_V2X_008_OK_03()); execute(TC_MEC_MEC030_SRV_V2X_008_OK_04()); execute(TC_MEC_MEC030_SRV_V2X_008_OK_05()); - execute(TC_MEC_MEC030_SRV_V2X_008_BR()); + execute(TC_MEC_MEC030_SRV_V2X_008_BR_01()); + execute(TC_MEC_MEC030_SRV_V2X_008_BR_02()); execute(TC_MEC_MEC030_SRV_V2X_009_OK_01()); execute(TC_MEC_MEC030_SRV_V2X_009_OK_02()); -- GitLab From e28110e937f2b7cf435d3e03b1b9816966417738 Mon Sep 17 00:00:00 2001 From: garciay Date: Fri, 29 Mar 2024 10:27:40 +0100 Subject: [PATCH 55/58] Validation VIS ATS against MEC Sanbox --- ccsrc/Protocols/Json/json_codec.cc | 14 +++++++++++++- .../AtsMec_V2XInformationService.cfg_ | 18 ++++++++++++++---- titan-test-system-framework | 2 +- ...Mec_V2XInformationServiceAPI_TestCases.ttcn | 2 +- ...2XInformationServiceAPI_TypesAndValues.ttcn | 4 ++-- 5 files changed, 31 insertions(+), 9 deletions(-) diff --git a/ccsrc/Protocols/Json/json_codec.cc b/ccsrc/Protocols/Json/json_codec.cc index 5d072d6..452273c 100644 --- a/ccsrc/Protocols/Json/json_codec.cc +++ b/ccsrc/Protocols/Json/json_codec.cc @@ -92,7 +92,14 @@ int json_codec::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTE const V2XInformationServiceAPI__TypesAndValues::ProvChgUuMbmsSubscription& prov_chg_uu_mbms_subscription = msg.provChgUuMbmsSubscription(); prov_chg_uu_mbms_subscription.encode(V2XInformationServiceAPI__TypesAndValues::ProvChgUuMbmsSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; - + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_provChgPc5Subscription)) { + const V2XInformationServiceAPI__TypesAndValues::ProvChgPc5Subscription& prov_chg_pc5_subscription = msg.provChgPc5Subscription(); + prov_chg_pc5_subscription.encode(V2XInformationServiceAPI__TypesAndValues::ProvChgPc5Subscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_v2xMsgSubscription)) { + const V2XInformationServiceAPI__TypesAndValues::V2xMsgSubscription& v2x_msg_subscription = msg.v2xMsgSubscription(); + v2x_msg_subscription.encode(V2XInformationServiceAPI__TypesAndValues::V2xMsgSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_assocStaSubscription)) { @@ -428,6 +435,11 @@ int json_codec::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); prov_chg_pc5_subscription.decode(V2XInformationServiceAPI__TypesAndValues::ProvChgPc5Subscription_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); msg.provChgPc5Subscription() = prov_chg_pc5_subscription; + } else if (it->second.find("\"V2xMsgSubscription\"") != std::string::npos) { + V2XInformationServiceAPI__TypesAndValues::V2xMsgSubscription v2x_msg_subscription; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + v2x_msg_subscription.decode(V2XInformationServiceAPI__TypesAndValues::V2xMsgSubscription_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.v2xMsgSubscription() = v2x_msg_subscription; } else if (it->second.find("\"ProvChgUuUniNotification\"") != std::string::npos) { diff --git a/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg_ b/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg_ index 4a16139..9ea10db 100644 --- a/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg_ +++ b/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg_ @@ -23,7 +23,10 @@ V2XInformationServiceAPI_Pixits.PX_V2X_ECGI := "268804901557" V2XInformationServiceAPI_Pixits.PX_V2X_CELL_ID := "101010101" V2XInformationServiceAPI_Pixits.PX_V2X_ECGI_LAT := 43.730846 V2XInformationServiceAPI_Pixits.PX_V2X_ECGI_LONG := 7.415385 + +# Callbacks V2XInformationServiceAPI_Pixits.PX_PROV_UU_UNI_SUB_CALLBACK := "https://yanngarcia.ddns.net:36001/vis/v2/" +V2XInformationServiceAPI_Pixits.PX_PROV_V2X_SUB_CALLBACK := "https://yanngarcia.ddns.net:36001/vis/v2/" [LOGGING] # In this section you can specify the name of the log file and the classes of events @@ -67,7 +70,7 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server [EXECUTE] # In this section you can specify what parts of your test suite you want to execute. -#AtsMec_TestControl.control +#AtsMec_V2XInformationServiceAPI_TestControl.control # Check that the IUT responds with a configured provisioning information over Uu unicast when queried by a MEC Application #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_001_OK_01 @@ -79,7 +82,7 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_001_NF # Check that the IUT responds with a configured provisioning information over Uu MBMS when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_OK_01 +AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_OK_01 #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_OK_02 #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_BR #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_NF @@ -131,11 +134,13 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_02 # Check that the IUT responds with the requested of subscription information when queried by a MEC Application - ProvChgPc5Subscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_03 -# Check that the IUT responds with the requested of subscription information when queried by a MEC Application - PredQosSubscription +# Check that the IUT responds with the requested of subscription information when queried by a MEC Application - V2xMsgSubscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_04 # Check that the IUT responds with the requested of subscription information when queried by a MEC Application - PredQosSubscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_05 -AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_BR +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_BR +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_NF #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_01 @@ -146,10 +151,15 @@ AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_BR #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_BR #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_NF +# Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - ProvChgUuUniSubscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_OK_01 +# Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - ProvChgUuMbmsSubscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_OK_02 +# Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - ProvChgPc5Subscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_OK_03 +# Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - V2xMsgSubscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_OK_04 +# Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - PredQosSubscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_OK_05 #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_NF diff --git a/titan-test-system-framework b/titan-test-system-framework index 6901c1c..6959b8b 160000 --- a/titan-test-system-framework +++ b/titan-test-system-framework @@ -1 +1 @@ -Subproject commit 6901c1c381950f308d2b1643e90757248ae99eab +Subproject commit 6959b8be419f3755de6f888e24bfdc8de07383a7 diff --git a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn index e1853cc..f94289e 100644 --- a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn +++ b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn @@ -2553,7 +2553,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & "/vis/v2/subs/" & v_subscription_id, // Wrong URL + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "?sub="& v_subscription_id, // Wrong URL v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn index eff1971..c881fa0 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn @@ -763,8 +763,8 @@ module V2XInformationServiceAPI_TypesAndValues { map_ (5), ivi (6), ev_rsr(7) - } with { - variant "JSON: as number" + // } with { + // variant "JSON: as number" } type record of MsgType MsgTypeList; -- GitLab From c9bb0d8f6fa4829ed63d6085764a591c9f60a2d2 Mon Sep 17 00:00:00 2001 From: garciay Date: Thu, 4 Apr 2024 08:11:24 +0200 Subject: [PATCH 56/58] Change repo folder for TITAN --- virtualization/docker/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/virtualization/docker/Dockerfile b/virtualization/docker/Dockerfile index 2fdb13d..456149a 100644 --- a/virtualization/docker/Dockerfile +++ b/virtualization/docker/Dockerfile @@ -19,7 +19,7 @@ RUN \ # Clone Titan WORKDIR /home/etsi -RUN mkdir -p frameworks dev tmp && cd frameworks && git clone https://github.com/eclipse/titan.core.git || exit 1 +RUN mkdir -p frameworks dev tmp && cd frameworks && git clone https://gitlab.eclipse.org/eclipse/titan/titan.core.git || exit 1 WORKDIR /home/etsi/frameworks/titan.core/ # Setup ENV variables @@ -42,8 +42,8 @@ RUN \ WORKDIR /home/etsi/dev -ENV ATS=AtsCise +ENV ATS=AtsMec_V2XInformationService -EXPOSE 443/tcp +EXPOSE 80/tcp 443/tcp ENTRYPOINT /home/yann/dev/cise/virtualization/docker/docker-entrypoint.sh -- GitLab From 3ed089efac66449bdd3bb5339af0f81a386075e3 Mon Sep 17 00:00:00 2001 From: garciay Date: Thu, 11 Apr 2024 10:05:28 +0200 Subject: [PATCH 57/58] Validation MEC 011 ATS against MEC Sanbox; Bug fixed in virtualization --- ccsrc/Protocols/Json/json_codec.cc | 21 +- ...ormApplicationEnablementAPI_TestCases.ttcn | 539 ++++++++++-------- ...mApplicationEnablementAPI_TestControl.ttcn | 3 + ...ormApplicationEnablementAPI_Functions.ttcn | 123 +++- ...ormApplicationEnablementAPI_Templates.ttcn | 8 +- ...plicationEnablementAPI_TypesAndValues.ttcn | 4 +- ttcn/LibMec/ttcn/LibMec_Pixits.ttcn | 2 +- .../docker-dev/home/etc/init.d/20-eclipse.sh | 8 +- .../init.d/{40-ttf_t012.sh => 40-ttf_t027.sh} | 11 +- 9 files changed, 465 insertions(+), 254 deletions(-) rename virtualization/docker-dev/home/etc/init.d/{40-ttf_t012.sh => 40-ttf_t027.sh} (82%) diff --git a/ccsrc/Protocols/Json/json_codec.cc b/ccsrc/Protocols/Json/json_codec.cc index 452273c..89b366c 100644 --- a/ccsrc/Protocols/Json/json_codec.cc +++ b/ccsrc/Protocols/Json/json_codec.cc @@ -56,6 +56,21 @@ int json_codec::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTE const EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription& app = msg.appTerminationNotificationSubscription(); app.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = /*char2oct(CHARSTRING("{\"AppTerminationNotificationSubscription\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + + + + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_appTerminationConfirmation)) { + const EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationConfirmation& app = msg.appTerminationConfirmation(); + app.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationConfirmation_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = /*char2oct(CHARSTRING("{\"AppTerminationConfirmation\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_appReadyConfirmation)) { + const EdgePlatformApplicationEnablementAPI__TypesAndValues::AppReadyConfirmation& app = msg.appReadyConfirmation(); + app.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppReadyConfirmation_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = /*char2oct(CHARSTRING("{\"AppTerminationConfirmation\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + + + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_dnsRule)) { const EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRule& dns_rule = msg.dnsRule(); dns_rule.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRule_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); @@ -248,7 +263,11 @@ int json_codec::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes std::size_t it_stop = it_start + 4; loggers::get_instance().log("json_codec::decode: id_stop=%d", it_stop); loggers::get_instance().log("json_codec::decode: segment=%s", str.substr(it_start, it_stop - it_start).c_str()); - str = str.substr(0, it_start) + "{}" + str.substr(it_stop); + if ((str[it_start - 3] == 'n') || (str[it_start - 3] == 's')) { // fqdn or uris or addresses + str = str.substr(0, it_start) + "[]" + str.substr(it_stop); + } else { + str = str.substr(0, it_start) + "{}" + str.substr(it_stop); + } loggers::get_instance().log("json_codec::decode: After, str=%s", str.c_str()); } // End of 'while' statement decoding_buffer.clear(); diff --git a/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn index 6646ce9..05e406c 100644 --- a/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn +++ b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn @@ -53,6 +53,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Local variables var Headers v_headers; var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -67,16 +68,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble - f_create_service_info(v_service_info, v_headers); + f_create_service_info(v_service_info, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -90,16 +89,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { { *, mw_service_info( - v_service_info.serName, - -, -, -, -, -, - PX_APP_INSTANCE_ID + v_service_info.serName ), * } ))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfoList ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with to the service creation ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -109,7 +106,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_service_info(v_service_info); + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_001_OK @@ -119,9 +116,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { testcase TC_MEC_MEC011_SRV_APPSAQ_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var HttpMessage v_response; + var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control - if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; @@ -133,15 +133,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_service_info(v_service_info, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services?instance_id=" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID)), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services?instance_id=" & oct2char(unichar2oct(v_service_info.serInstanceId)), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -150,10 +149,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -163,9 +162,61 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_001_BR + /** + * @desc Check that the IUT responds with an error when a request with an unknown service is sent by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_APPSAQ_001_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services?ser_instance_id=" & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_NAME)), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_001_NF + /** * @desc Check that the IUT notifies the authorised relevant (subscribed) application instances when a new service for a given application instance is registered */ @@ -174,6 +225,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { var Headers v_headers; var HttpMessage v_response; var universal charstring v_service_name; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not (PICS_NOTIFICATIONS) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -193,16 +245,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", v_headers, m_http_message_body_json( m_body_json_service_info( m_service_info( v_service_name, - -, -, -, - m_service_info_link("m_service_info_link"), - -, - -, + -, -, -, -, -, -, m_transport_info( "transportId1", "TC_MEC_MEC011_SRV_APPSAQ_002_OK", @@ -224,31 +273,25 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_body_json_service_info( mw_service_info( v_service_name //serName - )))))) -> value v_response { + )))))) -> value v_response { tc_ac.stop; - if (f_check_headers(valueof(v_response.response.header)) == true) { -/* TODO how to test this as the notification is for another MEC Application? - and - // MEC 011, clause 6.4.2 - the IUT entity sends a notification_message containing - body containing - notificationType set to "SerAvailabilityNotification", - services containing - serName set to SERVICE_NAME - _links containing - subscription set to MP1_SUBSCRIPTION_A - ; - ; - ; - ; - to the MEC_APP_Subscriber entity -*/ + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in creating service ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services" & "/(?*)", + 0 + ); + + // TODO how to test this as the notification is for another MEC Application? log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfo and set notification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } else { - log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } } [] tc_ac.timeout { @@ -258,6 +301,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_002_OK @@ -287,7 +331,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", v_headers, m_http_message_body_json( m_body_json_service_info( @@ -296,13 +340,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { -, SUSPENDED, RAW, - m_service_info_link("m_service_info_link") - ) - ) - ) - ) - ) - ); + m_service_info_link("m_service_info_link") // Shall not be present in the request + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -311,10 +350,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -351,7 +390,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/services", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/services", v_headers, m_http_message_body_json( m_body_json_service_info( @@ -376,7 +415,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -395,6 +434,9 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { testcase TC_MEC_MEC011_SRV_APPSAQ_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var HttpMessage v_response; + var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -409,15 +451,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_service_info(v_service_info, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(PX_SERVICE_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(v_service_info.serInstanceId, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -429,9 +470,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_message_body_json( mw_body_json_service_info( mw_service_info( - -, -, -, -, -, - PX_SERVICE_ID - )))))) { + v_service_info.serName, + -, -, -, -, + v_service_info.serInstanceId + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfo ***"); @@ -444,6 +486,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_003_OK @@ -471,11 +514,9 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -484,10 +525,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found() - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -508,6 +549,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { var Headers v_headers; var charstring_list v_etag; var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -522,35 +564,21 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble - f_create_service_info(v_service_info, v_headers); - if (f_check_headers(v_headers, c_etag_http_header) == false) { - log("*** " & testcasename() & ": INCONC: 'ETag' HTTP header not set ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - f_get_header(v_headers, c_etag_http_header, v_etag); // TODO Check headers - // If-Match header needs to have a PROPER_ETAG + f_create_service_info(v_service_info, v_subscription_id); f_init_default_headers_list(-, -, v_headers); - f_set_headers_list({ "If-Match" }, v_etag, v_headers); httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(v_service_info.serName, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & v_subscription_id, v_headers, m_http_message_body_json( m_body_json_service_info( m_service_info( v_service_info.serName, PX_NEW_SERVICE_INFO_VERSION, - -, -, - m_service_info_link("m_service_info_link"), - -, -, + -, -, -, -, -, v_service_info.transportInfo - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -563,11 +591,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_body_json_service_info( mw_service_info( v_service_info.serName, - PX_NEW_SERVICE_INFO_VERSION - )))))) { + PX_NEW_SERVICE_INFO_VERSION, + -, -, -, -, -, + v_service_info.transportInfo + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfo ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a modified ServiceInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -577,7 +607,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_service_info(v_service_info); + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_004_OK @@ -589,6 +619,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { var Headers v_headers; var charstring_list v_etag; var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -603,38 +634,21 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble - f_create_service_info(v_service_info, v_headers); - if (f_check_headers(v_headers, c_etag_http_header) == false) { - log("*** " & testcasename() & ": INCONC: 'ETag' HTTP header not set ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - f_get_header(v_headers, c_etag_http_header, v_etag); // TODO Check headers - if (f_check_headers(v_headers, c_etag_http_header) == false) { - log("*** " & testcasename() & ": INCONC: 'ETag' HTTP header not set ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - f_get_header(v_headers, c_etag_http_header, v_etag); // TODO Check headers - // If-Match header needs to have a PROPER_ETAG + f_create_service_info(v_service_info, v_subscription_id); f_init_default_headers_list(-, -, v_headers); - f_set_headers_list({ "If-Match" }, v_etag, v_headers); httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(v_service_info.serName, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_service_info( - m_service_info( - v_service_info.serName & char(0, 0, 1, 111), - PX_NEW_SERVICE_INFO_VERSION, - -, -, - m_service_info_link("m_service_info_link") - ) - ) - ) - ) - ) - ); + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_service_info( + m_service_info( + v_service_info.serName, + PX_NEW_SERVICE_INFO_VERSION, + -, -, + m_service_info_link("m_service_info_link") + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -643,10 +657,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -656,7 +670,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_service_info(v_service_info); + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_004_BR @@ -685,7 +699,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_ID, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_service_info( @@ -694,12 +708,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { PX_NEW_SERVICE_INFO_VERSION, -, -, m_service_info_link("m_service_info_link") - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -708,10 +717,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -732,6 +741,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { var Headers v_headers; var charstring_list v_etag; var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -746,7 +756,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble - f_create_service_info(v_service_info, v_headers); + f_create_service_info(v_service_info, v_subscription_id); if (f_check_headers(v_headers, c_etag_http_header) == false) { log("*** " & testcasename() & ": INCONC: 'ETag' HTTP header not set ***"); f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); @@ -758,7 +768,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(v_service_info.serName, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(v_service_info.serName, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_service_info( @@ -796,10 +806,115 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_service_info(v_service_info); + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_004_PF + /** + * @desc Check that the IUT executes the deletion of a service for a given application instance when requested by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_APPSAQ_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_service_info(v_service_info, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds successfully to the service delation ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_005_OK + + /** + * @desc Check that the IUT responds with an error when a request for deletion of a unknown service is sent by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_APPSAQ_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & PX_NON_EXISTENT_SERVICE_NAME, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds successfully with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_005_NF + } // End of group app_saq /* @@ -923,6 +1038,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -938,7 +1054,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Preamble f_init_default_headers_list(-, -, v_headers); - //TODO Create a subsciption (see TC_MEC_MEC011_SRV_APPSUB_001_OK); httpPort.send( m_http_request( m_http_request_post( @@ -948,16 +1063,9 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_body_json_app_termination_notif_subscription( m_app_termination_notif_subscription( PX_APP_TERM_NOTIF_CALLBACK_URI, - -/*m_self( - { href := PX_HREF } - )*/, - "ID1"/*PX_APP_INSTANCE_ID*/ - ) - ) - ) - ) - ) - ); + -, + PX_APP_INSTANCE_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -969,16 +1077,26 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_message_body_json( mw_body_json_app_termination_notif_subscription( mw_app_termination_notif_subscription( - PX_APP_TERM_NOTIF_CALLBACK_URI - )))))) -> value v_response { + PX_APP_TERM_NOTIF_CALLBACK_URI, + mw_self, + PX_APP_INSTANCE_ID + )))))) -> value v_response { tc_ac.stop; - if (f_check_headers(valueof(v_response.response.header)) == true) { - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppTerminationNotificationSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } else { + if (f_check_headers(v_response.response.header) == false) { log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions" & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppTerminationNotificationSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } } [] tc_ac.timeout { @@ -988,6 +1106,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_app_termination_notif_subscription(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSUB_002_OK @@ -1026,12 +1145,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { { href := PX_HREF } ), PX_APP_INSTANCE_ID - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1040,7 +1154,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); @@ -1062,6 +1176,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { testcase TC_MEC_MEC011_SRV_APPSUB_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var AppTerminationNotificationSubscription v_app_termination_notification_subscription; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -1076,15 +1192,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_app_termination_notif_subscription(v_app_termination_notification_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & v_subscription_id, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1095,8 +1210,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_app_termination_notif_subscription( - mw_app_termination_notif_subscription - ))))) { + v_app_termination_notification_subscription + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppTerminationNotificationSubscription ***"); @@ -1109,6 +1224,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_app_termination_notif_subscription(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSUB_003_OK @@ -1138,9 +1254,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_request_get( PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1149,7 +1263,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); @@ -1171,6 +1285,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { testcase TC_MEC_MEC011_SRV_APPSUB_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var AppTerminationNotificationSubscription v_app_termination_notification_subscription; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -1185,15 +1301,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_app_termination_notif_subscription(v_app_termination_notification_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & v_subscription_id, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1202,7 +1317,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with no content ***"); @@ -1245,9 +1360,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_request_delete( PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1256,10 +1369,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1305,11 +1418,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_message_body_json( m_body_json_app_termination_confirmation( { operationAction := TERMINATING } - ) - ) - ) - ) - ); + ))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1318,7 +1427,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppTerminationConf ***"); @@ -1363,11 +1472,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_message_body_json( m_body_json_app_termination_confirmation( { operationAction := TERMINATING } - ) - ) - ) - ) - ); + ))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1376,7 +1481,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); @@ -1421,11 +1526,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_message_body_json( m_body_json_app_ready_confirmation( { indication := "READY" } - ) - ) - ) - ) - ); + ))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1434,7 +1535,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppReadyConf ***"); @@ -1479,11 +1580,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_message_body_json( m_body_json_app_ready_confirmation( { indication := "READY" } - ) - ) - ) - ) - ); + ))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1492,7 +1589,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); @@ -2000,6 +2097,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Local variables var Headers v_headers; var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -2014,16 +2112,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble - f_create_service_info(v_service_info, v_headers); + f_create_service_info(v_service_info, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( PICS_ROOT_API & PX_LINK_LIV, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2036,7 +2132,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_body_json_srv_liveness_info( mw_service_liveness_info( ACTIVE - )))))) { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceLivenessInfo ***"); @@ -2049,7 +2145,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_service_info(v_service_info); + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_MSL_001_OK @@ -2079,9 +2175,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_request_get( PICS_ROOT_API & PX_LINK_LIV, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2090,7 +2184,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); @@ -2113,6 +2207,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Local variables var Headers v_headers; var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -2127,7 +2222,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble - f_create_service_info(v_service_info, v_headers); + f_create_service_info(v_service_info, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -2142,12 +2237,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { f_get_current_timestamp_utc() ), 10 - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2160,7 +2250,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_body_json_srv_liveness_info( mw_service_liveness_info( ACTIVE - )))))) { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a new ServiceLivenessInfo ***"); @@ -2173,7 +2263,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_service_info(v_service_info); + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_MSL_002_OK @@ -2211,12 +2301,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { f_get_current_timestamp_utc() ), 10 - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2225,7 +2310,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); diff --git a/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn index a806736..56fdf43 100644 --- a/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn +++ b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn @@ -15,6 +15,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestControl { if (PICS_APP_ENABLEMENT_API_SUPPORTED) { execute(TC_MEC_MEC011_SRV_APPSAQ_001_OK()); execute(TC_MEC_MEC011_SRV_APPSAQ_001_BR()); + execute(TC_MEC_MEC011_SRV_APPSAQ_001_NF()); execute(TC_MEC_MEC011_SRV_APPSAQ_002_OK()); execute(TC_MEC_MEC011_SRV_APPSAQ_002_BR()); execute(TC_MEC_MEC011_SRV_APPSAQ_002_NF()); @@ -24,6 +25,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestControl { execute(TC_MEC_MEC011_SRV_APPSAQ_004_BR()); execute(TC_MEC_MEC011_SRV_APPSAQ_004_NF()); execute(TC_MEC_MEC011_SRV_APPSAQ_004_PF()); + execute(TC_MEC_MEC011_SRV_APPSAQ_005_OK()); + execute(TC_MEC_MEC011_SRV_APPSAQ_005_NF()); execute(TC_MEC_MEC011_SRV_APPSUB_001_OK()); execute(TC_MEC_MEC011_SRV_APPSUB_001_NF()); diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn index 2ba0429..df3c585 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn @@ -29,7 +29,7 @@ module EdgePlatformApplicationEnablementAPI_Functions { function f_create_service_info( out ServiceInfo p_service_info, - out Headers p_headers + out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -39,24 +39,22 @@ module EdgePlatformApplicationEnablementAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", v_headers, m_http_message_body_json( m_body_json_service_info( m_service_info( v_service_name, - -, -, -, - m_service_info_link("m_service_info_link"), - -, -, //-, + -, -, -, -, -, -, m_transport_info( - "transportId1", - "ETSI MEC-011 Conformance test", + "REST", + "REST_HTTP", REST_HTTP, "HTTP", "2.0", m_end_point_uris({"/meMp1/service/MyEntryPoint"}), m_security_info - ))))))); + ))))))); tc_ac.start; alt { [] httpPort.receive( @@ -65,13 +63,22 @@ module EdgePlatformApplicationEnablementAPI_Functions { mw_http_message_body_json( mw_body_json_service_info( mw_service_info( - v_service_name //serName - )))))) -> value v_response { + v_service_name + )))))) -> value v_response { tc_ac.stop; + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services" & "/(?*)", + 0 + ); p_service_info := v_response.response.body.json_body.serviceInfo; - p_headers := v_response.response.header; - log("f_create_service_info: INFO: IUT successfully responds to the subscription: ", p_service_info); + log("f_create_service_info: INFO: IUT successfully responds to the service creation: ", p_service_info); + log("f_create_service_info: INFO: Resource URI: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_service_info: INCONC: Expected message not received"); @@ -80,7 +87,7 @@ module EdgePlatformApplicationEnablementAPI_Functions { } // End of function f_create_service_info function f_delete_service_info( - in ServiceInfo p_service_info + in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; @@ -88,7 +95,7 @@ module EdgePlatformApplicationEnablementAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(p_service_info.serName)), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & p_subscription_id, v_headers ))); tc_ac.start; @@ -104,7 +111,93 @@ module EdgePlatformApplicationEnablementAPI_Functions { } } // End of 'alt' statement } // End of function f_delete_service_info - + + function f_create_app_termination_notif_subscription( + out AppTerminationNotificationSubscription p_app_termination_notification_subscription, + out charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + v_headers, + m_http_message_body_json( + m_body_json_app_termination_notif_subscription( + m_app_termination_notif_subscription( + PX_APP_TERM_NOTIF_CALLBACK_URI, + -, + PX_APP_INSTANCE_ID + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_termination_notif_subscription( + mw_app_termination_notif_subscription( + PX_APP_TERM_NOTIF_CALLBACK_URI, + mw_self, + PX_APP_INSTANCE_ID + )))))) -> value v_response { + tc_ac.stop; + + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions" & "/(?*)", + 0 + ); + p_app_termination_notification_subscription := v_response.response.body.json_body.appTerminationNotificationSubscription; + log("f_create_app_termination_notif_subscription: INFO: IUT successfully responds with a AppTerminationNotificationSubscription: ", p_app_termination_notification_subscription); + log("f_create_app_termination_notif_subscription: INFO: Resource URI: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_app_termination_notif_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_app_termination_notif_subscription + + function f_delete_app_termination_notif_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & p_subscription_id, + v_headers + ))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_app_termination_notif_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_app_termination_notif_subscription + function f_create_ser_availability_notification_subscription( out SerAvailabilityNotificationSubscription p_ser_availability_notification_subscription ) runs on HttpComponent { diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn index 11f4d44..2121e7d 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn @@ -78,7 +78,7 @@ module EdgePlatformApplicationEnablementAPI_Templates { in ServiceInfo_Version p_version := PX_SERVICE_INFO_VERSION, in ServiceState p_state := PX_SERVICE_INFO_STATE, in EdgePlatformApplicationEnablementAPI_TypesAndValues.SerializerType p_serializer := PX_SERIALIZER, - in template (value) ServiceInfo_Link p_links, + in template (omit) ServiceInfo_Link p_links := omit, in template (omit) SerInstanceId p_serInstanceId := omit, in template (omit) TransportId p_transportId := omit, in template (omit) TransportInfo p_transportInfo := omit, @@ -143,6 +143,12 @@ module EdgePlatformApplicationEnablementAPI_Templates { self_ := p_self_ } // End of template m_self + template (present) Self mw_self( + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.LinkType p_self_ := ? + ) := { + self_ := p_self_ + } // End of template mw_self + template (omit) AppTerminationNotificationSubscription m_app_termination_notif_subscription( in template (value) AppTerminationNotificationSubscription_CallbackReference p_callbackReference, in template (omit) Self p_links := omit, diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn index f24ab58..fabb260 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn @@ -340,7 +340,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @desc Entry point information of the service in a format defined by an implementation, or in an external specification. */ type record EndPointInfo_Alternative { - anytype alternative + anytype alternative optional } /** @@ -631,7 +631,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { Json.Bool consumedLocalOnly optional, Json.Bool isLocal optional, Json.UInteger livenessInterval optional, - ServiceInfo_Link links + ServiceInfo_Link links optional } with { variant (links) "name as '_links'"; } diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index c074fe3..fee2d65 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -78,7 +78,7 @@ module LibMec_Pixits { modulepar charstring PX_ME_APP_SUPPORT_URI := "mec_app_support/v2/applications"; - modulepar charstring PX_ME_APP_REG_APPS_URI := "mec_app_support/v2/applications"; + modulepar charstring PX_ME_APP_REG_APPS_URI := "mec_service_mgmt/v1/applications"; modulepar charstring PX_MEC_SVC_MGMT_SVC_URI := "mec_service_mgmt/v1/services"; diff --git a/virtualization/docker-dev/home/etc/init.d/20-eclipse.sh b/virtualization/docker-dev/home/etc/init.d/20-eclipse.sh index e7e65cf..ab90df6 100755 --- a/virtualization/docker-dev/home/etc/init.d/20-eclipse.sh +++ b/virtualization/docker-dev/home/etc/init.d/20-eclipse.sh @@ -1,6 +1,6 @@ #!/bin/bash -ECLIPSE_URL='https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/2020-06/R/eclipse-jee-2020-06-R-linux-gtk-x86_64.tar.gz&r=1' +ECLIPSE_URL='https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/2024-03/R/eclipse-cpp-2024-03-R-linux-gtk-x86_64.tar.gz&r=1' TITAN_URL='https://www.eclipse.org/downloads/download.php?file=/titan/TITAN_Designer_and_Executor_Plugin_7.1.0.zip&r=1' #set -e @@ -10,10 +10,10 @@ echo -e "*****************************\n* Install eclipse\n********************* mkdir -p ${HOME}/frameworks cd ${HOME}/frameworks || exit 1 -wget --progress=dot:mega 'http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/technology/epp/downloads/release/2021-12/R/eclipse-cpp-2021-12-R-linux-gtk-x86_64.tar.gz' -Oeclipse-cpp-2021-12-R-linux-gtk-x86_64.tar.gz || exit 1 -tar -zxvf ./eclipse-cpp-2021-12-R-linux-gtk-x86_64.tar.gz || exit 1 +wget --progress=dot:mega 'http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/technology/epp/downloads/release/2024-03/R/eclipse-cpp-2024-03-R-linux-gtk-x86_64.tar.gz' -Oeclipse-cpp-2024-03-R-linux-gtk-x86_64.tar.gz || exit 1 +tar -zxvf ./eclipse-cpp-2024-03-R-linux-gtk-x86_64.tar.gz || exit 1 ln -sf ${HOME}/frameworks/eclipse/eclipse ${HOME}/bin/eclipse -rm -f ./eclipse-cpp-2021-12-R-linux-gtk-x86_64.tar.gz +rm -f ./eclipse-cpp-2024-03-R-linux-gtk-x86_64.tar.gz if wget --progress=dot:mega 'https://www.eclipse.org/downloads/download.php?file=/titan/TITAN_Designer_and_Executor_plugin-8.1.0.zip' -OTITAN_Designer_and_Executor_plugin.zip; then eclipse/eclipse -noSplash -application org.eclipse.equinox.p2.director \ diff --git a/virtualization/docker-dev/home/etc/init.d/40-ttf_t012.sh b/virtualization/docker-dev/home/etc/init.d/40-ttf_t027.sh similarity index 82% rename from virtualization/docker-dev/home/etc/init.d/40-ttf_t012.sh rename to virtualization/docker-dev/home/etc/init.d/40-ttf_t027.sh index ab701a5..7bedfab 100755 --- a/virtualization/docker-dev/home/etc/init.d/40-ttf_t012.sh +++ b/virtualization/docker-dev/home/etc/init.d/40-ttf_t027.sh @@ -6,7 +6,7 @@ set -vx echo -e "*****************************\n* Checkout mec_devel sources\n*****************************\n" mkdir -p ${HOME}/dev && cd ${HOME}/dev || exit 1 -git clone --recurse-submodules --branch devel https://forge.etsi.org/rep/mec/gs032p3-ttcn-test-suite.git mec_devel +git clone --recurse-submodules --branch TTF_T027 https://forge.etsi.org/rep/mec/gs032p3-ttcn-test-suite.git mec_devel cd ${HOME}/dev/mec_devel/titan-test-system-framework git checkout devel cd ${HOME}/dev/mec_devel/ttcn @@ -19,8 +19,13 @@ ln -sf ${HOME}/dev/mec_devel/scripts/devenv.bash.ubuntu ${HOME}/devenv.bash echo -e "*****************************\n* Apply patched \n*****************************\n" cd ${HOME}/dev/mec_devel -cp ./ttcn/patch_lib_common_titan/module.mk ./ttcn/LibCommon/ -cp ./ttcn/patch_lib_common_titan/ttcn/*.ttcn ./ttcn/LibCommon/ttcn + +cd ./ttcn/LibCommon +ln -sf ${HOME}/dev/mec_devel/ttcn/patch_lib_common_titan/module.mk module.mk +cd - +cd ./titan-test-system-framework/ttcn/LibHttp +ln -sf module_mec.mk module.mk +cd - echo -e "*****************************\n* Build Mec test suite\n*****************************\n" cd ${HOME}/dev/mec_devel -- GitLab From 99dfd91db469c8729955927663b190fbaf79bb5d Mon Sep 17 00:00:00 2001 From: garciay Date: Fri, 12 Apr 2024 15:04:11 +0200 Subject: [PATCH 58/58] Validation MEC 011 ATS against MEC Sanbox --- ccsrc/Protocols/Json/json_codec.cc | 19 +- ...ormApplicationEnablementAPI_TestCases.ttcn | 183 ++++++++++-------- ...ormApplicationEnablementAPI_Functions.ttcn | 42 ++-- ...atformApplicationEnablementAPI_Pixits.ttcn | 8 +- 4 files changed, 140 insertions(+), 112 deletions(-) diff --git a/ccsrc/Protocols/Json/json_codec.cc b/ccsrc/Protocols/Json/json_codec.cc index 89b366c..c117361 100644 --- a/ccsrc/Protocols/Json/json_codec.cc +++ b/ccsrc/Protocols/Json/json_codec.cc @@ -52,25 +52,22 @@ int json_codec::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTE const EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfo& service_info = msg.serviceInfo(); service_info.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = /*char2oct(CHARSTRING("{\"ServiceInfo\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_appInfo__regapps)) { + const EdgePlatformApplicationEnablementAPI__TypesAndValues::AppInfo& app_info = msg.appInfo__regapps(); + app_info.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = /*char2oct(CHARSTRING("{\"AppInfo\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_appTerminationNotificationSubscription)) { const EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription& app = msg.appTerminationNotificationSubscription(); app.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = /*char2oct(CHARSTRING("{\"AppTerminationNotificationSubscription\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; - - - } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_appTerminationConfirmation)) { const EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationConfirmation& app = msg.appTerminationConfirmation(); app.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationConfirmation_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = /*char2oct(CHARSTRING("{\"AppTerminationConfirmation\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; - } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_appReadyConfirmation)) { const EdgePlatformApplicationEnablementAPI__TypesAndValues::AppReadyConfirmation& app = msg.appReadyConfirmation(); app.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppReadyConfirmation_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = /*char2oct(CHARSTRING("{\"AppTerminationConfirmation\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; - - - } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_dnsRule)) { const EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRule& dns_rule = msg.dnsRule(); dns_rule.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRule_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); @@ -375,14 +372,18 @@ int json_codec::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes RnisAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; subscription_link_list.decode(RnisAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.subscriptionLinkList() = subscription_link_list; - } else if (it->second.find("\"AppContext\"") != std::string::npos) { + } else if (it->second.find("\"associateDevAppId\"") != std::string::npos) { UEAppInterfaceAPI__TypesAndValues::AppContext appContext; appContext.decode(UEAppInterfaceAPI__TypesAndValues::AppContext_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.appContext() = appContext; - } else if (it->second.find("\"AppInfo\"") != std::string::npos) { + } else if (it->second.find("\"appInfo\"") != std::string::npos) { UEAppInterfaceAPI__TypesAndValues::AppInfo appInfo; appInfo.decode(UEAppInterfaceAPI__TypesAndValues::AppInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.appInfo() = appInfo; + } else if (it->second.find("\"appName\"") != std::string::npos) { + EdgePlatformApplicationEnablementAPI__TypesAndValues::AppInfo appInfo; + appInfo.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.appInfo__regapps() = appInfo; } else if ((it->second.find("\"bwInfo\"") != std::string::npos) || (it->second.find("\"fixedBWPriority\"") != std::string::npos)) { // Need to change some enumerated string not supported by TTCN-3 language while (true) { diff --git a/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn index 05e406c..bf99ea1 100644 --- a/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn +++ b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn @@ -258,7 +258,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { REST_HTTP, "HTTP", "2.0", - m_end_point_uris({"/meMp1/service/MyEntryPoint"}), + m_end_point_uris({PX_APP_ENDPOINT_URI}), m_security_info ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -1157,7 +1157,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1946,7 +1946,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2360,7 +2360,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_message_body_json( m_body_json_app_info_regapps( m_app_info( - PX_APP_NAME + PX_APP_NAME, + -, -, -, + -, + m_end_point_uris({PX_APP_ENDPOINT_URI}) )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2373,7 +2376,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_message_body_json( mw_body_json_app_info_regapps( mw_app_info( - PX_APP_NAME + PX_APP_NAME, + -, -, -, + PX_APP_INSTANCE_ID, + mw_end_point_uris({PX_APP_ENDPOINT_URI}) )))))) -> value v_response { tc_ac.stop; @@ -2430,7 +2436,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_app_info( PX_APP_NAME, -, -, -, - PX_APP_INSTANCE_ID + PX_APP_INSTANCE_ID, + m_end_point_uris({PX_APP_ENDPOINT_URI}) )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2445,7 +2452,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_app_info( PX_APP_NAME, -, -, -, - PX_APP_INSTANCE_ID + PX_APP_INSTANCE_ID, + mw_end_point_uris({PX_APP_ENDPOINT_URI}) )))))) -> value v_response { tc_ac.stop; @@ -2503,7 +2511,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { PX_APP_NAME, -, -, PX_APP_D_ID, - PX_APP_INSTANCE_ID + PX_APP_INSTANCE_ID, + m_end_point_uris({PX_APP_ENDPOINT_URI}) )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2519,7 +2528,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { PX_APP_NAME, -, -, PX_APP_D_ID, - PX_APP_INSTANCE_ID + PX_APP_INSTANCE_ID, + mw_end_point_uris({PX_APP_ENDPOINT_URI}) )))))) -> value v_response { tc_ac.stop; @@ -2573,7 +2583,11 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_message_body_json( m_body_json_app_info_regapps( m_app_info( - PX_APP_NAME + PX_APP_NAME, + -, -, -, + -, // appInstanceId shall be provided as isInsByMec is set to true + -, -, -, -, -, + true )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2970,12 +2984,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_app_info_regapps( - mw_app_info( + v_app_info/*mw_app_info( v_app_info.appName, -, -, v_app_info.appDId, - v_app_info.appInstanceId - )))))) { + v_app_info.appInstanceId*/ + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct AppInfo ***"); @@ -3078,7 +3092,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { v_app_info.appProvider, -, v_app_info.appDId, - v_app_info.appInstanceId + v_app_info.appInstanceId, + v_app_info.endpoint )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -3087,8 +3102,17 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_204_no_content - )) { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_info_regapps( + mw_app_info( + v_app_info.appName, + v_app_info.appProvider, + -, + v_app_info.appDId, + v_app_info.appInstanceId, + v_app_info.endpoint + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); @@ -3304,9 +3328,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_request_get( PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -3317,7 +3339,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_service_info_list - )))) { + )))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfoList ***"); @@ -3360,9 +3382,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_request_get( PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI & "?instance_id=" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -3371,10 +3391,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request() - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -3393,6 +3413,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { testcase TC_MEC_MEC011_SRV_SAQ_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -3407,11 +3429,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_service_info(v_service_info, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI & "/" & oct2char(unichar2oct(PX_SERVICE_ID, "UTF-8")), + PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI & "/" & v_subscription_id, v_headers ) ) @@ -3426,9 +3449,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_service_info( - mw_service_info( - PX_SERVICE_ID - )))))) { + v_service_info + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfo ***"); @@ -3441,6 +3463,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_SAQ_002_OK @@ -3470,9 +3493,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_request_get( PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -3481,7 +3502,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); @@ -3511,6 +3532,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Local variables var Headers v_headers; var SerAvailabilityNotificationSubscription v_ser_availability_notification_subscription; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -3526,15 +3548,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Preamble f_init_default_headers_list(-, -, v_headers); - f_create_ser_availability_notification_subscription(v_ser_availability_notification_subscription); + f_create_ser_availability_notification_subscription(v_ser_availability_notification_subscription, v_subscription_id); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -3546,7 +3566,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_message_body_json( mw_body_json_subscription_link_list( mw_subscription_link_list - ))))) { + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a Mp1SubscriptionLinkList ***"); @@ -3559,7 +3579,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_ser_availability_notification_subscription(v_ser_availability_notification_subscription); + f_delete_ser_availability_notification_subscription(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_SRVSUB_001_OK @@ -3587,7 +3607,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", v_headers ) ) @@ -3623,6 +3643,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -3641,18 +3662,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", v_headers, m_http_message_body_json( m_body_json_srv_avail_notif_subscription( m_srv_avail_notif_subscription( PX_SRV_AVAIL_NOTIF_CALLBACK_URI - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -3665,15 +3681,25 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_body_json_srv_avail_notif_subscription( mw_srv_avail_notif_subscription( PX_SRV_AVAIL_NOTIF_CALLBACK_URI - )))))) -> value v_response { + )))))) -> value v_response { tc_ac.stop; - if (f_check_headers(valueof(v_response.response.header)) == true) { + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in creating service ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions" & "/(?*)", + 0 + ); + + // TODO how to test this as the notification is for another MEC Application? log("*** " & testcasename() & ": PASS: IUT successfully responds with a SerAvailabilityNotificationSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } else { - log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } } [] tc_ac.timeout { @@ -3683,7 +3709,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_ser_availability_notification_subscription(v_response.response.body.json_body.serAvailabilityNotificationSubscription); + f_delete_ser_availability_notification_subscription(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSUB_002_OK @@ -3712,7 +3738,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", v_headers, m_http_message_body_json( m_body_json_srv_avail_notif_subscription( @@ -3735,7 +3761,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -3755,7 +3781,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Local variables var Headers v_headers; var SerAvailabilityNotificationSubscription v_ser_availability_notification_subscription; - var charstring v_uri; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -3770,21 +3796,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble - f_create_ser_availability_notification_subscription(v_ser_availability_notification_subscription); - v_uri := regexp( - oct2char(unichar2oct(v_ser_availability_notification_subscription.links.self_.href)), - "?+(" & PX_MEC_SVC_MGMT_APPS_URI & "/?*)", - 0 - ); + f_create_ser_availability_notification_subscription(v_ser_availability_notification_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & v_uri, + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & v_subscription_id, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; @@ -3794,9 +3813,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_srv_avail_notif_subscription( - mw_srv_avail_notif_subscription( - v_ser_availability_notification_subscription.callbackReference - )))))) { + v_ser_availability_notification_subscription + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a SerAvailabilityNotificationSubscription ***"); @@ -3809,7 +3827,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_ser_availability_notification_subscription(v_ser_availability_notification_subscription); + f_delete_ser_availability_notification_subscription(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_SRVSUB_003_OK @@ -3837,7 +3855,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ) ) @@ -3873,7 +3891,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Local variables var Headers v_headers; var SerAvailabilityNotificationSubscription v_ser_availability_notification_subscription; - var charstring v_uri; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -3888,19 +3906,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble - f_create_ser_availability_notification_subscription(v_ser_availability_notification_subscription); - v_uri := regexp( - oct2char(unichar2oct(v_ser_availability_notification_subscription.links.self_.href)), - "?+(" & PX_MEC_SVC_MGMT_APPS_URI & "/?*)", - 0 - ); + f_create_ser_availability_notification_subscription(v_ser_availability_notification_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & v_uri, + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & v_subscription_id, v_headers - ))); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -3909,7 +3922,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with no content ***"); @@ -3950,7 +3963,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), v_headers ) ) @@ -3963,7 +3976,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); @@ -4395,7 +4408,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn index df3c585..5df5a05 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn @@ -199,7 +199,8 @@ module EdgePlatformApplicationEnablementAPI_Functions { } // End of function f_delete_app_termination_notif_subscription function f_create_ser_availability_notification_subscription( - out SerAvailabilityNotificationSubscription p_ser_availability_notification_subscription + out SerAvailabilityNotificationSubscription p_ser_availability_notification_subscription, + out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -208,13 +209,13 @@ module EdgePlatformApplicationEnablementAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", v_headers, m_http_message_body_json( m_body_json_srv_avail_notif_subscription( m_srv_avail_notif_subscription( PX_SRV_AVAIL_NOTIF_CALLBACK_URI - )))))); + )))))); tc_ac.start; alt { [] httpPort.receive( @@ -224,11 +225,21 @@ module EdgePlatformApplicationEnablementAPI_Functions { mw_body_json_srv_avail_notif_subscription( mw_srv_avail_notif_subscription( PX_SRV_AVAIL_NOTIF_CALLBACK_URI - )))))) -> value v_response { + )))))) -> value v_response { tc_ac.stop; + // Extract HTTP Location header + var charstring_list v_subscription_id; + f_get_header(v_response.response.header, "Location", v_subscription_id); + // Extract HTTP subssription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions" & "/(?*)", + 0 + ); p_ser_availability_notification_subscription := v_response.response.body.json_body.serAvailabilityNotificationSubscription log("f_create_ser_availability_notification_subscription: INFO: IUT successfully responds to the subscription: ", p_ser_availability_notification_subscription); + log("f_create_service_info: INFO: Resource URI: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_ser_availability_notification_subscription: INCONC: Expected message not received"); @@ -237,28 +248,23 @@ module EdgePlatformApplicationEnablementAPI_Functions { } // End of function f_create_ser_availability_notification_subscription function f_delete_ser_availability_notification_subscription( - in SerAvailabilityNotificationSubscription p_ser_availability_notification_subscription + in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; - var charstring v_uri := regexp( - oct2char(unichar2oct(p_ser_availability_notification_subscription.links.self_.href)), - "?+(" & PX_MEC_SVC_MGMT_APPS_URI & "/?*)", - 0 - ); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & v_uri, + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & p_subscription_id, v_headers - ))); + ))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; } [] tc_ac.timeout { @@ -283,7 +289,10 @@ module EdgePlatformApplicationEnablementAPI_Functions { m_http_message_body_json( m_body_json_app_info_regapps( m_app_info( - PX_APP_NAME + PX_APP_NAME, + -, -, -, + PX_APP_INSTANCE_ID, + m_end_point_uris({PX_APP_ENDPOINT_URI}) )))))); tc_ac.start; @@ -294,7 +303,10 @@ module EdgePlatformApplicationEnablementAPI_Functions { mw_http_message_body_json( mw_body_json_app_info_regapps( mw_app_info( - PX_APP_NAME + PX_APP_NAME, + -, -, -, + PX_APP_INSTANCE_ID, + mw_end_point_uris({PX_APP_ENDPOINT_URI}) )))))) -> value v_response { tc_ac.stop; diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Pixits.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Pixits.ttcn index 3c16b76..3a7bcfd 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Pixits.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Pixits.ttcn @@ -6,15 +6,17 @@ module EdgePlatformApplicationEnablementAPI_Pixits { // LibMec/EdgePlatformApplicationEnablementAPI import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; - modulepar Json.String PX_APP_NAME := "appName"; + modulepar Json.String PX_APP_NAME := "appName01"; - modulepar Json.String PX_APP_D_ID := "appName"; + modulepar Json.String PX_APP_D_ID := "appName01"; modulepar AppInstanceId PX_APP_INSTANCE_ID := "appInst01"; modulepar AppInstanceId PX_NON_EXISTENT_APP_INSTANCE_ID := "appInst99"; + + modulepar Json.String PX_APP_ENDPOINT_URI := "http://example.com:12345"; - modulepar SerName PX_SERVICE_NAME := "serName"; + modulepar SerName PX_SERVICE_NAME := "serName01"; modulepar SerName PX_NON_EXISTENT_SERVICE_NAME := "unknownSerName"; -- GitLab