test-network: remove all routing policy rules in specified table

This commit is contained in:
Yu Watanabe 2019-06-17 19:57:54 +09:00
parent 1a31d050f2
commit 4ef39b4991
1 changed files with 3 additions and 1 deletions

View File

@ -188,7 +188,9 @@ def remove_fou_ports(ports):
def remove_routing_policy_rule_tables(tables):
for table in tables:
call('ip rule del table', table, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
rc = 0
while rc == 0:
rc = call('ip rule del table', table, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
def remove_routes(routes):
for route_type, addr in routes: