@@ -56,6 +56,15 @@ func (s *showCommand) Execute(exec commands.Executor, arg string) (output.Output
5656 network .Zone ,
5757 }
5858 }
59+ staticRouteRows := make ([]output.TableRow , len (router .StaticRoutes ))
60+ for i , staticRoute := range router .StaticRoutes {
61+ staticRouteRows [i ] = output.TableRow {
62+ staticRoute .Name ,
63+ staticRoute .Route ,
64+ staticRoute .Nexthop ,
65+ staticRoute .Type ,
66+ }
67+ }
5968 combined := output.Combined {
6069 output.CombinedSection {
6170 Key : "" ,
@@ -70,7 +79,7 @@ func (s *showCommand) Execute(exec commands.Executor, arg string) (output.Output
7079 },
7180 },
7281 },
73- labels .GetLabelsSection (router .Labels ),
82+ labels .GetLabelsSectionWithResourceType (router .Labels , "router" ),
7483 output.CombinedSection {
7584 Key : "networks" ,
7685 Title : "Networks:" ,
@@ -84,6 +93,20 @@ func (s *showCommand) Execute(exec commands.Executor, arg string) (output.Output
8493 Rows : networkRows ,
8594 },
8695 },
96+ output.CombinedSection {
97+ Key : "static_routes" ,
98+ Title : "Static routes:" ,
99+ Contents : output.Table {
100+ Columns : []output.TableColumn {
101+ {Key : "name" , Header : "Name" },
102+ {Key : "route" , Header : "Route" , Colour : ui .DefaultAddressColours },
103+ {Key : "nexthop" , Header : "Nexthop" , Colour : ui .DefaultAddressColours },
104+ {Key : "type" , Header : "Type" },
105+ },
106+ Rows : staticRouteRows ,
107+ EmptyMessage : "No static routes defined for this router." ,
108+ },
109+ },
87110 }
88111
89112 return output.MarshaledWithHumanOutput {
0 commit comments