[PATCH 6/6] vty: Rename 'mgcp-through-msc-ipa' command to 'use-msc-ipa-for-mgcp'

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/OpenBSC@lists.osmocom.org/.

Jacob Erlbeck jerlbeck at sysmocom.de
Fri Aug 30 16:34:03 UTC 2013


Currently the 'mgcp' command fails in the 'config-nat' node, because
it get confused with 'mgcp-through-msc-ipa' which is executed
instead because of the prefix based command selection. Thus the
latter command is renamed by this patch to avoid the common prefix.

The workaround in the test suite is removed.
---
 openbsc/src/osmo-bsc_nat/bsc_nat_vty.c |   10 +++++-----
 openbsc/tests/vty_test_runner.py       |    8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
index 511d62a..125fbf1 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
@@ -152,7 +152,7 @@ static int config_write_nat(struct vty *vty)
 	llist_for_each_entry(pgroup, &_nat->paging_groups, entry)
 		write_pgroup_lst(vty, pgroup);
 	if (_nat->mgcp_ipa)
-		vty_out(vty, " mgcp-through-msc-ipa%s", VTY_NEWLINE);
+		vty_out(vty, " use-msc-ipa-for-mgcp%s", VTY_NEWLINE);
 
 	return CMD_SUCCESS;
 }
@@ -754,9 +754,9 @@ DEFUN(cfg_nat_ussd_local,
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_nat_mgcp_ipa,
-      cfg_nat_mgcp_ipa_cmd,
-      "mgcp-through-msc-ipa",
+DEFUN(cfg_nat_use_ipa_for_mgcp,
+      cfg_nat_use_ipa_for_mgcp_cmd,
+      "use-msc-ipa-for-mgcp",
       "This needs to be set at start. Handle MGCP messages through "
       "the IPA protocol and not through the UDP socket.\n")
 {
@@ -1209,7 +1209,7 @@ int bsc_nat_vty_init(struct bsc_nat *nat)
 	install_element(NAT_NODE, &cfg_nat_ussd_query_cmd);
 	install_element(NAT_NODE, &cfg_nat_ussd_token_cmd);
 	install_element(NAT_NODE, &cfg_nat_ussd_local_cmd);
-	install_element(NAT_NODE, &cfg_nat_mgcp_ipa_cmd);
+	install_element(NAT_NODE, &cfg_nat_use_ipa_for_mgcp_cmd);
 
 	/* access-list */
 	install_element(NAT_NODE, &cfg_lst_imsi_allow_cmd);
diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py
index 7783189..06202e1 100644
--- a/openbsc/tests/vty_test_runner.py
+++ b/openbsc/tests/vty_test_runner.py
@@ -269,13 +269,13 @@ class TestVTYNAT(TestVTYGenericBTS):
         self.vty.command('mgcp')
         self.vty.command('nat')
         self.assertEquals(self.vty.node(), 'config-nat')
-        self.vty.command('line vty')
-        self.assertEquals(self.vty.node(), 'config-line')
+        self.vty.command('mgcp')
+        self.assertEquals(self.vty.node(), 'config-mgcp')
         self.vty.command('nat')
         self.assertEquals(self.vty.node(), 'config-nat')
         self.vty.command('bsc 0')
-        self.vty.command('line vty')
-        self.assertEquals(self.vty.node(), 'config-line')
+        self.vty.command('mgcp')
+        self.assertEquals(self.vty.node(), 'config-mgcp')
 
     def testRewriteNoRewrite(self):
         self.vty.enable()
-- 
1.7.9.5





More information about the OpenBSC mailing list