diff options
| author | Christian Poessinger <christian@poessinger.com> | 2022-05-06 18:30:33 +0200 | 
|---|---|---|
| committer | Christian Poessinger <christian@poessinger.com> | 2022-05-06 18:32:08 +0200 | 
| commit | fced75e125c87add45c9fbd1ef92dae687f7e536 (patch) | |
| tree | 452d68fbffacd517c5c57ddf91659a2e55315797 /smoketest/scripts/cli/test_protocols_bgp.py | |
| parent | fb48da5f61daae9427b912275151369bad9be8d4 (diff) | |
| download | vyos-1x-fced75e125c87add45c9fbd1ef92dae687f7e536.tar.gz vyos-1x-fced75e125c87add45c9fbd1ef92dae687f7e536.zip | |
bgp: T4385: verify() peer-group in interface based neighbors
Diffstat (limited to 'smoketest/scripts/cli/test_protocols_bgp.py')
| -rwxr-xr-x | smoketest/scripts/cli/test_protocols_bgp.py | 15 | 
1 files changed, 15 insertions, 0 deletions
| diff --git a/smoketest/scripts/cli/test_protocols_bgp.py b/smoketest/scripts/cli/test_protocols_bgp.py index 6f92457b2..9c0c93779 100755 --- a/smoketest/scripts/cli/test_protocols_bgp.py +++ b/smoketest/scripts/cli/test_protocols_bgp.py @@ -887,6 +887,7 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase):          remote_asn = str(int(ASN) + 150)          neighbor = '192.0.2.1'          peer_group = 'bar' +        interface = 'eth0'          self.cli_set(base_path + ['local-as', ASN])          self.cli_set(base_path + ['neighbor', neighbor, 'remote-as', remote_asn]) @@ -898,6 +899,20 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase):              self.cli_commit()          self.cli_delete(base_path + ['neighbor', neighbor, 'remote-as']) +        # re-test with interface based peer-group +        self.cli_set(base_path + ['neighbor', interface, 'interface', 'peer-group', peer_group]) +        self.cli_set(base_path + ['neighbor', interface, 'interface', 'remote-as', 'external']) +        with self.assertRaises(ConfigSessionError): +            self.cli_commit() +        self.cli_delete(base_path + ['neighbor', interface, 'interface', 'remote-as']) + +        # re-test with interface based v6only peer-group +        self.cli_set(base_path + ['neighbor', interface, 'interface', 'v6only', 'peer-group', peer_group]) +        self.cli_set(base_path + ['neighbor', interface, 'interface', 'v6only', 'remote-as', 'external']) +        with self.assertRaises(ConfigSessionError): +            self.cli_commit() +        self.cli_delete(base_path + ['neighbor', interface, 'interface', 'v6only', 'remote-as']) +          self.cli_commit()          frrconfig = self.getFRRconfig(f'router bgp {ASN}') | 
