This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
neels gerrit-no-reply at lists.osmocom.orgneels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21369 ) Change subject: add f_vty_cfg_bts(), f_vty_cfg_msc() ...................................................................... add f_vty_cfg_bts(), f_vty_cfg_msc() These allow passing N vty configurations on the bts / msc node without requiring subsequent 'exit'. As an example, use f_vty_cfg_msc() in BSC_Tests.ttcn AMR config. Change-Id: I9f3e485f692acb3d2a7620e9b454b372651be78e --- M bsc/BSC_Tests.ttcn M library/Osmocom_VTY_Functions.ttcn 2 files changed, 28 insertions(+), 22 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index a63d536..cda0687 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -3611,33 +3611,31 @@ /* Allow 5,90k only (current default config) */ private function f_allow_amr_rate_5_90k() runs on test_CT { - f_vty_enter_cfg_msc(BSCVTY, 0); - f_vty_transceive(BSCVTY, "amr-config 12_2k forbidden"); - f_vty_transceive(BSCVTY, "amr-config 10_2k forbidden"); - f_vty_transceive(BSCVTY, "amr-config 7_95k forbidden"); - f_vty_transceive(BSCVTY, "amr-config 7_40k forbidden"); - f_vty_transceive(BSCVTY, "amr-config 6_70k forbidden"); - f_vty_transceive(BSCVTY, "amr-config 5_90k allowed"); - f_vty_transceive(BSCVTY, "amr-config 5_15k forbidden"); - f_vty_transceive(BSCVTY, "amr-config 4_75k forbidden"); - f_vty_transceive(BSCVTY, "exit"); - f_vty_transceive(BSCVTY, "exit"); + f_vty_cfg_msc(BSCVTY, 0, { + "amr-config 12_2k forbidden", + "amr-config 10_2k forbidden", + "amr-config 7_95k forbidden", + "amr-config 7_40k forbidden", + "amr-config 6_70k forbidden", + "amr-config 5_90k allowed", + "amr-config 5_15k forbidden", + "amr-config 4_75k forbidden" + }); } /* Allow 4,75k, 5,90k, 4,70k and 12,2k, which are the most common rates * ("Config-NB-Code = 1") */ private function f_allow_amr_rate_4_75k_5_90k_7_40k_12_20k() runs on test_CT { - f_vty_enter_cfg_msc(BSCVTY, 0); - f_vty_transceive(BSCVTY, "amr-config 12_2k allowed"); - f_vty_transceive(BSCVTY, "amr-config 10_2k forbidden"); - f_vty_transceive(BSCVTY, "amr-config 7_95k forbidden"); - f_vty_transceive(BSCVTY, "amr-config 7_40k allowed"); - f_vty_transceive(BSCVTY, "amr-config 6_70k forbidden"); - f_vty_transceive(BSCVTY, "amr-config 5_90k allowed"); - f_vty_transceive(BSCVTY, "amr-config 5_15k forbidden"); - f_vty_transceive(BSCVTY, "amr-config 4_75k allowed"); - f_vty_transceive(BSCVTY, "exit"); - f_vty_transceive(BSCVTY, "exit"); + f_vty_cfg_msc(BSCVTY, 0, { + "amr-config 12_2k allowed", + "amr-config 10_2k forbidden", + "amr-config 7_95k forbidden", + "amr-config 7_40k allowed", + "amr-config 6_70k forbidden", + "amr-config 5_90k allowed", + "amr-config 5_15k forbidden", + "amr-config 4_75k allowed" + }); } testcase TC_assignment_codec_amr_f() runs on test_CT { diff --git a/library/Osmocom_VTY_Functions.ttcn b/library/Osmocom_VTY_Functions.ttcn index a51794f..b291b03 100644 --- a/library/Osmocom_VTY_Functions.ttcn +++ b/library/Osmocom_VTY_Functions.ttcn @@ -174,6 +174,14 @@ f_vty_config2(pt, {config_node}, cmd); } +function f_vty_cfg_bts(TELNETasp_PT pt, BtsNr bts := 0, rof_charstring cmds) { + f_vty_config3(pt, {"network", "bts " & int2str(bts)}, cmds); +} + +function f_vty_cfg_msc(TELNETasp_PT pt, MscNr msc := 0, rof_charstring cmds) { + f_vty_config3(pt, {"msc " & int2str(msc)}, cmds); +} + function f_vty_transceive_match(TELNETasp_PT pt, charstring cmd, template charstring exp_ret) { var charstring ret := f_vty_transceive_ret(pt, cmd); if (not match(ret, exp_ret)) { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21369 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I9f3e485f692acb3d2a7620e9b454b372651be78e Gerrit-Change-Number: 21369 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201130/15269fae/attachment.htm>