aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-06-04 15:11:37 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2020-06-17 00:14:01 +0200
commitb34fdf286866b7caf828375c2782adce97c185de (patch)
tree4eb13634b57016b059c4c1f11f23d60253c9be17
parent73a6803111006e37d5a034e46fddaf7c578101b5 (diff)
vty: add 'mscpool roundrobin next' for ttcn3 tests
In the ttcn3 tests, the MSC round robin algorithm is affected by what tests ran before, so an osmo-bsc test needs this to reset the round robin to get predictable behavior to test against. Change-Id: I2155d906505a26744966f442ffb1e87a6a9b494c
-rw-r--r--src/osmo-bsc/osmo_bsc_vty.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c
index 5c624dd1c..a1cfe4f9e 100644
--- a/src/osmo-bsc/osmo_bsc_vty.c
+++ b/src/osmo-bsc/osmo_bsc_vty.c
@@ -938,6 +938,18 @@ DEFUN(show_nri, show_nri_cmd,
return CMD_SUCCESS;
}
+DEFUN(mscpool_roundrobin_next, mscpool_roundrobin_next_cmd,
+ "mscpool roundrobin next " MSC_NR_RANGE,
+ "MSC pooling: load balancing across multiple MSCs.\n"
+ "Adjust current state of the MSC round-robin algorithm (for testing).\n"
+ "Set the MSC nr to direct the next new subscriber to (for testing).\n"
+ "MSC number, as in the config file; if the number does not exist,"
+ " the round-robin continues to the next valid number.\n")
+{
+ bsc_gsmnet->mscs_round_robin_next_nr = atoi(argv[0]);
+ return CMD_SUCCESS;
+}
+
int bsc_vty_init_extra(void)
{
struct gsm_network *net = bsc_gsmnet;
@@ -1004,6 +1016,7 @@ int bsc_vty_init_extra(void)
install_element_ve(&show_nri_cmd);
install_element(ENABLE_NODE, &gen_position_trap_cmd);
+ install_element(ENABLE_NODE, &mscpool_roundrobin_next_cmd);
install_element(CFG_LOG_NODE, &logging_fltr_imsi_cmd);