From 42cf2e03c936d34c1bda7d491f9e367bf02dddce Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 6 Jul 2015 16:41:30 +0200 Subject: sms: Add a way to always route SMS through SMPP systems default-route would only be looked at after there has been no subscriber in the local database. Depending on the setup this is not what one wants. This has been discussed at the OsmoDevCon and there have been hacks in some branches. Let's introduce a VTY command to select if SMPP should be consulted first and then fallback to the current behavior. --- openbsc/tests/vty_test_runner.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'openbsc/tests') diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index 4cd46653e..1aedcf21c 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -154,6 +154,28 @@ class TestVTYNITB(TestVTYGenericBSC): res = self.vty.command("list") return "smpp" in res + def testSmppFirst(self): + if not self.checkForSmpp(): + return + + # enable the configuration + self.vty.enable() + self.vty.command("configure terminal") + self.vty.command("smpp") + + # check the default + res = self.vty.command("write terminal") + self.assert_(res.find(' no smpp-first') > 0) + + self.vty.verify("smpp-first", ['']) + res = self.vty.command("write terminal") + self.assert_(res.find(' smpp-first') > 0) + self.assertEquals(res.find('no smpp-first'), -1) + + self.vty.verify("no smpp-first", ['']) + res = self.vty.command("write terminal") + self.assert_(res.find('no smpp-first') > 0) + def testVtyTree(self): self.vty.enable() self.assertTrue(self.vty.verify("configure terminal", [''])) -- cgit v1.2.3