summaryrefslogtreecommitdiff
path: root/smoketest/scripts
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-06-16 20:23:18 +0200
committerChristian Poessinger <christian@poessinger.com>2021-06-16 20:23:18 +0200
commit3a90c7a333ef90fea6cd520483d5849fc979f614 (patch)
treeaa813a7a945acaa0dd863a6042edfd24e8ed8d38 /smoketest/scripts
parent6cfcf7a761adb3e51f9279611435a39a1424e9c9 (diff)
downloadvyos-1x-3a90c7a333ef90fea6cd520483d5849fc979f614.tar.gz
vyos-1x-3a90c7a333ef90fea6cd520483d5849fc979f614.zip
policy: T3631: migrate "set extcommunity-rt/soo" to "set extcommunity rt|soo"
Thi adds a new configuration level "set extcommunity" which then holds rt and soo als leaf-nodes below. This is the foundational work required to properly implement T3624 ("BGP: add support for extended community bandwidth definition")
Diffstat (limited to 'smoketest/scripts')
-rwxr-xr-xsmoketest/scripts/cli/test_policy.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_policy.py b/smoketest/scripts/cli/test_policy.py
index 59425b789..bfa44088e 100755
--- a/smoketest/scripts/cli/test_policy.py
+++ b/smoketest/scripts/cli/test_policy.py
@@ -773,6 +773,8 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase):
'as-path-prepend' : '1234567890 987654321',
'atomic-aggregate' : '',
'distance' : '110',
+ 'extcommunity-rt' : '123:456',
+ 'extcommunity-soo' : '456:789',
'ipv6-next-hop-global': '2001::1',
'ipv6-next-hop-local' : 'fe80::1',
'ip-next-hop' : '192.168.1.1',
@@ -896,6 +898,10 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase):
self.cli_set(path + ['rule', rule, 'set', 'atomic-aggregate'])
if 'distance' in rule_config['set']:
self.cli_set(path + ['rule', rule, 'set', 'distance', rule_config['set']['distance']])
+ if 'extcommunity-rt' in rule_config['set']:
+ self.cli_set(path + ['rule', rule, 'set', 'extcommunity', 'rt', rule_config['set']['extcommunity-rt']])
+ if 'extcommunity-soo' in rule_config['set']:
+ self.cli_set(path + ['rule', rule, 'set', 'extcommunity', 'soo', rule_config['set']['extcommunity-soo']])
if 'ipv6-next-hop-global' in rule_config['set']:
self.cli_set(path + ['rule', rule, 'set', 'ipv6-next-hop', 'global', rule_config['set']['ipv6-next-hop-global']])
if 'ipv6-next-hop-local' in rule_config['set']:
@@ -1035,6 +1041,10 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase):
tmp += 'atomic-aggregate'
elif 'distance' in rule_config['set']:
tmp += 'distance ' + rule_config['set']['distance']
+ elif 'extcommunity-rt' in rule_config['set']:
+ tmp += 'extcommunity rt' + rule_config['set']['extcommunity-rt']
+ elif 'extcommunity-soo' in rule_config['set']:
+ tmp += 'extcommunity rt' + rule_config['set']['extcommunity-soo']
elif 'ip-next-hop' in rule_config['set']:
tmp += 'ip next-hop ' + rule_config['set']['ip-next-hop']
elif 'ipv6-next-hop-global' in rule_config['set']: