osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41217?usp=email )

Change subject: hlr: add HLR_IMPL_PYHSS
......................................................................

hlr: add HLR_IMPL_PYHSS

Prepare to run the HLR testsuite against PyHSS.

Related: OS#6862
Change-Id: I0989374d777aabf5afaf224faeb0cb2ff4e603e6
---
M hlr/HLR_Tests.ttcn
1 file changed, 21 insertions(+), 5 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  fixeria: Looks good to me, but someone else must approve
  Jenkins Builder: Verified




diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn
index 45a8fb3..f86a6bc 100644
--- a/hlr/HLR_Tests.ttcn
+++ b/hlr/HLR_Tests.ttcn
@@ -37,6 +37,11 @@
 import from MSLookup_mDNS_Templates all;
 import from DNS_Helpers all;

+type enumerated HLR_Impl {
+       HLR_IMPL_OSMOCOM,
+       HLR_IMPL_PYHSS
+};
+
 type component test_CT extends CTRL_Adapter_CT {
        /* emulated GSUP client (MSC/SGSN) */
        var IPA_Emulation_CT vc_IPA;
@@ -71,6 +76,8 @@
        /* emulated GSUP server (second HLR) */
        charstring mp_hlr_ts_ip := "127.0.0.99";
        integer mp_hlr_ts_port := 4222;
+
+       HLR_Impl m_hlr_impl := HLR_IMPL_OSMOCOM;
 };

 type record HlrSubscrAud2G {
@@ -235,14 +242,19 @@
        activate(as_Tguard());

        f_init_gsup("HLR_Test", legacy);
-       f_init_vty();
-       f_init_mslookup();
+
+       if (m_hlr_impl == HLR_IMPL_OSMOCOM) {
+               f_init_vty();
+               f_init_mslookup();
+       }

        if (gsup_server) {
                f_init_gsup_server("HLR_Test");
        }

-       f_ipa_ctrl_start_client(mp_hlr_ip, mp_hlr_ctrl_port);
+       if (m_hlr_impl == HLR_IMPL_OSMOCOM) {
+               f_ipa_ctrl_start_client(mp_hlr_ip, mp_hlr_ctrl_port);
+       }
 }

 /*! Start HLR_ConnHdlr from testCT in a separate thread.
@@ -258,7 +270,9 @@
        vc_conn := HLR_ConnHdlr.create(id);
        connect(vc_conn:GSUP, vc_GSUP:GSUP_CLIENT);
        connect(vc_conn:GSUP_PROC, vc_GSUP:GSUP_PROC);
-       connect(vc_conn:mDNS, vc_MSLookup_mDNS:mDNS);
+       if (m_hlr_impl == HLR_IMPL_OSMOCOM) {
+               connect(vc_conn:mDNS, vc_MSLookup_mDNS:mDNS);
+       }

        if (gsup_server) {
                connect(vc_conn:GSUP, vc_GSUP_server:GSUP_CLIENT);
@@ -296,7 +310,9 @@
                g_pars := valueof(pars);
                f_create_gsup_expect_explicit(hex2str(g_pars.sub.imsi), 
vc_GSUP_client);
        }
-       f_handler_init_vty();
+       if (m_hlr_impl == HLR_IMPL_OSMOCOM) {
+               f_handler_init_vty();
+       }
        fn.apply();
 }


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41217?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I0989374d777aabf5afaf224faeb0cb2ff4e603e6
Gerrit-Change-Number: 41217
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>

Reply via email to