summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_policy.py
diff options
context:
space:
mode:
Diffstat (limited to 'smoketest/scripts/cli/test_policy.py')
-rwxr-xr-xsmoketest/scripts/cli/test_policy.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_policy.py b/smoketest/scripts/cli/test_policy.py
index 59425b789..2d7b78048 100755
--- a/smoketest/scripts/cli/test_policy.py
+++ b/smoketest/scripts/cli/test_policy.py
@@ -773,6 +773,9 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase):
'as-path-prepend' : '1234567890 987654321',
'atomic-aggregate' : '',
'distance' : '110',
+ 'extcommunity-bw' : '20000',
+ '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',
@@ -789,6 +792,18 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase):
},
},
},
+ 'bandwidth-configuration' : {
+ 'rule' : {
+ '10' : {
+ 'action' : 'deny',
+ 'set' : {
+ 'as-path-prepend' : '100 100',
+ 'distance' : '200',
+ 'extcommunity-bw' : 'num-multipaths',
+ },
+ },
+ },
+ },
}
self.cli_set(['policy', 'access-list', access_list, 'rule', '10', 'action', 'permit'])
@@ -896,6 +911,12 @@ 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-bw' in rule_config['set']:
+ self.cli_set(path + ['rule', rule, 'set', 'extcommunity', 'bandwidth', rule_config['set']['extcommunity-bw']])
+ 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 +1056,12 @@ class TestPolicy(VyOSUnitTestSHIM.TestCase):
tmp += 'atomic-aggregate'
elif 'distance' in rule_config['set']:
tmp += 'distance ' + rule_config['set']['distance']
+ elif 'extcommunity-bw' in rule_config['set']:
+ tmp += 'extcommunity bandwidth' + rule_config['set']['extcommunity-bw']
+ 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']: