aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-02-03 17:02:50 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2017-02-03 17:05:14 +0100
commite1f8b9244a5cefc2f42878143a132007db456ef7 (patch)
tree6d4e4ba07476967991fd267dd638ee8015a6a69d /openbsc/src/libbsc
parente02e1e782f747a83cf84e00ccc0093a6b2790455 (diff)
om2000: add VTY command to delete CON groups
The currently unused function abis_om2000_vty.c:con_group_del() allows deleting OM 2000 connection groups. This commit adds a matching VTY command to make use of it. Change-Id: I39a90b06e19356c536cacd1c923e195dd305ab80
Diffstat (limited to 'openbsc/src/libbsc')
-rw-r--r--openbsc/src/libbsc/abis_om2000_vty.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/openbsc/src/libbsc/abis_om2000_vty.c b/openbsc/src/libbsc/abis_om2000_vty.c
index adad479..060fb8b 100644
--- a/openbsc/src/libbsc/abis_om2000_vty.c
+++ b/openbsc/src/libbsc/abis_om2000_vty.c
@@ -342,6 +342,31 @@ DEFUN(cfg_om2k_con_group, cfg_om2k_con_group_cmd,
return CMD_SUCCESS;
}
+DEFUN(del_om2k_con_group, del_om2k_con_group_cmd,
+ "del-connection-group <1-31>",
+ "Delete a CON (Concentrator) Connection Group\n"
+ "CON Connection Group Number\n")
+{
+ struct gsm_bts *bts = vty->index;
+ int rc;
+ uint8_t cgid = atoi(argv[0]);
+
+ if (bts->type != GSM_BTS_TYPE_RBS2000) {
+ vty_out(vty, "%% CON MO only exists in RBS2000%s",
+ VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ rc = con_group_del(bts, cgid);
+ if (rc != 0) {
+ vty_out(vty, "%% Cannot delete CON Group%s",
+ VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ return CMD_SUCCESS;
+}
+
#define CON_PATH_HELP "CON Path (In/Out)\n" \
"Add CON Path to Concentration Group\n" \
"Delete CON Path from Concentration Group\n" \
@@ -551,6 +576,7 @@ int abis_om2k_vty_init(void)
install_element(BTS_NODE, &cfg_bts_is_conn_list_cmd);
install_element(BTS_NODE, &cfg_om2k_con_group_cmd);
+ install_element(BTS_NODE, &del_om2k_con_group_cmd);
return 0;
}