Change in osmo-msc[master]: vty: mncc cfg: separate the 'mncc' from 'mncc-guard-timeout'

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 Hofmeyr gerrit-no-reply at lists.osmocom.org
Wed Dec 5 02:27:33 UTC 2018


Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/12130


Change subject: vty: mncc cfg: separate the 'mncc' from 'mncc-guard-timeout'
......................................................................

vty: mncc cfg: separate the 'mncc' from 'mncc-guard-timeout'

I want to add 'mncc internal' and 'mncc external' commands, and IMHO makes most
sense to have a common 'mncc' keyword to start MNCC config commands with. To
put it in terms of VTY online help:

  OsmoMSC(config-msc)# mncc ?
    internal       Use internal MNCC handler
    external       Use internal MNCC handler
    guard-timeout  Set global guard timeout

So far only the 'guard-timeout' exists, I want to add 'internal' and 'external'
in a subsequent commit.

Keep the old command 'mncc-guard-timeout' as deprecated alias. That means it
still works from old config files, but online documentation will omit it.

On 'write', write back the new format instead.

Rationale: see I2ec59d5eba407f83295528b51b93678d446b9cee

Change-Id: I52d69af48e1ddc87b3fb54bf66a01b1b8cbf5abe
---
M src/libmsc/msc_vty.c
M tests/test_nodes.vty
2 files changed, 16 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/30/12130/1

diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index aaefb0b..d9e57a7 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -335,16 +335,25 @@
 	return CMD_SUCCESS;
 }
 
+#define MNCC_STR "Configure Mobile Network Call Control\n"
+#define MNCC_GUARD_TIMEOUT_STR "Set global guard timer for mncc interface activity\n"
+#define MNCC_GUARD_TIMEOUT_VALUE_STR "guard timer value (sec.)\n"
+
 DEFUN(cfg_msc_mncc_guard_timeout,
       cfg_msc_mncc_guard_timeout_cmd,
-      "mncc-guard-timeout <0-255>",
-      "Set global guard timer for mncc interface activity\n"
-      "guard timer value (sec.)")
+      "mncc guard-timeout <0-255>",
+      MNCC_STR
+      MNCC_GUARD_TIMEOUT_STR MNCC_GUARD_TIMEOUT_VALUE_STR)
 {
 	gsmnet->mncc_guard_timeout = atoi(argv[0]);
 	return CMD_SUCCESS;
 }
 
+ALIAS_DEPRECATED(cfg_msc_mncc_guard_timeout,
+	         cfg_msc_deprecated_mncc_guard_timeout_cmd,
+		 "mncc-guard-timeout <0-255>",
+		 MNCC_GUARD_TIMEOUT_STR MNCC_GUARD_TIMEOUT_VALUE_STR);
+
 DEFUN(cfg_msc_assign_tmsi, cfg_msc_assign_tmsi_cmd,
       "assign-tmsi",
       "Assign TMSI during Location Updating.\n")
@@ -433,7 +442,7 @@
 static int config_write_msc(struct vty *vty)
 {
 	vty_out(vty, "msc%s", VTY_NEWLINE);
-	vty_out(vty, " mncc-guard-timeout %i%s",
+	vty_out(vty, " mncc guard-timeout %i%s",
 		gsmnet->mncc_guard_timeout, VTY_NEWLINE);
 	vty_out(vty, " %sassign-tmsi%s",
 		gsmnet->vlr->cfg.assign_tmsi? "" : "no ", VTY_NEWLINE);
@@ -1443,6 +1452,7 @@
 	install_node(&msc_node, config_write_msc);
 	install_element(MSC_NODE, &cfg_msc_assign_tmsi_cmd);
 	install_element(MSC_NODE, &cfg_msc_mncc_guard_timeout_cmd);
+	install_element(MSC_NODE, &cfg_msc_deprecated_mncc_guard_timeout_cmd);
 	install_element(MSC_NODE, &cfg_msc_no_assign_tmsi_cmd);
 	install_element(MSC_NODE, &cfg_msc_auth_tuple_max_reuse_count_cmd);
 	install_element(MSC_NODE, &cfg_msc_auth_tuple_reuse_on_error_cmd);
diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty
index 61470c4..6a55e1b 100644
--- a/tests/test_nodes.vty
+++ b/tests/test_nodes.vty
@@ -30,7 +30,7 @@
 OsmoMSC(config-msc)# list
 ...
   assign-tmsi
-  mncc-guard-timeout <0-255>
+  mncc guard-timeout <0-255>
   no assign-tmsi
   auth-tuple-max-reuse-count <-1-2147483647>
   auth-tuple-reuse-on-error (0|1)
@@ -96,7 +96,7 @@
  mm info 1
  periodic location update 30
 msc
- mncc-guard-timeout 180
+ mncc guard-timeout 180
  assign-tmsi
  cs7-instance-a 0
  cs7-instance-iu 0

-- 
To view, visit https://gerrit.osmocom.org/12130
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I52d69af48e1ddc87b3fb54bf66a01b1b8cbf5abe
Gerrit-Change-Number: 12130
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181205/43b80b1a/attachment.htm>


More information about the gerrit-log mailing list