aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2021-10-27 17:28:49 +0200
committerlaforge <laforge@osmocom.org>2021-11-03 17:25:28 +0000
commit3ca2ae1d0ae25ccc320a0868fe7ddab92c66f989 (patch)
treed512da3fe8f928955f9c35251aaa9bed3f8ad076 /tests
parent085a92584fa95da2694052237f6c43a6909dc397 (diff)
bsc_ctrl_commands: change neighbor-list mode/arfcn via control interface
It is possible to change the neighbor-list mode via the VTY from automatic mode to manual neighbor-list configuration. In the manual mode, the user can add ARFCN values manually. This command can be found under the bts node. Lets add pendant of this command on the control interface as well. Change-Id: Id97bc0d31a358db6221c385761773fb48670c921 Related: SYS#5641
Diffstat (limited to 'tests')
-rwxr-xr-xtests/ctrl_test_runner.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py
index 5e9bcefe3..4c07d5e1e 100755
--- a/tests/ctrl_test_runner.py
+++ b/tests/ctrl_test_runner.py
@@ -525,6 +525,46 @@ class TestCtrlBSC(TestCtrlBase):
self.assertEqual(r['var'], 'apply-config-file')
self.assertEqual(r['value'], 'OK')
+ def testNeighborList(self):
+ # Enter manual neighbor-list mode
+ r = self.do_set('bts.0.neighbor-list.mode', 'manual')
+ print('respose: ' + str(r))
+ self.assertEqual(r['mtype'], 'SET_REPLY')
+ self.assertEqual(r['var'], 'bts.0.neighbor-list.mode')
+ self.assertEqual(r['value'], 'OK')
+
+ # Add an ARFCN
+ r = self.do_set('bts.0.neighbor-list.add', '123')
+ print('respose: ' + str(r))
+ self.assertEqual(r['mtype'], 'SET_REPLY')
+ self.assertEqual(r['var'], 'bts.0.neighbor-list.add')
+ self.assertEqual(r['value'], 'OK')
+
+ # Delete the ARFCN again
+ r = self.do_set('bts.0.neighbor-list.del', '123')
+ print('respose: ' + str(r))
+ self.assertEqual(r['mtype'], 'SET_REPLY')
+ self.assertEqual(r['var'], 'bts.0.neighbor-list.del')
+ self.assertEqual(r['value'], 'OK')
+
+ # Go back to automatic neighbor-list mode
+ r = self.do_set('bts.0.neighbor-list.mode', 'automatic')
+ print('respose: ' + str(r))
+ self.assertEqual(r['mtype'], 'SET_REPLY')
+ self.assertEqual(r['var'], 'bts.0.neighbor-list.mode')
+ self.assertEqual(r['value'], 'OK')
+
+ # This must not work as we are in automatic neighbor-list mode
+ r = self.do_set('bts.0.neighbor-list.add', '123')
+ print('respose: ' + str(r))
+ self.assertEqual(r['mtype'], 'ERROR')
+ self.assertEqual(r['error'], 'Neighbor list not in manual mode')
+
+ # Try an invalid neighbor-list mode
+ r = self.do_set('bts.0.neighbor-list.mode', 'qwertzuiop')
+ print('respose: ' + str(r))
+ self.assertEqual(r['mtype'], 'ERROR')
+ self.assertEqual(r['error'], 'Invalid mode')
class TestCtrlBSCNeighbor(TestCtrlBase):