diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-04-05 15:15:36 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-04-05 15:42:25 +0200 |
commit | ab94ca18f236013f78bd23e3788f003f738396cb (patch) | |
tree | d276e283de6f8c517aa91091c7d0e375b936f491 /openbsc/tests/ctrl_test_runner.py | |
parent | 7c00983275c1b830b88db124bc0b15078b9cd45d (diff) |
nat: Add a ctrl command to add to an existing ACC list
We want to have a program add entries to the allow list
this can be done using:
$ bsc_control.py -d localhost -p 4250 -s net.0.add.allow.access-list.NAME "^IMSI$"
Diffstat (limited to 'openbsc/tests/ctrl_test_runner.py')
-rw-r--r-- | openbsc/tests/ctrl_test_runner.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/openbsc/tests/ctrl_test_runner.py b/openbsc/tests/ctrl_test_runner.py index 9e56457ca..21850e348 100644 --- a/openbsc/tests/ctrl_test_runner.py +++ b/openbsc/tests/ctrl_test_runner.py @@ -561,6 +561,18 @@ class TestCtrlNAT(TestCtrlBase): self.assertEquals(r['var'], 'net') self.assertEquals(r['value'], None) + def testAccessListManagement(self): + r = self.do_set("net.0.add.allow.access-list.404", "abc") + self.assertEquals(r['mtype'], 'ERROR') + + r = self.do_set("net.0.add.allow.access-list.bla", "^234$") + self.assertEquals(r['mtype'], 'SET_REPLY') + self.assertEquals(r['var'], 'net.0.add.allow.access-list.bla') + self.assertEquals(r['value'], 'IMSI allow added to access list') + + # TODO.. find a way to actually see if this rule has been + # added. e.g. by implementing a get for the list. + class TestCtrlSGSN(TestCtrlBase): def ctrl_command(self): return ["./src/gprs/osmo-sgsn", "-c", |