aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/vty_test_runner.py
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2013-10-24 12:48:23 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-10-24 18:02:33 +0200
commit4211d79cd1381efd1c1e457d0592c2a1f5b2a4fd (patch)
tree49ff087b1242f116a1366e01684ceadfc5effde0 /openbsc/tests/vty_test_runner.py
parent90267a961c8254b5a01daa1bc8e90fd4c470d7ed (diff)
gbproxy/vty: Enhance delete-gbproxy-peer command
This adds the option to delete all BVC peers and/or NS_VC with a given NSEI with a single command. Static (configured) NS-VC are not affected. In addition, all connections for this NSEI that can be deleted by this command can be listed without deleting them by appending 'dry-run' to the command. Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/tests/vty_test_runner.py')
-rw-r--r--openbsc/tests/vty_test_runner.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py
index e040caccf..18cf68867 100644
--- a/openbsc/tests/vty_test_runner.py
+++ b/openbsc/tests/vty_test_runner.py
@@ -527,6 +527,22 @@ class TestVTYGbproxy(TestVTYGenericBSC):
res = self.vty.command("show gbproxy stats")
self.assert_(res.find('GBProxy Global Statistics') >= 0)
+ def testVtyDeletePeer(self):
+ self.vty.enable()
+ self.assertTrue(self.vty.verify('delete-gbproxy-peer 9999 bvci 7777', ['BVC not found']))
+ res = self.vty.command("delete-gbproxy-peer 9999 all dry-run")
+ self.assert_(res.find('Not Deleted 0 BVC') >= 0)
+ self.assert_(res.find('Not Deleted 0 NS-VC') >= 0)
+ res = self.vty.command("delete-gbproxy-peer 9999 only-bvc dry-run")
+ self.assert_(res.find('Not Deleted 0 BVC') >= 0)
+ self.assert_(res.find('Not Deleted 0 NS-VC') < 0)
+ res = self.vty.command("delete-gbproxy-peer 9999 only-nsvc dry-run")
+ self.assert_(res.find('Not Deleted 0 BVC') < 0)
+ self.assert_(res.find('Not Deleted 0 NS-VC') >= 0)
+ res = self.vty.command("delete-gbproxy-peer 9999 all")
+ self.assert_(res.find('Deleted 0 BVC') >= 0)
+ self.assert_(res.find('Deleted 0 NS-VC') >= 0)
+
def add_nat_test(suite, workdir):
if not os.path.isfile(os.path.join(workdir, "src/osmo-bsc_nat/osmo-bsc_nat")):
print("Skipping the NAT test")