Commit e3ad1294 authored by YannGarcia's avatar YannGarcia
Browse files

Update support of namespace prefix in lost codec

parent af95a7f5
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -94,27 +94,27 @@ int lost_codec::decode (const OCTETSTRING& p_data, LibItsHttp__XmlMessageBodyTyp
  TTCN_EncDec::clear_error();
  TTCN_Buffer decoding_buffer(p_data);
  
  if ((it->second.find("<findServiceResponse") != std::string::npos) || (it->second.find("::findServiceResponse") != std::string::npos)) {
  if (it->second.find("findServiceResponse>") != std::string::npos) {
    loggers::get_instance().warning("lost_codec::decode: Process FindServiceResponse");
    urn__ietf__params__xml__ns__lost1::FindServiceResponse find_service_response;
    find_service_response.decode(urn__ietf__params__xml__ns__lost1::FindServiceResponse_descr_, decoding_buffer, TTCN_EncDec::CT_XER, XER_EXTENDED);
    msg.findServiceResponse() = find_service_response;
  } else if ((it->second.find("<listServicesResponse") != std::string::npos) || (it->second.find("::listServicesResponse") != std::string::npos)) {
  } else if (it->second.find("listServicesResponse>") != std::string::npos) {
    loggers::get_instance().warning("lost_codec::decode: Process ListServicesResponse");
    urn__ietf__params__xml__ns__lost1::ListServicesResponse list_services_response;
    list_services_response.decode(urn__ietf__params__xml__ns__lost1::ListServicesResponse_descr_, decoding_buffer, TTCN_EncDec::CT_XER, XER_EXTENDED);
    msg.listServicesResponse() = list_services_response;
  } else if ((it->second.find("<listServicesByLocationResponse") != std::string::npos) || (it->second.find("::listServicesByLocationResponse") != std::string::npos)) {
  } else if (it->second.find("listServicesByLocationResponse>") != std::string::npos) {
    loggers::get_instance().warning("lost_codec::decode: Process ListServicesByLocationResponse");
    urn__ietf__params__xml__ns__lost1::ListServicesByLocationResponse list_services_by_location_response;
    list_services_by_location_response.decode(urn__ietf__params__xml__ns__lost1::ListServicesByLocationResponse_descr_, decoding_buffer, TTCN_EncDec::CT_XER, XER_EXTENDED);
    msg.listServicesByLocationResponse() = list_services_by_location_response;
} else if ((it->second.find("<redirect") != std::string::npos) || (it->second.find("::redirect") != std::string::npos)) {
} else if (it->second.find("redirect>") != std::string::npos) {
    loggers::get_instance().warning("lost_codec::decode: Process Redirect");
    urn__ietf__params__xml__ns__lost1::Redirect redirect;
    redirect.decode(urn__ietf__params__xml__ns__lost1::Redirect_descr_, decoding_buffer, TTCN_EncDec::CT_XER, XER_EXTENDED);
    msg.redirect() = redirect;    
 } else if ((it->second.find("<findService") != std::string::npos) || (it->second.find("::findService") != std::string::npos)) {
 } else if (it->second.find("findService>") != std::string::npos) {
    urn__ietf__params__xml__ns__lost1::FindService find_service;
    find_service.decode(urn__ietf__params__xml__ns__lost1::FindService_descr_, decoding_buffer, TTCN_EncDec::CT_XER, XER_EXTENDED);
    msg.findServiceRequest() = find_service;
+16 −25
Original line number Diff line number Diff line
[MODULE_PARAMETERS]
# This section shall contain the values of all parameters that are defined in your TTCN-3 modules.

# IUT roles
LibNg112_Pics.PICS_LIS_IUT  := false;
LibNg112_Pics.PICS_ECRF_IUT := true;
LibNg112_Pics.PICS_ESRP_IUT := false;
LibNg112_Pics.PICS_PSAP_IUT := false;

LibCommon_Time.PX_TAC := 30.0
LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0;
LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0;
@@ -17,12 +11,8 @@ LibItsHttp_Pics.PICS_HTTP_VERSION_MINOR := 0;
#LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/held+xml;charset=utf-8"
LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/lost+xml;charset=utf-8"

# LIS PICS
LibNg112_Pics.PICS_LIS_URI := "/"
LibNg112_Pics.PICS_HTTP_POST_GET_KEEP_ALIVE := false

# ECRF PICS
LibNg112_Pics.PICS_ECRF_URI := "/"
AtsECRF_Pics.PICS_ECRF_URI := "/ecrf"

LibNg112_Pixits.PX_V_POLICE_PATH := "ecrf1.gridgears.plugtests.net"

@@ -62,7 +52,8 @@ LogEventTypes:= Yes
# In this section you can specify parameters that are passed to Test Ports.

# LOST
system.httpPort.params := "HTTP(codecs=lost:lost_codec;held:held_codec)/TCP(debug=1,server=ecrf1.gridgears.plugtests.net,port=443,use_ssl=1)"
#system.httpPort.params := "HTTP(codecs=lost:lost_codec;held:held_codec)/TCP(debug=1,server=ecrf1.gridgears.plugtests.net,port=443,use_ssl=1)"
system.httpPort.params := "HTTP(codecs=lost:lost_codec;held:held_codec)/TCP(debug=1,server=192.168.1.39,port=30090,use_ssl=0)"

[DEFINE]
# In this section you can create macro definitions,
@@ -87,32 +78,32 @@ system.httpPort.params := "HTTP(codecs=lost:lost_codec;held:held_codec)/TCP(debu

[EXECUTE]
# In this section you can specify what parts of your test suite you want to execute.
#AtsNg112_TestControl.control
#AtsECRF_TestControl.control

# "IUT successfully responds with a service URI for a Point in the service boundary"
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_01
AtsECRF_TestCases.TC_ECRF_LOST_BV_01
# "IUT successfully responds with a service URI for a Circle in the service boundary"
AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_02
#AtsECRF_TestCases.TC_ECRF_LOST_BV_02
# "IUT successfully responds with an error response for an unknown Service URN in the service boundary"
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_03
#AtsECRF_TestCases.TC_ECRF_LOST_BV_03
# "IUT successfully responds with an error response for an unrecognized location profile"
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_04
#AtsECRF_TestCases.TC_ECRF_LOST_BV_04
# "IUT successfully responds with service boundary by value if requested"
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_05
#AtsECRF_TestCases.TC_ECRF_LOST_BV_05
# "IUT successfully responds with service URI for a Circle that intersects service boundary"
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_06
#AtsECRF_TestCases.TC_ECRF_LOST_BV_06
# "IUT successfully responds with a service URI for a Circle that intersects multiple service boundaries"
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_07
#AtsECRF_TestCases.TC_ECRF_LOST_BV_07
# "IUT successfully responds with a service URI for a Circle in the service boundary with multiple services"
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_08
#AtsECRF_TestCases.TC_ECRF_LOST_BV_08
# "IUT successfully responds with configured service types for a ListServices request"
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_09
#AtsECRF_TestCases.TC_ECRF_LOST_BV_09
# "IUT successfully responds with configured service types for a ListServicesByLocation request"
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_10
#AtsECRF_TestCases.TC_ECRF_LOST_BV_10
# "IUT successfully responds with configured service types for a ListServices request without service element"
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_11
#AtsECRF_TestCases.TC_ECRF_LOST_BV_11
# "IUT successfully responds with configured service types for a ListServicesByLocation request without service element"
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_12
#AtsECRF_TestCases.TC_ECRF_LOST_BV_12

[GROUPS]
# In this section you can specify groups of hosts. These groups can be used inside the
+8 −4
Original line number Diff line number Diff line
@@ -46,8 +46,12 @@ LogEventTypes:= Yes
# In this section you can specify parameters that are passed to Test Ports.

# SIP
Caller.SIPP.params := "SIP/TCP(debug=1,server=192.168.1.39,port=5060,use_ssl=0)"
CallTaker.SIPP.params := "SIP/UDP(dst_ip=172.24.1.241,dst_port=5060,src_port=5060)"
#  TCP
#Caller.SIPP.params := "SIP/TCP(debug=1,server=192.168.1.39,port=5060,use_ssl=0)"
#CallTaker.SIPP.params := "SIP/TCP(dst_ip=192.168.1.39,port=5060,use_ssl=0)"
#  UDP
Caller.SIPP.params := "SIP/UDP(debug=1,dst_ip=192.168.1.39,dst_port=5060,src_port=5060,use_ssl=0)"
CallTaker.SIPP.params := "SIP/UDP(dst_ip=192.168.1.39,dst_port=5060,src_port=5060,use_ssl=0)"

# ESRP
system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.1.39,port=30044,use_ssl=0)"
@@ -75,7 +79,7 @@ system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.1

[EXECUTE]
# In this section you can specify what parts of your test suite you want to execute.
#AtsNg112_TestControl.control
AtsPSAP_TestControl.control

# IUT successfully handles SIP INVITE with service urn and ULAW via UDP
#AtsPSAP_TestCases.TC_PSAP_SIP_INVITE_BV_01
@@ -96,7 +100,7 @@ system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.1


# Check that the IUT registers properly to an ESRP Dequeue"
AtsPSAP_TestCases.TC_PSAP_DEQUEUE_BV_01
#AtsPSAP_TestCases.TC_PSAP_DEQUEUE_BV_01

[GROUPS]
# In this section you can specify groups of hosts. These groups can be used inside the
+2 −2
Original line number Diff line number Diff line
@@ -122,11 +122,11 @@ module AtsPSAP_TestCases {
        var CSeq v_cSeq_s := p_cSeq_s;
        
        // Test control
        if ((not PICS_PSAP_USE_TLS) or (not PICS_PSAP_S_SIP_UDP1) or (not PICS_PSAP_E_SIP_URN3) or not(PICS_PSAP_B_SDP_ULA1) or PICS_PSAP_S_SIP_REGISTRATION) {
        /*        if ((not PICS_PSAP_USE_TLS) or (not PICS_PSAP_S_SIP_UDP1) or (not PICS_PSAP_E_SIP_URN3) or not(PICS_PSAP_B_SDP_ULA1) or PICS_PSAP_S_SIP_REGISTRATION) {
          log("*** " & testcasename() & ": PICS_PSAP_USE_TLS and PICS_PSAP_S_SIP_UDP1 and PICS_PSAP_E_SIP_URN3 and PICS_PSAP_B_SDP_ULA1 and NOT PICS_PSAP_S_SIP_REGISTRATION required for executing the TC ***");
          setverdict(inconc);
          stop;
        }
          }*/
        
        // Test component configuration
        f_cf_02_up(v_caller, v_call_taker);
+2 −2
Original line number Diff line number Diff line
@@ -40,9 +40,9 @@ module AtsPSAP_TestControl {
      execute(TC_PSAP_SIP_NOTIFY_BV_01(v_cSeq));
      }*/

    if (not PICS_PSAP_USE_TLS) {
    /*if (not PICS_PSAP_USE_TLS) {
      execute(TC_PSAP_TLS_BI_01(v_cSeq));
    }
      }*/

  } // End of 'control' statement