From 3fd19268ae08cf3312a88cb10a6a0829ff1eed48 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Sun, 4 Apr 2021 20:34:45 +0200 Subject: vty: deprecate BTS type 'sysmobts' in favor of 'osmo-bts' Change-Id: I60d5ff887a7c830180088904c2458f7e73ce3893 --- doc/examples/osmo-bsc/osmo-bsc-minimal.cfg | 2 +- doc/examples/osmo-bsc/osmo-bsc.cfg | 2 +- doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg | 2 +- doc/manuals/chapters/bts.adoc | 2 +- src/osmo-bsc/bsc_vty.c | 15 +++++++++++++++ src/osmo-bsc/bts.c | 4 ++-- tests/ctrl/osmo-bsc-neigh-test.cfg | 4 ++-- tests/neighbor_ident.vty | 6 +++--- 8 files changed, 26 insertions(+), 11 deletions(-) diff --git a/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg b/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg index b8cd78db0..2258495d0 100644 --- a/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg @@ -2,7 +2,7 @@ network network country code 901 mobile network code 70 bts 0 - type sysmobts + type osmo-bts band GSM-1800 location_area_code 23 ipa unit-id 1800 0 diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index 828875d9e..807bd19b7 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -19,7 +19,7 @@ network handover1 maximum distance 9999 periodic location update 30 bts 0 - type sysmobts + type osmo-bts band DCS1800 cell_identity 6969 location_area_code 1 diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg index 0ecb5fc52..335e23dc5 100644 --- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg @@ -18,7 +18,7 @@ network handover1 maximum distance 9999 periodic location update 30 bts 0 - type sysmobts + type osmo-bts band DCS1800 cell_identity 0 location_area_code 1 diff --git a/doc/manuals/chapters/bts.adoc b/doc/manuals/chapters/bts.adoc index e4167757b..6ef0a0c79 100644 --- a/doc/manuals/chapters/bts.adoc +++ b/doc/manuals/chapters/bts.adoc @@ -105,7 +105,7 @@ like this: ---- network bts 0 - type sysmobts + type osmo-bts band DCS1800 description The new BTS in Baikonur location_area_code 2342 diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 5eb23936d..1a59fcb8f 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -2342,6 +2342,20 @@ DEFUN_USRATTR(cfg_bts_type, return CMD_SUCCESS; } +DEFUN_DEPRECATED(cfg_bts_type_sysmobts, + cfg_bts_type_sysmobts_cmd, + "type sysmobts", + "Set the BTS type\n" + "Deprecated alias for 'osmo-bts'\n") +{ + const char *args[] = { "osmo-bts" }; + + vty_out(vty, "%% BTS type 'sysmobts' is deprecated, " + "use 'type osmo-bts' instead.%s", VTY_NEWLINE); + + return cfg_bts_type(self, vty, 1, args); +} + DEFUN_USRATTR(cfg_bts_band, cfg_bts_band_cmd, X(BSC_VTY_ATTR_RESTART_ABIS_OML_LINK), @@ -7696,6 +7710,7 @@ int bsc_vty_init(struct gsm_network *network) install_element(GSMNET_NODE, &cfg_bts_cmd); install_node(&bts_node, config_write_bts); install_element(BTS_NODE, &cfg_bts_type_cmd); + install_element(BTS_NODE, &cfg_bts_type_sysmobts_cmd); install_element(BTS_NODE, &cfg_description_cmd); install_element(BTS_NODE, &cfg_no_description_cmd); install_element(BTS_NODE, &cfg_bts_band_cmd); diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c index 7abc1265f..2192c560f 100644 --- a/src/osmo-bsc/bts.c +++ b/src/osmo-bsc/bts.c @@ -67,7 +67,7 @@ const struct value_string bts_type_names[_NUM_GSM_BTS_TYPE + 1] = { { GSM_BTS_TYPE_NANOBTS, "nanobts" }, { GSM_BTS_TYPE_RBS2000, "rbs2000" }, { GSM_BTS_TYPE_NOKIA_SITE, "nokia_site" }, - { GSM_BTS_TYPE_OSMOBTS, "sysmobts" }, + { GSM_BTS_TYPE_OSMOBTS, "osmo-bts" }, { 0, NULL } }; @@ -77,7 +77,7 @@ const struct value_string bts_type_descs[_NUM_GSM_BTS_TYPE+1] = { { GSM_BTS_TYPE_NANOBTS, "ip.access nanoBTS or compatible" }, { GSM_BTS_TYPE_RBS2000, "Ericsson RBS2000 Series" }, { GSM_BTS_TYPE_NOKIA_SITE, "Nokia {Metro,Ultra,In}Site" }, - { GSM_BTS_TYPE_OSMOBTS, "sysmocom sysmoBTS" }, + { GSM_BTS_TYPE_OSMOBTS, "Osmocom Base Transceiver Station" }, { 0, NULL } }; diff --git a/tests/ctrl/osmo-bsc-neigh-test.cfg b/tests/ctrl/osmo-bsc-neigh-test.cfg index 7ef8271fe..93d7fca83 100644 --- a/tests/ctrl/osmo-bsc-neigh-test.cfg +++ b/tests/ctrl/osmo-bsc-neigh-test.cfg @@ -26,7 +26,7 @@ network periodic location update 30 neighbor-resolution bind 127.0.0.1 bts 0 - type sysmobts + type osmo-bts band DCS1800 cell_identity 6969 location_area_code 1 @@ -83,7 +83,7 @@ network phys_chan_config TCH/F hopping enabled 0 bts 1 - type sysmobts + type osmo-bts band DCS1800 cell_identity 123 location_area_code 1 diff --git a/tests/neighbor_ident.vty b/tests/neighbor_ident.vty index b1429d8f9..950d85235 100644 --- a/tests/neighbor_ident.vty +++ b/tests/neighbor_ident.vty @@ -19,7 +19,7 @@ OsmoBSC(config-net)# neighbor-resolution bind 1.2.3.4 ? [<0-65535>] Port to bind the service to [defaults to 4248 if not provided] OsmoBSC(config-net)# bts 0 -OsmoBSC(config-net-bts)# type sysmobts +OsmoBSC(config-net-bts)# type osmo-bts OsmoBSC(config-net-bts)# base_station_id_code 10 OsmoBSC(config-net-bts)# location_area_code 20 OsmoBSC(config-net-bts)# cell_identity 30 @@ -29,7 +29,7 @@ OsmoBSC(config-net-bts-trx)# exit OsmoBSC(config-net-bts)# exit OsmoBSC(config-net)# bts 1 -OsmoBSC(config-net-bts)# type sysmobts +OsmoBSC(config-net-bts)# type osmo-bts OsmoBSC(config-net-bts)# base_station_id_code 11 OsmoBSC(config-net-bts)# location_area_code 21 OsmoBSC(config-net-bts)# cell_identity 31 @@ -39,7 +39,7 @@ OsmoBSC(config-net-bts-trx)# exit OsmoBSC(config-net-bts)# exit OsmoBSC(config-net)# bts 2 -OsmoBSC(config-net-bts)# type sysmobts +OsmoBSC(config-net-bts)# type osmo-bts OsmoBSC(config-net-bts)# base_station_id_code 12 OsmoBSC(config-net-bts)# location_area_code 22 OsmoBSC(config-net-bts)# cell_identity 65535 -- cgit v1.2.3