diff --git a/pkg/apis/compute/guestnetwork.go b/pkg/apis/compute/guestnetwork.go index 54eb48afc3..330508132a 100644 --- a/pkg/apis/compute/guestnetwork.go +++ b/pkg/apis/compute/guestnetwork.go @@ -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 { diff --git a/pkg/compute/models/guest_queries.go b/pkg/compute/models/guest_queries.go index 6fe84c86e5..3e37abfca1 100644 --- a/pkg/compute/models/guest_queries.go +++ b/pkg/compute/models/guest_queries.go @@ -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"),