Review at  https://gerrit.osmocom.org/6601

HO: vty: clearly mark 'handover foo' as legacy alias for 'handover1 foo'

The ALIAS_DEPRECATED causes the legacy commands to no longer show up in the
command listing, hence making it more clear which commands are general and
which are for hodec1 only:

== BEFORE: ==

OsmoBSC(config-net)# list
  ...
  handover (0|1|default)
  handover algorithm (1|2|default)
  handover1 window rxlev averaging (<1-10>|default)
  ...
  handover2 window rxlev averaging (<1-10>|default)
  ...
  handover2 retries (<0-9>|default)
  handover window rxlev averaging (<1-10>|default)          <-- legacy
  handover window rxqual averaging (<1-10>|default)
  handover window rxlev neighbor averaging (<1-10>|default)
  handover power budget interval (<1-99>|default)
  handover power budget hysteresis (<0-999>|default)
  handover maximum distance (<0-9999>|default)
  handover2 congestion-check (disabled|<1-999>|now)

OsmoBSC(config-net)# handover ?
  0          Disable in-call handover
  1          Enable in-call handover
  default    Enable/disable handover: Use default (0), remove explicit setting 
on this node
  algorithm  Choose algorithm for handover decision
  window     Measurement averaging settings                 <-- legacy
  power      Neighbor cell power triggering
  maximum    Maximum Timing-Advance value (i.e. MS distance) before triggering 
HO

OsmoBSC(config-net)# handover?
  handover  Handover general config                         <-- unchanged

== AFTER: ==

OsmoBSC(config-net)# list
  ...
  handover (0|1|default)
  handover algorithm (1|2|default)
  handover1 window rxlev averaging (<1-10>|default)
  ...
  handover2 window rxlev averaging (<1-10>|default)
  ...
  handover2 retries (<0-9>|default)
  handover2 congestion-check (disabled|<1-999>|now)      <-- no more legacy

OsmoBSC(config-net)# handover ?
  0          Disable in-call handover
  1          Enable in-call handover
  default    Enable/disable handover: Use default (0), remove explicit setting 
on this node
  algorithm  Choose algorithm for handover decision
                                                         <-- no more legacy

OsmoBSC(config-net)# handover?
  handover  Handover general config                      <-- unchanged

The "Legacy" doc string actually never shows on the VTY console, but it will
show in the reference manual.

(Even with ALIAS(), a 'handover?' would only show the "Handover general config"
doc string, so no loss there from using ALIAS_DEPRECATED().)

Change-Id: I86be674d82242f9ca73a4d0040015c1c79f2422d
---
M src/libbsc/handover_vty.c
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/01/6601/1

diff --git a/src/libbsc/handover_vty.c b/src/libbsc/handover_vty.c
index 0bd654c..51e448e 100644
--- a/src/libbsc/handover_vty.c
+++ b/src/libbsc/handover_vty.c
@@ -79,9 +79,9 @@
                          VTY_CMD_PREFIX, VTY_CMD, VTY_CMD_ARG, VTY_ARG_EVAL, \
                          VTY_WRITE_FMT, VTY_WRITE_CONV, \
                          VTY_DOC) \
-ALIAS(cfg_ho_##NAME, cfg_ho_##NAME##_cmd_alias, \
+ALIAS_DEPRECATED(cfg_ho_##NAME, cfg_ho_##NAME##_cmd_alias, \
       "handover " VTY_CMD " (" VTY_CMD_ARG "|default)", \
-      VTY_DOC \
+      "Legacy alias for 'handover1': " VTY_DOC \
       "Use default (" #DEFAULT_VAL "), remove explicit setting on this 
node\n");
 
 HODEC1_CFG_ALL_MEMBERS

-- 
To view, visit https://gerrit.osmocom.org/6601
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I86be674d82242f9ca73a4d0040015c1c79f2422d
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofm...@sysmocom.de>

Reply via email to