[PATCH] openbsc[master]: om2000: add VTY command to delete CON groups

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Fri Feb 3 16:05:20 UTC 2017


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

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
---
M openbsc/src/libbsc/abis_om2000_vty.c
1 file changed, 26 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/42/1742/1

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 @@
 	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 @@
 
 	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;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I39a90b06e19356c536cacd1c923e195dd305ab80
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>



More information about the gerrit-log mailing list