[PATCH] osmo-bsc[master]: HO: vty: rename ho decision 1 vty to 'handover1' with 'hando...
Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/6500 to look at the new patch set (#4). HO: vty: rename ho decision 1 vty to 'handover1' with 'handover' alias Handover decision 2 arguments are now configured by 'handover2 foo'. To match that scheme, rename the previously 'handover foo' args for handover decision 1 to 'handover1 foo'. For backwards compatibility, still provide aliases of the original VTY commands. Writing back the config will result in 'handover1' though. Change-Id: I7305ae7c04cc70082cd80d42b2ba32ffa399f51a --- M doc/examples/osmo-bsc/osmo-bsc.cfg M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg M include/osmocom/bsc/handover_cfg.h M src/libbsc/handover_cfg.c M src/libbsc/handover_vty.c M tests/handover_cfg.vty 6 files changed, 127 insertions(+), 93 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/00/6500/4 diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index 59732af..2d759ca 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -11,12 +11,12 @@ paging any use tch 0 handover 0 handover algorithm 1 - handover window rxlev averaging 10 - handover window rxqual averaging 1 - handover window rxlev neighbor averaging 10 - handover power budget interval 6 - handover power budget hysteresis 3 - handover maximum distance + handover1 window rxlev averaging 10 + handover1 window rxqual averaging 1 + handover1 window rxlev neighbor averaging 10 + handover1 power budget interval 6 + handover1 power budget hysteresis 3 + handover1 maximum distance dyn_ts_allow_tch_f 0 periodic location update 30 bts 0 diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg index aa2c99f..b0087a7 100644 --- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg @@ -10,12 +10,12 @@ paging any use tch 0 handover 0 handover algorithm 1 - handover window rxlev averaging 10 - handover window rxqual averaging 1 - handover window rxlev neighbor averaging 10 - handover power budget interval 6 - handover power budget hysteresis 3 - handover maximum distance + handover1 window rxlev averaging 10 + handover1 window rxqual averaging 1 + handover1 window rxlev neighbor averaging 10 + handover1 power budget interval 6 + handover1 power budget hysteresis 3 + handover1 maximum distance dyn_ts_allow_tch_f 0 periodic location update 30 bts 0 diff --git a/include/osmocom/bsc/handover_cfg.h b/include/osmocom/bsc/handover_cfg.h index 024bc97..2321fcf 100644 --- a/include/osmocom/bsc/handover_cfg.h +++ b/include/osmocom/bsc/handover_cfg.h @@ -64,6 +64,7 @@ * TYPE: a type name like int. * NAME: a variable name suitable for a struct member. * DEFAULT_VAL: default value, as passed to the VTY, e.g. '0' or 'foo', without quotes. + * VTY_CMD_PREFIX: "handover1 ", "handover2 ", ... or just "" for the common general items. * VTY_CMD: a command string for VTY without any arguments. * VTY_CMD_ARG: VTY value range like '<0-23>' or 'foo|bar', will become '(VTY_CMD_ARG|default)'. * VTY_ARG_EVAL: function name for parsing the VTY arg[0], e.g. 'atoi'. @@ -74,14 +75,14 @@ #define HO_GENERAL_CFG_ALL_MEMBERS \ \ HO_CFG_ONE_MEMBER(bool, ho_active, 0, \ - "handover", "0|1", a2bool, "%d", bool2i, \ + "", "handover", "0|1", a2bool, "%d", bool2i, \ "Handover general config\n" \ "Disable in-call handover\n" \ "Enable in-call handover\n" \ "Enable/disable handover: ") \ \ HO_CFG_ONE_MEMBER(int, algorithm, 1, \ - "handover algorithm", "1|2", atoi, "%d", as_is, \ + "", "handover algorithm", "1|2", atoi, "%d", as_is, \ "Handover general config\n" \ "Choose algorithm for handover decision\n" \ "Algorithm 1: trigger handover based on comparing current cell and neighbor RxLev and RxQual," \ @@ -93,21 +94,21 @@ #define HODEC1_CFG_ALL_MEMBERS \ \ HO_CFG_ONE_MEMBER(unsigned int, hodec1_rxlev_avg_win, 10, \ - "handover window rxlev averaging", "<1-10>", atoi, "%u", as_is, \ + "handover1 ", "window rxlev averaging", "<1-10>", atoi, "%u", as_is, \ HO_CFG_STR_HANDOVER1 \ HO_CFG_STR_WIN_RXLEV \ "How many RxLev measurements are used for averaging\n" \ "RxLev averaging: " HO_CFG_STR_AVG_COUNT) \ \ HO_CFG_ONE_MEMBER(unsigned int, hodec1_rxqual_avg_win, 1, \ - "handover window rxqual averaging", "<1-10>", atoi, "%u", as_is, \ + "handover1 ", "window rxqual averaging", "<1-10>", atoi, "%u", as_is, \ HO_CFG_STR_HANDOVER1 \ HO_CFG_STR_WIN_RXQUAL \ "
[PATCH] osmo-bsc[master]: HO: vty: rename ho decision 1 vty to 'handover1' with 'hando...
Review at https://gerrit.osmocom.org/6500 HO: vty: rename ho decision 1 vty to 'handover1' with 'handover' alias Handover decision 2 arguments are now configured by 'handover2 foo'. To match that scheme, rename the previously 'handover foo' args for handover decision 1 to 'handover1 foo'. For backwards compatibility, still provide aliases of the original VTY commands. Writing back the config will result in 'handover1' though. Change-Id: I7305ae7c04cc70082cd80d42b2ba32ffa399f51a --- M doc/examples/osmo-bsc/osmo-bsc.cfg M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg M include/osmocom/bsc/handover_cfg.h M src/libbsc/handover_cfg.c M src/libbsc/handover_vty.c M tests/handover_cfg.vty 6 files changed, 127 insertions(+), 93 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/00/6500/1 diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index 59732af..2d759ca 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -11,12 +11,12 @@ paging any use tch 0 handover 0 handover algorithm 1 - handover window rxlev averaging 10 - handover window rxqual averaging 1 - handover window rxlev neighbor averaging 10 - handover power budget interval 6 - handover power budget hysteresis 3 - handover maximum distance + handover1 window rxlev averaging 10 + handover1 window rxqual averaging 1 + handover1 window rxlev neighbor averaging 10 + handover1 power budget interval 6 + handover1 power budget hysteresis 3 + handover1 maximum distance dyn_ts_allow_tch_f 0 periodic location update 30 bts 0 diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg index aa2c99f..b0087a7 100644 --- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg @@ -10,12 +10,12 @@ paging any use tch 0 handover 0 handover algorithm 1 - handover window rxlev averaging 10 - handover window rxqual averaging 1 - handover window rxlev neighbor averaging 10 - handover power budget interval 6 - handover power budget hysteresis 3 - handover maximum distance + handover1 window rxlev averaging 10 + handover1 window rxqual averaging 1 + handover1 window rxlev neighbor averaging 10 + handover1 power budget interval 6 + handover1 power budget hysteresis 3 + handover1 maximum distance dyn_ts_allow_tch_f 0 periodic location update 30 bts 0 diff --git a/include/osmocom/bsc/handover_cfg.h b/include/osmocom/bsc/handover_cfg.h index 024bc97..2321fcf 100644 --- a/include/osmocom/bsc/handover_cfg.h +++ b/include/osmocom/bsc/handover_cfg.h @@ -64,6 +64,7 @@ * TYPE: a type name like int. * NAME: a variable name suitable for a struct member. * DEFAULT_VAL: default value, as passed to the VTY, e.g. '0' or 'foo', without quotes. + * VTY_CMD_PREFIX: "handover1 ", "handover2 ", ... or just "" for the common general items. * VTY_CMD: a command string for VTY without any arguments. * VTY_CMD_ARG: VTY value range like '<0-23>' or 'foo|bar', will become '(VTY_CMD_ARG|default)'. * VTY_ARG_EVAL: function name for parsing the VTY arg[0], e.g. 'atoi'. @@ -74,14 +75,14 @@ #define HO_GENERAL_CFG_ALL_MEMBERS \ \ HO_CFG_ONE_MEMBER(bool, ho_active, 0, \ - "handover", "0|1", a2bool, "%d", bool2i, \ + "", "handover", "0|1", a2bool, "%d", bool2i, \ "Handover general config\n" \ "Disable in-call handover\n" \ "Enable in-call handover\n" \ "Enable/disable handover: ") \ \ HO_CFG_ONE_MEMBER(int, algorithm, 1, \ - "handover algorithm", "1|2", atoi, "%d", as_is, \ + "", "handover algorithm", "1|2", atoi, "%d", as_is, \ "Handover general config\n" \ "Choose algorithm for handover decision\n" \ "Algorithm 1: trigger handover based on comparing current cell and neighbor RxLev and RxQual," \ @@ -93,21 +94,21 @@ #define HODEC1_CFG_ALL_MEMBERS \ \ HO_CFG_ONE_MEMBER(unsigned int, hodec1_rxlev_avg_win, 10, \ - "handover window rxlev averaging", "<1-10>", atoi, "%u", as_is, \ + "handover1 ", "window rxlev averaging", "<1-10>", atoi, "%u", as_is, \ HO_CFG_STR_HANDOVER1 \ HO_CFG_STR_WIN_RXLEV \ "How many RxLev measurements are used for averaging\n" \ "RxLev averaging: " HO_CFG_STR_AVG_COUNT) \ \ HO_CFG_ONE_MEMBER(unsigned int, hodec1_rxqual_avg_win, 1, \ - "handover window rxqual averaging", "<1-10>", atoi, "%u", as_is, \ + "handover1 ", "window rxqual averaging", "<1-10>", atoi, "%u", as_is, \ HO_CFG_STR_HANDOVER1 \ HO_CFG_STR_WIN_RXQUAL \ "How many RxQual measurements are used for averaging\n" \ "RxQual averaging: " HO_CFG_STR_AVG_COUNT) \