fix(region): show guest nic index (#23957)

This commit is contained in:
屈轩
2025-12-24 11:33:30 +08:00
committed by GitHub
parent 16ce2a6a66
commit 865a019ba3
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -53,6 +53,8 @@ type GuestnetworkShortDesc struct {
NetworkId string `json:"network_id"`
// 附属IP
SubIps string `json:"sub_ips"`
// 网卡序号
Index int `json:"index"`
}
type GuestnetworkListInput struct {
+1 -1
View File
@@ -559,7 +559,7 @@ func fetchGuestNICs(ctx context.Context, guestIds []string, virtual tristate.Tri
gnwq := GuestnetworkManager.Query()
q := gnwq.AppendField(
gnwq.Field("guest_id"),
gnwq.Field("index"),
gnwq.Field("ip_addr"),
gnwq.Field("ip6_addr"),
gnwq.Field("mac_addr").Label("mac"),