From f619062c468c68d758215ad5721e9d67e88db974 Mon Sep 17 00:00:00 2001 From: Muhammad Umair Khan Date: Mon, 3 Feb 2025 16:38:59 +0500 Subject: [PATCH 1/7] update MEC014 description version from v3.1.1 to v3.2.1 --- .../AtsMec_UEidentityAPI_TestCases.ttcn | 2 +- .../ttcn/UEidentityAPI_TypesAndValues.ttcn | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestCases.ttcn b/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestCases.ttcn index 7c4418c..7a85b02 100644 --- a/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestCases.ttcn +++ b/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_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, ETSI GS MEC 014 V3.1.1 + * @see ETSI GS MEC 003, ETSI GS MEC 014 V3.2.1 */ module AtsMec_UEidentityAPI_TestCases { diff --git a/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn index e7fe2cd..d3589d9 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 ETSI GS MEC 014 V3.1.1 (2023-06) + * @desc Module containing types and values for ETSI GS MEC 014 V3.2.1 (2024-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. @@ -16,7 +16,7 @@ module UEidentityAPI_TypesAndValues { /** * @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 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.2.1 (2024-02) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type record UeIdentityTagInfo { UeIdentityTags ueIdentityTags @@ -24,13 +24,13 @@ module UEidentityAPI_TypesAndValues { /** * @desc Specific tag presented by a ME Application instance to a ME Platform - * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.2.1 (2024-02) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type Json.String UeIdentityTag; /** * @desc Status of the resource ueIdentityTagInfo - * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.2.1 (2023-02) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type enumerated State { UNREGISTERED, @@ -42,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 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.2.1 (2024-02) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type record UeIdentityTagItem { Json.String ueIdentityTag, @@ -51,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 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.2.1 (2024-02) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type set of UeIdentityTagItem UeIdentityTags; -- GitLab From 774709bd02d5c8d7219f464c7e544b5f3a3bea36 Mon Sep 17 00:00:00 2001 From: Muhammad Umair Khan Date: Tue, 4 Feb 2025 10:26:38 +0500 Subject: [PATCH 2/7] update MEC015 description version from v2.2.1 to v3.1.1 --- ..._MultiAccessSteeringInfoAPI_TestCases.ttcn | 2 +- ...AtsMec_TrafficManagementAPI_TestCases.ttcn | 2 +- .../TrafficManagementAPI_TypesAndValues.ttcn | 62 +++++++++---------- 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn index 1026770..091c223 100644 --- a/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_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, ETSI GS MEC 015, Draft ETSI GS MEC 015 V3.1.1 (2024-04) */ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn index f3b601d..50d2114 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.2.1 (2020-06) + * @see ETSI GS MEC 015, Draft ETSI GS MEC 015 V3.1.1 (2024-04) */ module AtsMec_TrafficManagementAPI_TestCases { diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn index f9d5380..5225ad5 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn @@ -16,7 +16,7 @@ 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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type record BwInfo { AllocationId allocationId optional, @@ -40,7 +40,7 @@ module TrafficManagementAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.3 Type: BwInfoDeltas */ type record BwInfoDeltas { Json.String allocationId, @@ -54,19 +54,19 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Bandwidth allocation instance identifier - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) 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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) 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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type enumerated BwRequestType { APPLICATION_SPECIFIC_BW_ALLOCATION (0), @@ -77,7 +77,7 @@ module TrafficManagementAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) 7.2.5 Type: MtsSessionInfo */ type enumerated MtsRequestType { APPLICATION_SPECIFIC_MTS_SESSION (0), @@ -88,7 +88,7 @@ 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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type set of SessionFilterItem SessionFilter; /** @@ -98,7 +98,7 @@ 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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type record SessionFilterItem { SourceIp sourceIp optional, @@ -110,7 +110,7 @@ module TrafficManagementAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type enumerated FixedBWPriority { reserved @@ -118,26 +118,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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) 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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ 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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type Json.UInteger 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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type enumerated AllocationDirection { Downlink, @@ -147,31 +147,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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) 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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ 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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) 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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type Json.UInteger DstPort; /** * @desc Protocol number - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type Json.String Protocol; @@ -180,7 +180,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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.4 Type: MtsCapabilityInfo */ type record MtsCapabilityInfo { TimeStamp timeStamp optional, @@ -190,7 +190,7 @@ module TrafficManagementAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.4 Type: MtsCapabilityInfo */ type enumerated MtsMode { LowCost (0), @@ -208,7 +208,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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.4 Type: MtsCapabilityInfo */ type record MtsAccessInfo { AccessId accessId, @@ -219,13 +219,13 @@ 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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.4 Type: MtsCapabilityInfo */ 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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.4 Type: MtsCapabilityInfo */ type enumerated AccessType { Unknown (0), @@ -246,7 +246,7 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Numeric value (0-255) - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.4 Type: MtsCapabilityInfo */ type enumerated Metered { CxNotMetered (0), @@ -267,7 +267,7 @@ module TrafficManagementAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) 7.2.5 Type: MtsSessionInfo */ type record MtsSessionInfo { SessionId sessionId optional, @@ -284,7 +284,7 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc MTS session instance identifier - * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) 7.2.5 Type: MtsSessionInfo */ type Json.String SessionId; @@ -297,7 +297,7 @@ module TrafficManagementAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) 7.2.5 Type: MtsSessionInfo */ type record FlowFilterItem { SourceIp sourceIp optional, @@ -312,19 +312,19 @@ module TrafficManagementAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) 7.2.5 Type: MtsSessionInfo */ type AllocationDirection TrafficDirection; /** * @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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) 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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.5 Type: MtsSessionInfo */ type Json.UInteger Flowlabel; @@ -335,7 +335,7 @@ module TrafficManagementAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.5 Type: MtsSessionInfo */ type record QosD { Json.UInteger minTpt optional, -- GitLab From 3883c28346a576c2c098775ada9c3248b8cf6eb4 Mon Sep 17 00:00:00 2001 From: Muhammad Umair Khan Date: Thu, 13 Feb 2025 12:38:07 +0500 Subject: [PATCH 3/7] update MEC015 testcases as per version v3.1.1 --- ccsrc/Protocols/Json/json_codec.cc | 13 + ..._BandwidthChangeEventSubAPI_TestCases.ttcn | 1031 +++++++++++++++++ ...sMec_TrafficManagementAPI_TestControl.ttcn | 17 + ttcn/AtsMec_TrafficManagement/module.mk | 1 + .../ttcn/TrafficManagementAPI_Functions.ttcn | 86 ++ .../ttcn/TrafficManagementAPI_Pics.ttcn | 5 + .../ttcn/TrafficManagementAPI_Pixits.ttcn | 10 + .../ttcn/TrafficManagementAPI_Templates.ttcn | 69 ++ .../TrafficManagementAPI_TypesAndValues.ttcn | 85 ++ ttcn/LibMec/ttcn/LibMec_Pixits.ttcn | 2 + .../ttcn/LibHttp_JsonMessageBodyTypes.ttcn | 2 + .../ttcn/LibHttp_JsonTemplates.ttcn | 18 + 12 files changed, 1339 insertions(+) create mode 100644 ttcn/AtsMec_TrafficManagement/AtsMec_BandwidthChangeEventSubAPI_TestCases.ttcn diff --git a/ccsrc/Protocols/Json/json_codec.cc b/ccsrc/Protocols/Json/json_codec.cc index 012788d..956701e 100644 --- a/ccsrc/Protocols/Json/json_codec.cc +++ b/ccsrc/Protocols/Json/json_codec.cc @@ -32,6 +32,10 @@ int json_codec::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTE const TrafficManagementAPI__TypesAndValues::BwInfo& bw_info = msg.bwInfo(); bw_info.encode(TrafficManagementAPI__TypesAndValues::BwInfo_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::ATL_bwchgeventsubscription)) { + const TrafficManagementAPI__TypesAndValues::BwChgEventSubscription& bw_chg_event_subscription = msg.bwInfo(); + bw_info.encode(TrafficManagementAPI__TypesAndValues::BwChgEventSubscription_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_mtsSessionInfo)) { const TrafficManagementAPI__TypesAndValues::MtsSessionInfo& mts_session_info = msg.mtsSessionInfo(); mts_session_info.encode(TrafficManagementAPI__TypesAndValues::MtsSessionInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); @@ -153,6 +157,15 @@ int json_codec::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes bw_info.decode(TrafficManagementAPI__TypesAndValues::BwInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); msg.bwInfo() = bw_info; } + } else if ((it->second.find("\"_links\"") != std::string::npos) && (it->second.find("subscriptions\"") != std::string::npos)) { // SubscriptionLinkList + TrafficManagementAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; + subscription_link_list.decode(TrafficManagementAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.subscriptionLinkList() = subscription_link_list; + } else if ((it->second.find("\"bwchgeventsubscription\"") != std::string::npos) { + TrafficManagementAPI__TypesAndValues::BwChgEventSubscription bw_chg_event_subscription; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + bw_chg_event_subscription.decode(TrafficManagementAPI__TypesAndValues::MtsCapabilityInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.bwchgeventsubscription() = bw_chg_event_subscription; } else if ((it->second.find("\"mtsCapabilityInfo\"") != std::string::npos) || (it->second.find("\"mtsAccessInfo\"") != std::string::npos)) { TrafficManagementAPI__TypesAndValues::MtsCapabilityInfo mts_cap_info; TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_BandwidthChangeEventSubAPI_TestCases.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_BandwidthChangeEventSubAPI_TestCases.ttcn new file mode 100644 index 0000000..3832ba4 --- /dev/null +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_BandwidthChangeEventSubAPI_TestCases.ttcn @@ -0,0 +1,1031 @@ +/** + * @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 015, Draft ETSI GS MEC 015 V3.1.1 (2024-04) + */ +module AtsMec_BandwidthChangeEventSubAPI_TestCases { + + // JSON + import from Json all; + + // 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/TrafficManagementAPI + import from TrafficManagementAPI_TypesAndValues all; + import from TrafficManagementAPI_Templates all; + import from TrafficManagementAPI_Functions all; + import from TrafficManagementAPI_Pics all; + import from TrafficManagementAPI_Pixits all; + + // LibMec + import from LibMec_Templates all; + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + + group BWSUBLOOKUP{ + + /** + * @desc Check that the IUT responds with a list of BWM change event susbsciption when queried by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BWMSUBLOOKUP_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_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_chg_event_subscription(v_bw_chg_event_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_BWM_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_bw_subscription_link_list( + mw_subscription_link_list( + { href := pattern "http?+" & PICS_ROOT_API & PX_ME_BWM_SUB_URI }, + superset( + mw_subscription( + v_bw_chg_event_subscription.links.self_.href, + "BwChgEventSubscription" + ) + ))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a BW event subscription 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_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BWMSUBLOOKUP_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_MEC015_SRV_BWSUBLOOKUP_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_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_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_SUB_URI & "/?subscriptionType=UnknownType", + 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 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_BWMSUBLOOKUP_001_OK + + /** + * @desc Check that the IUT responds with an error when no subscription are created + */ + testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_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_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_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_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 + )) { + 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 + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BWMSUBLOOKUP_001_OK + + /** + * @desc Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application - Filter on subscription_type + */ + testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_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_chg_event_subscription(v_bw_chg_event_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_BWM_SUB_URI & "?" & "subscription_type=bw_chg", + 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_subscription_link_list( + mw_subscription_link_list( + { href := pattern "http?+" & PICS_ROOT_API & PX_ME_BWM_SUB_URI }, + superset( + mw_subscription( + v_bw_chg_event_subscription.links.self_.href, + "BwChgEventSubscription" + ) + ))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a BW event subscription 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_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_002_OK + + /** + * @desc Check that the IUT responds with with an error when no subscription matches with the filter - Filter on subscription_type + */ + testcase TP_MEC_MEC015_SRV_BWSUBLOOKUP_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_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_SUB_URI & "?subscription_type=" & oct2char(unichar2oct(PX_UNKNOWN_SUBSCRIPTION_TYPE, "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 + + // Postamble + f_cf_01_http_down(); + } // End of testcase TP_MEC_MEC015_SRV_BWSUBLOOKUP_002_NF + + + /** + * @desc Check that the IUT responds with a individual BWM change event susbsciption when queried by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_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_chg_event_subscription(v_bw_chg_event_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_BWM_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_bw_chg_event_subscription( + mw_bw_chg_event_subscription( + v_bw_chg_event_subscription.subscriptionType, + v_bw_chg_event_subscription.callbackReference, + -, + mw_links( + v_bw_chg_event_subscription.links.self.href + ), + mw_filter_criteria( + v_bw_chg_event_subscription.filterCriteria.appInsId + ) + + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a BW event subscription 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_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_OK + + /** + * @desc Check that the IUT responds with a individual BWM change event susbsciption when queried by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_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_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_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_SUB_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_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); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_NF + + } + + group BW_SUB { + + /** + * @desc Check that the IUT acknowledges the creation of BWM change event subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_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_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_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_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_bw_chg_event_subscription( + m_bw_chg_event_subscription( + PX_BW_Subcription_type, + PX_BW_EVENT_SUB_CALLBACK_URI, + -, + -, + m_filter_criteria + + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_bw_chg_event_subscription( + mw_bw_chg_event_subscription( + PX_BW_Subcription_type, + PX_BW_EVENT_SUB_CALLBACK_URI, + -, + -, + m_filter_criteria + )))))) -> 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 BwChgEventSubscription ***"); + 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_BWM_SUB_URI & "/(?*)", + 0 + ); + } + log("*** " & testcasename() & ": PASS: IUT successfully responds with a qoSMeasureSubscription, 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_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_001_OK + + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid subscriptionType + */ + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_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_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_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_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_bw_chg_event_subscription( + m_bw_chg_event_subscription( + PX_UNKNOWN_SUBSCRIPTION_TYPE, + PX_BW_EVENT_SUB_CALLBACK_URI, + m_filter_Criteria + )))))); + + // 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_cf_01_http_down(); + + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_001_OK + + /** + * @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_MEC015_SRV_BW_SUB_NOT_001_BR_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_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_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_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_bw_chg_event_subscription( + m_bw_chg_event_subscription( + PX_BW_Subcription_type, + -, + -, + -, + m_filter_criteria + )))))); + + // 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 + + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Both callbackReference and websockNotifConfig provided + */ + + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_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_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_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_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_bw_chg_event_subscription( + m_bw_chg_event_subscription( + PX_BW_Subcription_Type, + PX_BW_EVENT_SUB_CALLBACK_URI, + { websocketUri := PX_BW_SUB_WEB_SOCKET, requestWebsocketUri := omit }, + -, + m_filter_criteria + )))))); + + // 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 + + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_03 + + /** + * @desc Check that the IUT acknowledges the update of BWM change event subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_002_OK() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_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_chg_event_subscription(v_bw_chg_event_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_BWM_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_bw_chg_event_subscription( + m_bw_chg_event_subscription( + PX_BW_Subcription_Type + PX_BW_EVENT_SUB_CALLBACK_URI, + -, + -, + m_filter_criteria + + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_bw_chg_event_subscription( + mw_bw_chg_event_subscription( + PX_BW_Subcription_Type + PX_BW_EVENT_SUB_CALLBACK_URI, + -, + -, + m_filter_criteria + )))))) -> value v_response { + tc_ac.stop; + + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated BwSubscriptionNotification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_002_OK + + /** + * @desc Check that the IUT acknowledges 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_MEC015_SRV_BW_SUB_NOT_002_NF() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_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_chg_event_subscription(v_bw_chg_event_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_BWM_SUB_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_SUBSCRIPTION_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_bw_chg_event_subscription( + m_bw_chg_event_subscription( + PX_BW_Subcription_Type + PX_BW_EVENT_SUB_CALLBACK_URI, + -, + -, + m_filter_criteria + )))))); + // 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_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_002_OK + + /** + * @desc Check that the IUT acknowledges the cancellation of BWM change event subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_003_OK() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_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_chg_event_subscription(v_bw_chg_event_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_BWM_SUB_URI & "/" & v_subscription_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 cancels the BwChgEventSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_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_MEC015_SRV_BW_SUB_NOT_003_NF() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_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_chg_event_subscription(v_bw_chg_event_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_BWM_SUB_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ))); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT responds with an error cancelling the BwChgEventSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_003_OK + + /** + * @desc Check that the MEC application receives and processes the BWM information event notification sent by the BWM service + */ + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_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_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_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_bw_chg_event_subscription(v_bw_chg_event_subscription, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_response( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_bw_chg_event_subscription( + mw_bw_chg_event_subscription( + PX_BW_Subcription_type, + PX_BW_EVENT_SUB_CALLBACK_URI + )))))) -> 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_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_004_OK + + } + +} \ No newline at end of file diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn index 842fd6f..260f4ce 100644 --- a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn @@ -41,6 +41,23 @@ 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_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED) { + execute(TC_MEC_MEC015_SRV_BWMSUBLOOKUP_001_OK()); + execute(TC_MEC_MEC015_SRV_BWSUBLOOKUP_001_BR()); + execute(TC_MEC_MEC015_SRV_BWSUBLOOKUP_001_NF()); + execute(TC_MEC_MEC015_SRV_BWSUBLOOKUP_002_OK()); + execute(TP_MEC_MEC015_SRV_BWSUBLOOKUP_002_NF()); + execute(TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_OK()); + execute(TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_NF()); + + execute(TC_MEC_MEC015_SRV_BW_SUB_NOT_001_OK()); + execute(TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_01()); + execute(TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_02()); + execute(TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_03()); + execute(TC_MEC_MEC015_SRV_BW_SUB_NOT_002_OK()); + } + if (PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED) { execute(TC_MEC_MEC015_SRV_MTS_001_OK()); diff --git a/ttcn/AtsMec_TrafficManagement/module.mk b/ttcn/AtsMec_TrafficManagement/module.mk index b24f6e6..e4c759d 100644 --- a/ttcn/AtsMec_TrafficManagement/module.mk +++ b/ttcn/AtsMec_TrafficManagement/module.mk @@ -2,6 +2,7 @@ suite := AtsMec_TrafficManagement sources := \ AtsMec_TrafficManagementAPI_TestCases.ttcn \ + AtsMec_BandwidthChangeEventSubAPI_TestCases.ttcn \ AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn \ AtsMec_TrafficManagementAPI_TestControl diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn index c678558..9120a93 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn @@ -106,6 +106,92 @@ module TrafficManagementAPI_Functions { } // End of 'alt' statement } // End of function f_delete_bw_allocation_resource + function f_create_bw_chg_event_subscription( + out BwChgEventSubscription p_bw_chg_event_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_BWM_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_bw_chg_event_subscription( + m_bw_chg_event_subscription( + PX_BW_EVENT_SUB_CALLBACK_URI, + -, + -, + m_filter_criteria + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_bw_chg_event_subscription( + mw_bw_chg_event_subscription( + PX_BW_Subcription_type, + PX_BW_EVENT_SUB_CALLBACK_URI, + -, + -, + m_filter_criteria + )))))) -> 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_BWM_SUB_URI & "/(?*)", + 0 + ); + p_bw_chg_event_subscription := v_response.response.body.json_body.m_bw_chg_event_subscription; + log("f_create_bw_chg_event_subscription: INFO: IUT successfully responds to the subscription: ", p_bw_chg_event_subscription); + log("f_create_bw_chg_event_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_qos_measure_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_bw_chg_event_subscription + + function f_delete_bw_chg_event_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_BWM_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_qos_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_qos_subscription + function f_create_mts_session_info_resource( in Json.String p_app_instance_id, out charstring p_mts_session_id, diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn index 7250495..db215a1 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn @@ -5,6 +5,11 @@ module TrafficManagementAPI_Pics { */ modulepar boolean PICS_BWMANAGEMENT_API_SUPPORTED := true; + /** + * @desc Does the IUT support TrafficManagementAPI? + */ + modulepar boolean PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED := true; + /** * @desc Does the IUT support Multi-access Traffic Steering API? */ diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn index 02851fd..3abc8a6 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn @@ -29,4 +29,14 @@ module TrafficManagementAPI_Pixits { modulepar ResourceURL PX_RESOURCE_URL := "http://example.com/exampleAPI/location/v2/users?address:acr:192.0.0.1"; + modulepar Json.String PX_BW_Subcription_Type := "BwChgEventSubscription"; + + modulepar Json.String PX_BW_EVENT_SUB_CALLBACK_URI := "http://clientApp.example.com/location_notifications/123456"; + + modulepar Json.AnyURI PX_BW_SUB_WEB_SOCKET := "ws://clientApp.example.com/location_notifications/123456"; + + modulepar Json.String PX_UNKNOWN_SUBSCRIPTION_ID := "UnknownSubId"; + + modulepar Json.String PX_UNKNOWN_SUBSCRIPTION_TYPE := "UnknownSubType"; + } // End of module TrafficManagementAPI_Pixits diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn index 7eb39f0..dec7fe0 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn @@ -119,6 +119,75 @@ module TrafficManagementAPI_Templates { protocol := p_protocol } // End of template mw_session_filter + template (omit) BwChgEventSubscription m_bw_chg_event_subscription( + in template (omit) Json.String p_subscription_type := ?, + in template (omit) Json.AnyURI p_callbackReference, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) Links p_links := omit, + in template (value) FlowFilter p_flowfilter := ? + ) := { + subscriptionType := p_subscription_type, + callbackReference := p_callbackReference, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_flowfilter + } + + template (omit) FilterCriteria m_filter_criteria( + in AppInsId p_appInsId := PX_APP_INSTANCE_ID, + in template (omit) Json.String p_ueIp := omit + ) := { + appInsId := p_appInsId, + ueIp := p_ueIp + } // End of template m_flowfilterW + + template (present) BwChgEventSubscription mw_bw_chg_event_subscription( + template (present) Json.String p_subscriptionType := ? + template (present) Json.AnyURI p_callbackReference := ?, + template WebsockNotifConfig p_websockNotifConfig := *, + template Links p_links := *, + template (present) FlowFilter p_flowfilter := ? + ) := { + subscriptionType := p_subscriptionType, + callbackReference := p_callbackReference, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_flowfilter + } + + + template (present) SubscriptionLinkList mw_subscription_link_list( + template (present) Links p_links := ?, + template Subscriptions p_subscription := * + ) := { + links := p_links, + subscription := p_subscription + } // End of template mw_subscription_link_list + + template (present) Links mw_links( + template (value) LinkType p_self + ) :={ + self := p_self + } // End of template m_links + + 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 (present) FilterCriteria mw_filter_criteria( + template Json.String p_appInsId := *, + template Json.String p_ueIp := * + ) := { + appInsId := p_appInsId, + ueIp := p_ueIp + } // End of template m_flowfilterW + template (omit) MtsCapabilityInfo m_mts_capability_info( in template (value) MtsAccessInfos p_mtsAccessInfo, in template (value) MtsModes p_mtsMode, diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn index 5225ad5..43af634 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn @@ -175,6 +175,91 @@ module TrafficManagementAPI_TypesAndValues { */ type Json.String Protocol; + /** + * @desc This type represents a subscription to the notifications from BWM service about the bandwidth utility or data volume dispersion information. + * @param subscriptionType Shall be set to "BwChgEventSubscription" + * @param callbackReference URI exposed by the client on which to receive notifications via HTTP + * @param websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @param _links Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests + * @param FilterCriteria List of filtering criteria for the BW change event subscription. + * @see ETSI GS MEC 015 V3.1.1 (2024-03) Table 7.3.2: Definition of type BwChgEventSubscription + */ + type record BwChgEventSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteria filterCriteria optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @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 015 V3.1.1 (2024-04) Clause 7.5.3 Type: WebsockNotifConfig + */ + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional + } + + /** + * @desc Filtering criteria for the BW change event subscription + * @param appInsId Application instance identifier + * @param ueIp Source address identity of session + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Table 7.3.2: Attributes of the BwChgEventSubscription + */ + type record FilterCriteria { + Json.String appInsId optional, + Json.String ueIp optional + } + + /** + * @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 Table 7.3.3-1: Attributes of the SubscriptionLinkList + */ + type record SubscriptionLinkList { + Links links optional, // URI of this resource + Subscription subscriptions optional // List of subscriptions + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Hyperlink related to the resource + * @see ETSI GS MEC 015 V3.1.1 (2024-03) Table 7.3.2: Attributes of the BwChgEventSubscription + */ + type record Links { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc Type of link + * @member href URI referring to a resource + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.5.3 Type: LinkType + */ + type record LinkType { + Json.AnyURI href + } + + /** + * @desc Attributes of SubscriptionLinkList. + * @field href The URI referring to the subscription (mandatory). + * @field subscriptionType Type of the subscription. + * @see Table 7.3.3-1: Attributes of the SubscriptionLinkList + */ + type record Subscription { + Json.AnyURI href // The URI referring to the subscription + Json.String subscriptionType // Type of the subscription + } + type set of Subscription Subscriptions + /** * @desc The information on access network connection * @member timeStamp Time stamp to indicate when the corresponding information elements are sent diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index fee2d65..22d08f6 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -23,6 +23,8 @@ module LibMec_Pixits { modulepar charstring PX_RNIS_QUERIES_URI := "rni/v2/queries"; modulepar charstring PX_ME_BWM_URI := "bwm/v1/bw_allocations"; + + modulepar charstring PX_ME_BWM_SUB_URI := "bwm/v1/subscriptions"; modulepar charstring PX_ME_MTS_INFO_URI := "mts/v1/mts_capability_info"; diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index 332f676..5bc237c 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -77,6 +77,8 @@ module LibHttp_JsonMessageBodyTypes { BwInfoList bwInfoList, BwInfo bwInfo, BwInfoDeltas bwInfoDeltas, + BwChgEventSubscription bwchgeventsubscription, + TrafficManagementAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList_bw MtsCapabilityInfo mtsCapabilityInfo, MtsSessionInfo mtsSessionInfo, MtsSessionInfos mtsSessionInfos, diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn index fabd6e5..d769c6d 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -916,6 +916,24 @@ module LibHttp_JsonTemplates { bwInfoList := p_bwInfoList } // End of template mw_body_json_bw_info_list + template (value) JsonBody m_body_json_bw_chg_event_subscription( + in template (value) BwChgEventSubscription p_bwchgeventsubscription + ) := { + bwchgeventsubscription := p_bwchgeventsubscription + } // End + + template (present) JsonBody mw_body_json_bw_chg_event_subscription( + template (present) BwChgEventSubscription p_bwchgeventsubscription := ? + ) := { + bwchgeventsubscription := p_bwchgeventsubscription + } // End + + template (present) JsonBody mw_body_json_bw_chg_event_subscription( + template (present) TrafficManagementAPI_TypesAndValues.SubscriptionLinkList p_subscriptionlinklist := ? + ) := { + subscriptionLinkList := p_subscriptionlinklist + } // End + template (value) JsonBody m_body_json_mts_capability_info( in template (value) MtsCapabilityInfo p_mtsCapabilityInfo ) := { -- GitLab From 2ebde6af449c6f263e2d2742c8be4353a81ce455 Mon Sep 17 00:00:00 2001 From: Muhammad Umair Khan Date: Thu, 13 Feb 2025 13:51:19 +0500 Subject: [PATCH 4/7] fix minor issue in MEC015 Bandwidth Event Subscription --- .../ttcn/TrafficManagementAPI_TypesAndValues.ttcn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn index 43af634..8a80c5b 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn @@ -211,10 +211,11 @@ module TrafficManagementAPI_TypesAndValues { * @param ueIp Source address identity of session * @see ETSI GS MEC 015 V3.1.1 (2024-04) Table 7.3.2: Attributes of the BwChgEventSubscription */ - type record FilterCriteria { + type record FilterCriteria_ { Json.String appInsId optional, Json.String ueIp optional } + type set of FilterCriteria_ FilterCriteria /** * @desc List of links related to currently existing subscriptions for the service consumer -- GitLab From 57699868d57fa917251019c1b07a5650ac92687f Mon Sep 17 00:00:00 2001 From: Muhammad Umair Khan Date: Thu, 20 Feb 2025 15:16:08 +0500 Subject: [PATCH 5/7] add a testcase and add missing configuration file for MEC015 Traffic Management --- .../AtsMec_TrafficManagement.cfg_ | 195 ++++++++++++++++++ ..._BandwidthChangeEventSubAPI_TestCases.ttcn | 17 +- .../ttcn/TrafficManagementAPI_Functions.ttcn | 6 +- .../ttcn/TrafficManagementAPI_Templates.ttcn | 20 ++ .../TrafficManagementAPI_TypesAndValues.ttcn | 31 +++ .../ttcn/LibHttp_JsonMessageBodyTypes.ttcn | 1 + .../ttcn/LibHttp_JsonTemplates.ttcn | 12 ++ 7 files changed, 273 insertions(+), 9 deletions(-) create mode 100644 etc/AtsMec_TrafficManagement/AtsMec_TrafficManagement.cfg_ diff --git a/etc/AtsMec_TrafficManagement/AtsMec_TrafficManagement.cfg_ b/etc/AtsMec_TrafficManagement/AtsMec_TrafficManagement.cfg_ new file mode 100644 index 0000000..5464190 --- /dev/null +++ b/etc/AtsMec_TrafficManagement/AtsMec_TrafficManagement.cfg_ @@ -0,0 +1,195 @@ +[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 := "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_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_TrafficManagement/%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.12,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=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 + +# Check that the IUT responds with the list of configured bandwidth allocations when queried by a MEC Application - none +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_OK_01 +# Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - app_instance_id +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_OK_02 +# Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - app_name +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_OK_03 +# Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - session_id +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_OK_04 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - app_instance_id +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_BR +# 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 +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_NF_01 +# Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - app_name +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_NF_02 +# Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - session_id +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_NF_03 +# Check that the IUT acknowledges a creation of a bandwidthAllocation resource +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_002_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_002_BR_01 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_002_BR_02 +# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_003_OK +#Check that the IUT updates the requested bandwidth requirements when commanded by a MEC Application +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_004_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_004_BR_01 +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_004_BR_01 +# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_004_BR_02 +#Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application +#TC_MEC_MEC015_SRV_TM_005_OK +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_005_BR_01 +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_005_BR_02 +#Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application +#TC_MEC_MEC015_SRV_TM_005_NF +#Check that the IUT unregisters from the Bandwidth Management Service when commanded by a MEC Application +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_006_OK +#Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_006_NF + +// Multi-access Traffic Steering information Test Cases +#Check that the IUT responds with the Multi-access Traffic Steering information when queried by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_001_OK +#Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - none +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_OK_01 +#Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - app_instance_id +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_OK_02 +#Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - app_name +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_OK_03 +#Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - sessionId +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_OK_04 +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_BR +#Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_NF +#Check that the IUT creates a MTS session when queried by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_003_OK_01 +#Check that the IUT creates a MTS session when queried by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_003_OK_02 +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_003_BR +#Check that the IUT responds with a configured Multi-access Traffic Steering session when queried by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_004_OK +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_004_BR +#Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_004_NF +#Check that the IUT updates the information about an individual MTS session when commanded by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_005_OK +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_005_BR +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_005_NF +#Check that the IUT deregisters a MTS session when commanded by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_006_OK +#Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_006_NF + +// BWM change event susbsciption Testcases +#Check that the IUT responds with a list of BWM change event susbsciption when queried by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWMSUBLOOKUP_001_OK +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWSUBLOOKUP_001_BR +#Check that the IUT responds with an error when no subscription are created +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWSUBLOOKUP_001_NF +#Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application - Filter on subscription_type +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWSUBLOOKUP_002_OK +#Check that the IUT responds with with an error when no subscription matches with the filter - Filter on subscription_type +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TP_MEC_MEC015_SRV_BWSUBLOOKUP_002_NF +#Check that the IUT responds with a individual BWM change event susbsciption when queried by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_OK +#Check that the IUT responds with a individual BWM change event susbsciption when queried by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_NF +#Check that the IUT acknowledges the creation of BWM change event subscription request when commanded by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_001_OK +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid subscriptionType +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_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_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_02 +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Both callbackReference and websockNotifConfig provided +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_03 +#Check that the IUT acknowledges the update of BWM change event subscription request when commanded by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_002_OK +#Check that the IUT acknowledges an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_002_NF +#Check that the IUT acknowledges the cancellation of BWM change event subscription request when commanded by a MEC Applications +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_003_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_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_003_NF +#Check that the BWM service sends a notification about a bandwidth utility or the data volume if the BWM service has an associated subscription and the event is generated +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_004_OK + + +[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_TrafficManagement/AtsMec_BandwidthChangeEventSubAPI_TestCases.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_BandwidthChangeEventSubAPI_TestCases.ttcn index 3832ba4..0bf8bcf 100644 --- a/ttcn/AtsMec_TrafficManagement/AtsMec_BandwidthChangeEventSubAPI_TestCases.ttcn +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_BandwidthChangeEventSubAPI_TestCases.ttcn @@ -528,7 +528,7 @@ module AtsMec_BandwidthChangeEventSubAPI_TestCases { 0 ); } - log("*** " & testcasename() & ": PASS: IUT successfully responds with a qoSMeasureSubscription, SubscriptionId: ", v_subscription_id," ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwChgEventSubscription, SubscriptionId: ", v_subscription_id," ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -965,7 +965,7 @@ module AtsMec_BandwidthChangeEventSubAPI_TestCases { } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_003_OK /** - * @desc Check that the MEC application receives and processes the BWM information event notification sent by the BWM service + * @desc Check that the BWM service sends a notification about a bandwidth utility or the data volume if the BWM service has an associated subscription and the event is generated */ testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_004_OK() runs on HttpComponent system HttpTestAdapter { @@ -999,10 +999,15 @@ module AtsMec_BandwidthChangeEventSubAPI_TestCases { -, -, mw_http_message_body_json( - mw_body_json_bw_chg_event_subscription( - mw_bw_chg_event_subscription( - PX_BW_Subcription_type, - PX_BW_EVENT_SUB_CALLBACK_URI + mw_body_json__bw_chg_event_notification( + mw_bw_chg_event_notification( + -, + -, + mw_data_vol_dispersion( + 1024,PX_APP_INSTANCE_ID + ), + - + )))))) -> value v_response { tc_wait.stop; diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn index 9120a93..e126aac 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn @@ -159,7 +159,7 @@ module TrafficManagementAPI_Functions { log("f_create_bw_chg_event_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { - log("f_create_qos_measure_subscription: INCONC: Expected message not received"); + log("f_create_bw_chg_event_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement @@ -186,11 +186,11 @@ module TrafficManagementAPI_Functions { tc_ac.stop; } [] tc_ac.timeout { - log("f_delete_qos_subscription: INCONC: Expected message not received"); + log("f_delete_bw_chg_event_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_delete_qos_subscription + } // End of function f_delete_bw_chg_event_subscription function f_create_mts_session_info_resource( in Json.String p_app_instance_id, diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn index dec7fe0..4d0300e 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn @@ -188,6 +188,26 @@ module TrafficManagementAPI_Templates { ueIp := p_ueIp } // End of template m_flowfilterW + template (present) BwChgEventNotification mw_bw_chg_event_notificatipn( + template (present) Json.String p_notificationType := "BwChgEventNotification", + template TimeStamp p_timeStamp := ?, + template DataVolDispersion p_dataVolDispersion := *, + template Links p_links := ?, + ) := { + appInsId := p_appInsId, + ueIp := p_ueIp + } // End of template mw_bw_chg_event_notificatipn + + template (present) DataVolDispersion mw_data_vol_dispersion( + template (value) uint32 p_dataVol, + template (value) Json.String p_appInsId, + template (present) Json.String p_ueIp := ? + ) := { + dataVol := p_dataVol, + appInsId := p_appInsId, + ueIp := p_ueIp + } // End of template mw_data_vol_dispersion + template (omit) MtsCapabilityInfo m_mts_capability_info( in template (value) MtsAccessInfos p_mtsAccessInfo, in template (value) MtsModes p_mtsMode, diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn index 8a80c5b..0d3b625 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn @@ -261,6 +261,37 @@ module TrafficManagementAPI_TypesAndValues { } type set of Subscription Subscriptions + /** + * @desc This type represents a notification for bandwidth change events. + * @member notificationType Shall be set to "BwChgEventNotification". + * @member timeStamp Date and time of the generation of the notification (optional). + * @member dataVolDispersion List of data volume dispersion information. + * @member links Object containing hyperlinks related to the resource (optional). + * @see Table 7.4.2: Attributes of the BwChgEventNotification + */ + type record BwChgEventNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + DataVolDispersion dataVolDispersion, + Links links optional + } with { + variant (links) "name as '_links'"; + }; + + /** + * @desc This type represents data volume dispersion information. + * @member dataVol Sum of data volume (UL/DL) exchanged per UE per application. + * @member appInsId Application instance identifier. + * @member ueIp Source address identity of session (optional). + */ + type record DataVolDispersion_ { + UInt32 dataVol, + Json.String appInsId, + Json.String ueIp optional + }; +type set of DataVolDispersion_ DataVolDispersion + + /** * @desc The information on access network connection * @member timeStamp Time stamp to indicate when the corresponding information elements are sent diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index 5bc237c..513c1e3 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -79,6 +79,7 @@ module LibHttp_JsonMessageBodyTypes { BwInfoDeltas bwInfoDeltas, BwChgEventSubscription bwchgeventsubscription, TrafficManagementAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList_bw + BwChgEventNotification bwChgEventNotification MtsCapabilityInfo mtsCapabilityInfo, MtsSessionInfo mtsSessionInfo, MtsSessionInfos mtsSessionInfos, diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn index d769c6d..8df7bb8 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -934,6 +934,18 @@ module LibHttp_JsonTemplates { subscriptionLinkList := p_subscriptionlinklist } // End + template (value) JsonBody m_body_json__bw_chg_event_notification( + in template (value) BwChgEventNotification p_bwchgeventnotification + ) := { + mobilityProcedureNotification := p_mobilityProcedureNotification + } // End of template m_body_json__bw_chg_event_notification + + template (present) JsonBody mw_body_json__bw_chg_event_notification( + template (present) BwChgEventNotification p_bwchgeventnotification := ? + ) := { + mobilityProcedureNotification := p_mobilityProcedureNotification + } // End of template mw_body_json__bw_chg_event_notification + template (value) JsonBody m_body_json_mts_capability_info( in template (value) MtsCapabilityInfo p_mtsCapabilityInfo ) := { -- GitLab From dc53a3dad2918fa24179ea245a6c53414346a88a Mon Sep 17 00:00:00 2001 From: Muhammad Umair Khan Date: Thu, 20 Feb 2025 15:32:43 +0500 Subject: [PATCH 6/7] update MEC 016 Device Application Interface reference version from v2.2.1 to v3.1.1 --- ...viceApplicationInterfaceAPI_TestCases.ttcn | 34 +++++++------- ...pplicationInterfaceAPI_TypesAndValues.ttcn | 44 +++++++++---------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn b/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn index 904a4d0..eda51f7 100644 --- a/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn +++ b/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_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 002, Draft ETSI GS MEC 016 V2.2.1 (2020-04) + * @see ETSI GS MEC 002, Draft ETSI GS MEC 016 V3.1.1 (2024-03) */ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { @@ -44,7 +44,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with the list of user applications when requested by an UE Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPS_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -102,7 +102,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_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/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPS_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -157,7 +157,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with the list of user applications when requested by an UE Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPS_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -215,7 +215,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_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/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPS_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -270,7 +270,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_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/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPS_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -325,7 +325,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @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/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -404,7 +404,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with incorrect URL is sent by a MEC Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -473,7 +473,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with incorrect URL is sent by a MEC Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -542,7 +542,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @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/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -616,7 +616,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_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/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -688,7 +688,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_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/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -757,7 +757,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT deletes the application context when commanded by an UE Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -814,7 +814,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_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/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -869,7 +869,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT sends the locations available for instantiation of a specific user application when requested by an UE Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplicationsLocation.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplicationsLocation.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPLOC_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -942,7 +942,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_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/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplicationsLocation.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplicationsLocation.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPLOC_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1010,7 +1010,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with incorrect URL is sent by a MEC Application * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplicationsLocation.tplan2 + * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v3.1.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplicationsLocation.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPLOC_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables diff --git a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn index 228478d..72e35ca 100644 --- a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn @@ -2,7 +2,7 @@ * @author ETSI / TTF T012 / TTF T027 * @version $Url$ * $Id$ - * @desc Types ANd Values for ETSI GS MEC 016 V2.2.1 (2020-04) + * @desc Types ANd Values for ETSI GS MEC 016 V3.1.1 (2024-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. @@ -16,7 +16,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.2 Type: ApplicationList */ type record ApplicationList { AppList appList optional @@ -26,7 +26,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.2 Type: ApplicationList */ type record AppListItem { ApplicationList_AppInfo appInfo, @@ -44,7 +44,7 @@ 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 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.2 Type: ApplicationList */ type record ApplicationList_AppInfo { Json.String appDId, @@ -60,7 +60,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.2 Type: ApplicationList */ type record VendorSpecificExt { Json.String vendorId @@ -73,7 +73,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.2 Type: ApplicationList */ type record AppCharcs { Json.UInteger memory optional, @@ -85,7 +85,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { /** * @desc Required service continuity mode for this application - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.2 Type: ApplicationList */ type enumerated ServiceCount { SERVICE_CONTINUITY_NOT_REQUIRED (0), @@ -102,7 +102,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.3 Type: AppContext */ type record AppContext { Json.String contextId optional, @@ -123,7 +123,7 @@ 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 V2.2.1 (2020-04) Clause 6.2.3 Type: AppContext + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.3 Type: AppContext */ type record ApplicationContext_AppInfo { Json.String appDId, @@ -141,7 +141,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.3 Type: AppContext */ type record UserAppInstanceInfo { Json.String appInstanceId optional, @@ -154,7 +154,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.4 Type: ApplicationLocationAvailability */ type record ApplicationLocationAvailability { Json.String associateDevAppId, @@ -171,7 +171,7 @@ 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 - * @seeETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.4 Type: ApplicationLocationAvailability + * @seeETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.4 Type: ApplicationLocationAvailability */ type record ApplicationLocationAvailability_AppInfo { Json.String appDId, @@ -187,7 +187,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.4 Type: ApplicationLocationAvailability */ type record AvailableLocations { LocationConstraints appLocation optional @@ -200,7 +200,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 V2.2.1 (2020-04) Clause 6.4.2 Type: AddressChangeNotification + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.4.2 Type: AddressChangeNotification */ type record AddressChangeNotification { Json.String notificationType, @@ -213,7 +213,7 @@ 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 "ApplicationContextDeleteNotification" * @member contextId Uniquely identifies the application context in the MEC system - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.3 Type: ApplicationContextDeleteNotification + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.4.3 Type: ApplicationContextDeleteNotification */ type record ApplicationContextDeleteNotification { Json.String notificationType, @@ -225,7 +225,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @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 V2.2.1 (2020-04) Clause 6.4.4 Type: ApplicationContextUpdateNotification + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.4.4 Type: ApplicationContextUpdateNotification */ type record ApplicationContextUpdateNotification { Json.String notificationType, @@ -238,7 +238,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @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 V2.2.1 (2020-04) Clause 6.4.5 Type: ApplicationLocationAvailabilityNotification + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.4.5 Type: ApplicationLocationAvailabilityNotification */ type record ApplicationLocationAvailabilityNotification { Json.String notificationType, @@ -251,7 +251,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.5.2 Type: LocationConstraints */ type record LocationConstraints { Json.String countryCode optional, @@ -264,7 +264,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.5.2 Type: LocationConstraints */ type record CivicAddressElement { Json.Integer caType, @@ -273,7 +273,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { /** * @desc - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.5.2 Type: LocationConstraints */ type record Polygon { Json.String type_, @@ -287,7 +287,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { /** * @desc - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.5.2 Type: LocationConstraints */ type record Geometry { Json.String type_, @@ -300,7 +300,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { /** * @desc - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.5.2 Type: LocationConstraints */ type record Property { Json.String key, -- GitLab From 92a179e5b9336f2d9887e4fea46343f01c1c3b88 Mon Sep 17 00:00:00 2001 From: Muhammad Umair Khan Date: Mon, 26 May 2025 15:22:04 +0500 Subject: [PATCH 7/7] update MEC010-2 TTCN testcases as per version v3.2.1 --- ...ycleAndOperationGrantingAPI_TestCases.ttcn | 71 ++++++++++--------- ...fecycleAndOperationGrantingAPI_Pixits.ttcn | 6 +- ...ycleAndOperationGrantingAPI_Templates.ttcn | 56 +++++++-------- ...ndOperationGrantingAPI_TypesAndValues.ttcn | 42 +++++------ 4 files changed, 89 insertions(+), 86 deletions(-) diff --git a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn index 12ea8f6..02680c7 100644 --- a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn @@ -1,5 +1,5 @@ /** -* @Author ETSI / STF569 / TTF012 +* @Author ETSI / STF569 / TTF012 / TTF T043 * @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, Draft ETSI GS MEC 010-2 V2.2.1 +* @see ETSI GS MEC 003, Draft ETSI GS MEC 010-2 V3.2.1 */ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { @@ -623,8 +623,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_create_package_management( PX_APP_PKG_NAME, PX_APP_PKG_VERSION, - m_checksum(-, PX_CHECKSUM), - PX_APP_PKG_PATH + m_checksum(-, PX_CHECKSUM) )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -637,11 +636,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { 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 + -, + mw_checksum, + CREATED, + PX_OPERATIONAL_STATE, + PX_USAGE_STATE )))))) -> value v_response { tc_ac.stop; @@ -687,8 +686,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_create_package_management( "", PX_APP_PKG_VERSION, - m_checksum(-, PX_CHECKSUM), - PX_APP_PKG_PATH + m_checksum(-, PX_CHECKSUM) )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -755,12 +753,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { { *, mw_app_pkg_info( - -, -, - PX_APP_PKG_NAME, - PX_APP_PKG_VERSION, - -, - mw_checksum - ), + -, + mw_checksum, + PX_ONBOARDED_STATE, + PX_OPERATIONAL_STATE, + PX_USAGE_STATE, + - + ), * } ))))) -> value v_response { @@ -821,12 +820,14 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_body_json_app_pkg_info_list( { *, - mw_app_pkg_info( - -, -, - PX_APP_PKG_NAME, - PX_APP_PKG_VERSION, - -, - mw_checksum + mw_app_pkg_info_onboarded( + -, -, + PX_APP_PKG_NAME, + PX_APP_PKG_VERSION, + -, + mw_checksum, + -, + PX_ONBOARDED_STATE_ONBOARDED ), * } @@ -994,8 +995,8 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_app_pkg_info( - mw_app_pkg_info( - PX_APP_PKG_ID + mw_app_pkg_info_onboarded( + v_app_pkg_info.id )))))) -> value v_response { tc_ac.stop; @@ -2209,10 +2210,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { { *, mw_app_pkg_info( - v_app_pkg_info.id, - v_app_pkg_info.appDId - ) - , + -, + mw_checksum, + PX_ONBOARDED_STATE, + PX_OPERATIONAL_STATE, + PX_USAGE_STATE + ), * } ))))) { @@ -2233,7 +2236,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // 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 + * @desc Check that MEPM returns the list of on-boarded App Packages when requested - Note 3 */ testcase TC_MEC_MEC010p2_MEPM_PKGM_001_02_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2271,11 +2274,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_body_json_app_pkg_info_list( { *, - mw_app_pkg_info( + mw_app_pkg_info_onboarded( v_app_pkg_info.id, v_app_pkg_info.appDId, -, -, -, -, -, - ONBOARDED + PX_ONBOARDED_STATE_ONBOARDED ) , * @@ -2440,11 +2443,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_app_pkg_info( - mw_app_pkg_info( + mw_app_pkg_info_onboarded( v_app_pkg_info.id, v_app_pkg_info.appDId, -, -, -, -, -, - ONBOARDED + PX_ONBOARDED_STATE_ONBOARDED )))))) { tc_ac.stop; diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn index 027b5cc..2a037b2 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn @@ -53,8 +53,12 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits { modulepar Json.String PX_CHECKSUM := "CHECKSUM"; modulepar Json.String PX_APP_PKG_PATH := "APP_PKG_PATH"; + + modulepar Json.String PX_ONBOARDED_STATE_ONBOARDED := "ONBOARDED"; + + modulepar Json.String PX_ONBOARDED_STATE := "CREATED"; - modulepar OperationalState PX_OPERATIONAL_STATE := STARTED; + modulepar OperationalState PX_OPERATIONAL_STATE := "ENABLED"; modulepar UsageState PX_USAGE_STATE := NOT_IN_USE; diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn index b914cc0..2121e45 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn @@ -213,41 +213,37 @@ 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, + // template (omit) AppPkgInfo m_app_pkg_info( + // in template (value) Checksum p_checksum, + // in template (value) OnboardingState p_onboardingState, + // in template (value) AppPkgInfo_OperationalState p_operationalState, + // in template (value) UsageState p_usageState, + // in template (value) AppPkgInfo_Links p_links, + // ) := { + // checksum := p_checksum, + // onboardingState := p_onboardingState, + // operationalState := p_operationalState, + // usageState := p_usageState, + // 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) Checksum p_checksum := ?, + template (present) OnboardingState p_onboardingState := ?, + template (present) AppPkgInfo_OperationalState p_operationalState := ?, + template (present) UsageState p_usageState := ?, + template (present) AppPkgInfo_Links p_links := ? + ) := { + id := p_id, 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( + } // End of template mw_app_pkg_info + + template (present) AppPkgInfo mw_app_pkg_info_onboarded( template (present) Json.String p_id := ?, template (present) Json.String p_appDId := ?, template (present) Json.String p_appName := ?, diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn index 1a94526..4c87573 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn @@ -1,5 +1,5 @@ /** - * @author ETSI / TTF T012 / TTF T027 + * @author ETSI / TTF T012 / TTF T027 / TTF T043 * @version $Url$ * $Id$ * @desc Types ANd Values for ETSI GS MEC 010-2 V3.2.1 (2023-06) @@ -1323,25 +1323,25 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { Json.String appProvider optional, Checksum checksum, KeyValuePairs userDefinedData optional, - Json.AnyURI appPkgPath + Json.AnyURI appPkgPath optional } /** * @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 appDId The application descriptor identifier. It shall be present after the application package content has been on-boarded and absent otherwise. + * @member appProvider The provider's name of the onboarded application package. It shall be present after the application package content has been on-boarded and absent otherwise. + * @member appName Name of the onboarded application. It shall be present after the application package content has been on-boarded and absent otherwise. + * @member appSoftwareVersion Software version of the application. This is updated when there is any change to the software in the onboarded application package. It shall be present after the application package content has been on-boarded and absent otherwise. + * @member appDVersion Version of the application descriptor. It shall be present after the application package content has been on-boarded and absent otherwise. + * @member checksum Checksum of the onboarded application package. This attribute shall not be present before the application package content is on-boarded. + * @member signingCertificate The singleton signing certificate if it is included as a file in the AppD archive. This attribute shall not be present before the application package content is on-boarded. + * @member softwareImages Information of application software image in application package. This attribute shall not be present before the application package content is on-boarded. + * @member additionalArtifacts Additional information of application package artifacts that are not application software images. This attribute shall not be present before the application package content is on-boarded. + * @member onboardingState Onboarding state of application package. This attribute shall not be present before the application package content is on-boarded. + * @member operationalState Operational state of the onboarded application package. This attribute shall not be present before the application package content is on-boarded. * @member usageState Usage state of the onboarded instance of the application package - * @member mecInfo The MEC version that compatible with this application + * @member mecInfo The MEC version that compatible with this application. This attribute shall not be present before the application package content is on-boarded. * @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 @@ -1349,22 +1349,22 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { */ type record AppPkgInfo { Json.String id, - Json.String appDId, + Json.String appDId optional, Json.String appProvider optional, - Json.String appName, - Json.String appSoftwareVersion, - Json.String appDVersion, + Json.String appName optional, + Json.String appSoftwareVersion optional, + Json.String appDVersion optional, Checksum checksum, Json.String signingCertificate optional, - AppPkgSWImageInfo softwareImages, + AppPkgSWImageInfo softwareImages optional, AppPkgArtifactInfo additionalArtifacts optional, OnboardingState onboardingState, AppPkgInfo_OperationalState operationalState, UsageState usageState, - AppPkgInfo_MecInfo mecInfo, + AppPkgInfo_MecInfo mecInfo optional, KeyValuePairs userDefinedData optional, ProblemDetails onboardingFailureDetails optional, - AppPkgInfo_Links links + AppPkgInfo_Links links optional } with { variant (links) "name as '_links'"; } -- GitLab