Commit e803bdc5 authored by Yann Garcia's avatar Yann Garcia
Browse files

Bug fixed in AtsMec_EdgePlatformApplicationEnablement typing & codec

parent dabe77e2
Loading
Loading
Loading
Loading
+5 −6
Original line number Original line Diff line number Diff line
@@ -140,8 +140,11 @@ int json_codec_mec011::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo
      service_info.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
      service_info.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
      msg.serviceInfo() = service_info;
      msg.serviceInfo() = service_info;
    }
    }
  } else if (it->second.find("\"security\"") != std::string::npos) { // Be careful to the order
  } else if (it->second.find("\"serviceAPIDescriptions\"") != std::string::npos) {
                                                                     // TODO To be refined, find("\"accessPointList\"") is not optimal
    EdgePlatformApplicationEnablementAPI__TypesAndValues::DiscoveredAPIs discovered_apis;
    discovered_apis.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::DiscoveredAPIs_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    msg.discovered__apis() = discovered_apis;
  } else if ((it->second.find("\"id\"") != std::string::npos) && (it->second.find("\"security\"") != std::string::npos)) {
    std::size_t it_start;
    std::size_t it_start;
    while ((it_start = str.find("null")) != std::string::npos) {
    while ((it_start = str.find("null")) != std::string::npos) {
      loggers::get_instance().log("json_codec_mec011::decode: id_start=%d", it_start);
      loggers::get_instance().log("json_codec_mec011::decode: id_start=%d", it_start);
@@ -205,10 +208,6 @@ int json_codec_mec011::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo
    EdgePlatformApplicationEnablementAPI__TypesAndValues::AppInfo appInfo;
    EdgePlatformApplicationEnablementAPI__TypesAndValues::AppInfo appInfo;
    appInfo.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    appInfo.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    msg.appInfo__regapps() = appInfo;
    msg.appInfo__regapps() = appInfo;
  } else if (it->second.find("\"serviceAPIDescriptions\"") != std::string::npos) {
    EdgePlatformApplicationEnablementAPI__TypesAndValues::DiscoveredAPIs discovered_apis;
    discovered_apis.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::DiscoveredAPIs_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    msg.discovered__apis() = discovered_apis;
  } else if (it->second.find("\"apiName\"") != std::string::npos) {
  } else if (it->second.find("\"apiName\"") != std::string::npos) {
    EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceAPIDescription service_api_description;
    EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceAPIDescription service_api_description;
    service_api_description.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceAPIDescription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    service_api_description.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceAPIDescription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
+2 −2
Original line number Original line Diff line number Diff line
@@ -22,7 +22,7 @@ LibMec_Pics.PICS_MEC_PLAT := true
EdgePlatformApplicationEnablementAPI_Pixits.PX_APP_INSTANCE_ID := "81c51643-8c6f-4781-ad45-f8a457ca549b" # Copied from ETSI MEC Sandbox GUI
EdgePlatformApplicationEnablementAPI_Pixits.PX_APP_INSTANCE_ID := "81c51643-8c6f-4781-ad45-f8a457ca549b" # Copied from ETSI MEC Sandbox GUI
# MEC APIs
# MEC APIs
EdgePlatformApplicationEnablementAPI_Pixits.PX_API_NAME        := "mec015-1"                              # Pickup from MEC Sandbox logs console 
EdgePlatformApplicationEnablementAPI_Pixits.PX_API_NAME        := "mec015-1"                              # Pickup from MEC Sandbox logs console 
EdgePlatformApplicationEnablementAPI_Pixits.PX_API_ID          := "a6612a80-85f2-41e0-8565-4bf477483fb7"
EdgePlatformApplicationEnablementAPI_Pixits.PX_API_ID          := "f671a33e-9bc6-42a7-8afb-6f7edec7c357"


# Callbacks
# Callbacks
EdgePlatformApplicationEnablementAPI_Pixits.PX_CAPIF_NOTIF_CALLBACK_URI := "https://yanngarcia.ddns.net:36001/capif-events/v1"
EdgePlatformApplicationEnablementAPI_Pixits.PX_CAPIF_NOTIF_CALLBACK_URI := "https://yanngarcia.ddns.net:36001/capif-events/v1"
@@ -240,7 +240,7 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec011)/TCP(debug=1
# 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
# 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_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_008_NF
#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_008_NF
# Check that the IUT acknowledges the update of a CAPIF subscription request when requested by a MEC Application
# Check that the IUT acknowledges the update of a CAPIF subscription request when requested by a MEC Application
AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_009_OK
#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_009_OK
# Check that the IUT acknowledges the update of a CAPIF subscription request when requested by a MEC Application
# Check that the IUT acknowledges the update of a CAPIF subscription request when requested by a MEC Application
#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_009_NF
#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_009_NF
# Check that the IUT acknowledges the changes of a CAPIF subscription request when requested by a MEC Application
# Check that the IUT acknowledges the changes of a CAPIF subscription request when requested by a MEC Application
+6 −2
Original line number Original line Diff line number Diff line
@@ -2596,7 +2596,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases {
                                                                                                                        PX_APP_NAME,
                                                                                                                        PX_APP_NAME,
                                                                                                                        -, -, -, 
                                                                                                                        -, -, -, 
                                                                                                                        -, // appInstanceId shall be provided as isInsByMec is set to true
                                                                                                                        -, // appInstanceId shall be provided as isInsByMec is set to true
                                                                                                                        -, -, -, -, -,
                                                                                                                        -, -, -, -, -, -, -, -, -,
                                                                                                                        true
                                                                                                                        true
                    ))))));
                    ))))));
      f_selfOrClientSyncAndVerdict(c_prDone, e_success);
      f_selfOrClientSyncAndVerdict(c_prDone, e_success);
