mirror of
https://github.com/linux-system-roles/network.git
synced 2026-07-20 17:59:00 +00:00
Support looking up named route table in routing rule
The user may need to define the named route table in the routing rule besides the table id, add support for that. The commit fixes https://github.com/linux-system-roles/network/issues/506. Signed-off-by: Wen Liang <liangwen12year@gmail.com>
This commit is contained in:
parent
f5a01f94bf
commit
cfbd14cd8a
4 changed files with 81 additions and 2 deletions
|
|
@ -2336,7 +2336,10 @@ class ArgValidator_ListConnections(ArgValidatorList):
|
|||
VALIDATE_ONE_MODE_INITSCRIPTS = "initscripts"
|
||||
|
||||
def validate_route_tables(self, connection, idx):
|
||||
for r in connection["ip"]["route"]:
|
||||
rule_route_combined_list = (
|
||||
connection["ip"]["route"] + connection["ip"]["routing_rule"]
|
||||
)
|
||||
for r in rule_route_combined_list:
|
||||
if isinstance(r["table"], Util.STRING_TYPE):
|
||||
mapping = IPRouteUtils.get_route_tables_mapping()
|
||||
if r["table"] in mapping:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue