Commit 37acaed1 authored by YannGarcia's avatar YannGarcia
Browse files

Validate first BwManagementAPI test

parent 3fc07e0e
Loading
Loading
Loading
Loading
+17 −2
Original line number Original line Diff line number Diff line
@@ -79,9 +79,24 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
    msg.ueIdentityTagInfo() = ue_identity_tag_info;
    msg.ueIdentityTagInfo() = ue_identity_tag_info;
  } else if (it->second.find("\"bwInfo\"") != std::string::npos) {
  } else if (it->second.find("\"bwInfo\"") != std::string::npos) {
    BwManagementAPI__TypesAndValues::BwInfo bw_info;
    BwManagementAPI__TypesAndValues::BwInfo bw_info;
    bw_info.decode(BwManagementAPI__TypesAndValues::BwInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);

    // Need to change some enumerated string not supported by TTCN-3 language
    if (str.find("not defined in the present document") != std::string::npos) {
      str = regex_replace(str, regex("not defined in the present document"), "not_defined_in_the_present_document");
    }
    if (str.find("00 = Downlink (towards the UE)") != std::string::npos) {
      str = regex_replace(str, regex("00 = Downlink \\(towards the UE\\)"), "Downlink");
    } else if (str.find("01 = Uplink (towards the application/session)") != std::string::npos) {
      str = regex_replace(str, regex("01 = Uplink \\(towards the application\\/session\\)"), "Uplink");
    } else if (str.find("10 = Symmetrical") != std::string::npos) {
      str = regex_replace(str, regex("10 = Symmetrical"), "Symmetrical");
    }
    //loggers::get_instance().log("json_codec::decode: ##########; %s", str.c_str());

    TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str()));
    bw_info.decode(BwManagementAPI__TypesAndValues::BwInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON);
    msg.bwInfo() = bw_info;
    msg.bwInfo() = bw_info;
  } else if (it->second.find("\"problemDetails\"") != std::string::npos) {
  } else if (it->second.find("\"problemDetails\"") != std::string::npos) { // TODO To be refined, problemDetails in different modules
    UEidentityAPI__TypesAndValues::ProblemDetails problem_details;
    UEidentityAPI__TypesAndValues::ProblemDetails problem_details;
    problem_details.decode(UEidentityAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    problem_details.decode(UEidentityAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    msg.problemDetails__ue__identity() = problem_details;
    msg.problemDetails__ue__identity() = problem_details;
+11 −3
Original line number Original line Diff line number Diff line
@@ -8,13 +8,21 @@ LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0;
LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0;
LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0;


#LibItsHttp_Pics.PICS_HEADER_HOST := "172.28.4.87"
#LibItsHttp_Pics.PICS_HEADER_HOST := "172.28.4.87"
LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.1.21"
LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.0.5"


LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json"
LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json"


LibMec_Pics.PICS_MEC_PLAT := true
LibMec_Pics.PICS_MEC_PLAT := true
LibMec_Pics.PICS_RNIS     := true
LibMec_Pics.PICS_RNIS     := true


LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED         := true
LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED         := true
LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED         := true

UEidentityAPI_Pics.PICS_UE_IDENTITY_API_SUPPORTED    := true

BwManagementAPI_Pics.PICS_BWMANAGEMENT_API_SUPPORTED := true

[LOGGING]
[LOGGING]
# In this section you can specify the name of the log file and the classes of events
# 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).
# you want to log into the file or display on console (standard error).
@@ -31,7 +39,7 @@ LogEventTypes:= Yes


[TESTPORT_PARAMETERS]
[TESTPORT_PARAMETERS]
# In this section you can specify parameters that are passed to Test Ports.
# 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.21,port=8081,use_ssl=0)"
system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.0.5,port=8081,use_ssl=0)"


[DEFINE]
[DEFINE]
# In this section you can create macro definitions,
# In this section you can create macro definitions,
+4 −2
Original line number Original line Diff line number Diff line
@@ -39,9 +39,11 @@ module AtsMec_TestControl {
      }
      }
    }
    }


    if (PICS_RNIS) {
      if (PICS_RNIS_ALL_SUBSCRIPTIONS) {
      if (PICS_RNIS_ALL_SUBSCRIPTIONS) {
        execute(TC_MEC025_RNIS_SUBSCRIPTION_005());
        execute(TC_MEC025_RNIS_SUBSCRIPTION_005());
      }
      }
    }


    if (PICS_BWMANAGEMENT_API_SUPPORTED) {
    if (PICS_BWMANAGEMENT_API_SUPPORTED) {
      execute(TC_MEC_PLAT_MP1_BWA_BV_001());
      execute(TC_MEC_PLAT_MP1_BWA_BV_001());
+1 −1
Original line number Original line Diff line number Diff line
@@ -90,7 +90,7 @@ module BwManagementAPI_TypesAndValues {
   * @desc Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document
   * @desc Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document
   */
   */
  type enumerated FixedBWPriority {
  type enumerated FixedBWPriority {
    reserved
    not_defined_in_the_present_document
  }
  }


  /**
  /**