mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-03 21:43:32 +00:00
bsc/nitb: Allow to set the GPRS mode through the ctrl command
Create a control command to read and modify the gprs mode. Use the get_string_value to indicate if the value was found or not. This is useful for the ctrl interface where I didn't want to replicate "none", "gprs" and "egprs". Share code to verify that a BTS supports the mode. Related: SYS#591
This commit is contained in:
@@ -491,6 +491,25 @@ class TestCtrlNITB(TestCtrlBase):
|
||||
self.assertEquals(r['mtype'], 'SET_REPLY')
|
||||
self.assertEquals(r['value'], 'Tried to drop the BTS')
|
||||
|
||||
def testGprsMode(self):
|
||||
r = self.do_get('bts.0.gprs-mode')
|
||||
self.assertEquals(r['mtype'], 'GET_REPLY')
|
||||
self.assertEquals(r['var'], 'bts.0.gprs-mode')
|
||||
self.assertEquals(r['value'], 'none')
|
||||
|
||||
r = self.do_set('bts.0.gprs-mode', 'bla')
|
||||
self.assertEquals(r['mtype'], 'ERROR')
|
||||
self.assertEquals(r['error'], 'Mode is not known')
|
||||
|
||||
r = self.do_set('bts.0.gprs-mode', 'egprs')
|
||||
self.assertEquals(r['mtype'], 'SET_REPLY')
|
||||
self.assertEquals(r['value'], 'egprs')
|
||||
|
||||
r = self.do_get('bts.0.gprs-mode')
|
||||
self.assertEquals(r['mtype'], 'GET_REPLY')
|
||||
self.assertEquals(r['var'], 'bts.0.gprs-mode')
|
||||
self.assertEquals(r['value'], 'egprs')
|
||||
|
||||
class TestCtrlNAT(TestCtrlBase):
|
||||
|
||||
def ctrl_command(self):
|
||||
|
||||
Reference in New Issue
Block a user