Skip to content

Commit 388b545

Browse files
committed
Create route_check.py compatible with VRF
Signed-off-by: Petro Bratash <petrox.bratash@intel.com>
1 parent bcf36eb commit 388b545

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

scripts/route_check.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,10 @@ def get_routes():
281281

282282
valid_rt = []
283283
for k in keys:
284-
if not is_vrf(k) and not is_local(k):
284+
if (is_vrf(k)):
285+
k = k.split(":", 1)
286+
287+
if not is_local(k):
285288
valid_rt.append(add_prefix_ifnot(k.lower()))
286289

287290
print_message(syslog.LOG_DEBUG, json.dumps({"ROUTE_TABLE": sorted(valid_rt)}, indent=4))

0 commit comments

Comments
 (0)