From 4211d79cd1381efd1c1e457d0592c2a1f5b2a4fd Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Thu, 24 Oct 2013 12:48:23 +0200 Subject: 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 --- openbsc/tests/vty_test_runner.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'openbsc/tests') 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") -- cgit v1.2.3