@@ -2656,7 +2656,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases {
                                                                                                                        -, -,
                                                                                                                        -, -,
                                                                                                                        PX_APP_D_ID,
                                                                                                                        PX_APP_D_ID,
                                                                                                                        PX_APP_INSTANCE_ID,
                                                                                                                        PX_APP_INSTANCE_ID,
                                                                                                                        -, -, -, -, -,
                                                                                                                        -, -, -, -, -,-, -, -, -,
                                                                                                                        false
                                                                                                                        false


                    ))))));
                    ))))));
@@ -5983,6 +5983,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases {


      // Test Body
      // Test Body
      v_event_subscription.events := { SERVICE_API_AVAILABLE, SERVICE_API_UPDATE, API_INVOKER_UPDATED };
      v_event_subscription.events := { SERVICE_API_AVAILABLE, SERVICE_API_UPDATE, API_INVOKER_UPDATED };
      v_event_subscription.eventFilters := valueof(
                                                    { 
                                                      m_capif_event_filter(-, -, { PX_APP_INSTANCE_ID })
                                                    });
      f_init_default_headers_list(-, -, v_headers);
      f_init_default_headers_list(-, -, v_headers);
      httpPort.send(
      httpPort.send(
                    m_http_request(
                    m_http_request(
+16 −0
Original line number Original line Diff line number Diff line
@@ -231,6 +231,10 @@ module EdgePlatformApplicationEnablementAPI_Templates {
                                     in template (omit) ServiceDependencies p_appServiceOptional := omit,
                                     in template (omit) ServiceDependencies p_appServiceOptional := omit,
                                     in template (omit) FeatureDependencies p_appFeatureRequired := omit,
                                     in template (omit) FeatureDependencies p_appFeatureRequired := omit,
                                     in template (omit) FeatureDependencies p_appFeatureOptional := omit,
                                     in template (omit) FeatureDependencies p_appFeatureOptional := omit,
                                     in template (omit) ScheduledCommunicationTimes p_scheds := omit,
                                     in template (omit) ServiceArea p_svcArea := omit,
                                     in template (omit) EASServiceKPI p_svcKpi := omit,
                                     in template (omit) AppInfo.permLvl p_permLvl := omit,
                                     in template (omit) Json.Bool p_isInsByMec := omit,
                                     in template (omit) Json.Bool p_isInsByMec := omit,
                                     in template (omit) AppProfile p_appProfile := omit
                                     in template (omit) AppProfile p_appProfile := omit
                                     ) := {
                                     ) := {
@@ -244,6 +248,10 @@ module EdgePlatformApplicationEnablementAPI_Templates {
    appServiceOptional := p_appServiceOptional,
    appServiceOptional := p_appServiceOptional,
    appFeatureRequired := p_appFeatureRequired,
    appFeatureRequired := p_appFeatureRequired,
    appFeatureOptional := p_appFeatureOptional,
    appFeatureOptional := p_appFeatureOptional,
    scheds             := p_scheds,
    svcArea            := p_svcArea,
    svcKpi             := p_svcKpi,
    permLvl            := p_permLvl,
    isInsByMec         := p_isInsByMec,
    isInsByMec         := p_isInsByMec,
    appProfile         := p_appProfile
    appProfile         := p_appProfile
  } // End of template m_app_info
  } // End of template m_app_info
@@ -259,6 +267,10 @@ module EdgePlatformApplicationEnablementAPI_Templates {
                                         template ServiceDependencies p_appServiceOptional := *,
                                         template ServiceDependencies p_appServiceOptional := *,
                                         template FeatureDependencies p_appFeatureRequired := *,
                                         template FeatureDependencies p_appFeatureRequired := *,
                                         template FeatureDependencies p_appFeatureOptional := *,
                                         template FeatureDependencies p_appFeatureOptional := *,
                                         template ScheduledCommunicationTimes p_scheds := *,
                                         template ServiceArea p_svcArea := *,
                                         template EASServiceKPI p_svcKpi := *,
                                         template AppInfo.permLvl p_permLvl := *,
                                         template Json.Bool p_isInsByMec := *,
                                         template Json.Bool p_isInsByMec := *,
                                         template AppProfile p_appProfile := *
                                         template AppProfile p_appProfile := *
                                         ) := {
                                         ) := {
@@ -272,6 +284,10 @@ module EdgePlatformApplicationEnablementAPI_Templates {
    appServiceOptional := p_appServiceOptional,
    appServiceOptional := p_appServiceOptional,
    appFeatureRequired := p_appFeatureRequired,
    appFeatureRequired := p_appFeatureRequired,
    appFeatureOptional := p_appFeatureOptional,
    appFeatureOptional := p_appFeatureOptional,
    scheds             := p_scheds,
    svcArea            := p_svcArea,
    svcKpi             := p_svcKpi,
    permLvl            := p_permLvl,
    isInsByMec         := p_isInsByMec,
    isInsByMec         := p_isInsByMec,
    appProfile         := p_appProfile
    appProfile         := p_appProfile
  } // End of template mw_app_info
  } // End of template mw_app_info
+43 −10
Original line number Original line Diff line number Diff line
@@ -198,6 +198,10 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues {
   * @member appServiceOptional Describes services a MEC application may use if available
   * @member appServiceOptional Describes services a MEC application may use if available
   * @member appFeatureRequired Describes features a MEC application requires to run
   * @member appFeatureRequired Describes features a MEC application requires to run
   * @member appFeatureOptional Describes features a MEC application may use if available
   * @member appFeatureOptional Describes features a MEC application may use if available
   * @member scheds The availability schedule of the application server
   * @member svcArea The list of geographical and topological areas that the application server serves
   * @member svcKpi Service characteristics provided by the application server
   * @member permLvl Level of service permissions supported by the application server
   * @member isInsByMec Indicate whether the application instance is instantiated by the MEC Management
   * @member isInsByMec Indicate whether the application instance is instantiated by the MEC Management
   * @member appProfile Can be mapped to EAS profile as defined in ETSI TS 129 558 [19]
   * @member appProfile Can be mapped to EAS profile as defined in ETSI TS 129 558 [19]
   * @see ETSI GS MEC 011 V3.3.1 7.1.2.6-1: Attributes of AppInfo
   * @see ETSI GS MEC 011 V3.3.1 7.1.2.6-1: Attributes of AppInfo
@@ -213,10 +217,39 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues {
    ServiceDependencies         appServiceOptional optional,
    ServiceDependencies         appServiceOptional optional,
    FeatureDependencies         appFeatureRequired optional,
    FeatureDependencies         appFeatureRequired optional,
    FeatureDependencies         appFeatureOptional optional,
    FeatureDependencies         appFeatureOptional optional,
    ScheduledCommunicationTimes scheds optional,
    ServiceArea                 svcArea optional,
    EASServiceKPI               svcKpi optional,
    record of Json.String       permLvl optional,
    Json.Bool           isInsByMec optional,
    Json.Bool           isInsByMec optional,
    AppProfile          appProfile optional
    AppProfile          appProfile optional
  } // End of type AppInfo
  } // End of type AppInfo


  /**
   * @desc 
   * @see ETSI TS 129 222 V18.7.0 (2025-01) ???
   */
  type record ScheduledCommunicationTime {
    // TODO
  } // End of type ScheduledCommunicationTime
  type record of ScheduledCommunicationTime ScheduledCommunicationTimes;

  /**
   * @desc 
   * @see ETSI TS 129 558 V18.10.0 (2025-06) Table 9.1.5.2.5-1: Definition of type ServiceArea
   */
  type record ServiceArea {
    // TODO
  } // End of type ServiceArea

  /**
   * @desc 
   * @see ETSI TS 129 558 V18.10.0 (2025-06) Table 8.1.5.2.4-1: Definition of type EASServiceKPI
   */
  type record EASServiceKPI {
    // TODO
  } // End of type EASServiceKPI

  /**
  /**
   * @desc 
   * @desc 
   * @see ETSI TS 129 558 V17.2.0 
   * @see ETSI TS 129 558 V17.2.0