From e26db074eed419b6394dc56e4c24d6ec5701cc3d Mon Sep 17 00:00:00 2001 From: Luqman Aden Date: Tue, 24 Oct 2023 00:12:00 +0000 Subject: [PATCH] wicket: display vlan ids --- wicket/src/rack_setup/config_template.toml | 3 +++ wicket/src/ui/panes/rack_setup.rs | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/wicket/src/rack_setup/config_template.toml b/wicket/src/rack_setup/config_template.toml index 617b61fadc..da07f42cd4 100644 --- a/wicket/src/rack_setup/config_template.toml +++ b/wicket/src/rack_setup/config_template.toml @@ -47,6 +47,9 @@ infra_ip_last = "" [[rack_network_config.ports]] # Routes associated with this port. # { nexthop = "1.2.3.4", destination = "0.0.0.0/0" } +# Can also optionally specify a VLAN id if the next hop is reachable +# over an 802.1Q tagged L2 segment. +# { nexthop = "5.6.7.8", destination = "5.6.7.0/24", vid = 5 } routes = [] # Addresses associated with this port. diff --git a/wicket/src/ui/panes/rack_setup.rs b/wicket/src/ui/panes/rack_setup.rs index 086d01ce9d..36febe404f 100644 --- a/wicket/src/ui/panes/rack_setup.rs +++ b/wicket/src/ui/panes/rack_setup.rs @@ -718,7 +718,12 @@ fn rss_config_text<'a>( vec![ Span::styled(" • Route : ", label_style), Span::styled( - format!("{} -> {}", r.destination, r.nexthop), + format!( + "{} -> {} (vid={})", + r.destination, + r.nexthop, + r.vid.unwrap_or(0), + ), ok_style, ), ]