mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
climc: 在打印路由条目时显示下一跳资源id
This commit is contained in:
@@ -39,10 +39,10 @@ func init() {
|
||||
typ, _ := routeObj.GetString("type")
|
||||
cidr, _ := routeObj.GetString("cidr")
|
||||
next_hop_type, _ := routeObj.GetString("next_hop_type")
|
||||
next_hop, _ := routeObj.GetString("next_hop")
|
||||
next_hop_id, _ := routeObj.GetString("next_hop_id")
|
||||
route := fmt.Sprintf("%8s: %18s %s", typ, cidr, next_hop_type)
|
||||
if len(next_hop) > 0 {
|
||||
route += fmt.Sprintf(":%s", next_hop)
|
||||
if next_hop_id != "" {
|
||||
route += fmt.Sprintf(":%s", next_hop_id)
|
||||
}
|
||||
routes = append(routes, route)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user