From 8f5486627203839b419103a0e7beab8d5667d552 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Mon, 14 Dec 2020 23:31:55 +0800 Subject: [PATCH] feat(region): guest: add fetchGuestNICs method --- pkg/compute/models/guest_queries.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/compute/models/guest_queries.go b/pkg/compute/models/guest_queries.go index 0a44f2571a..436ee8a501 100644 --- a/pkg/compute/models/guest_queries.go +++ b/pkg/compute/models/guest_queries.go @@ -365,6 +365,14 @@ func (self *SGuest) GetRealIPs() []string { return nil } +func (self *SGuest) fetchNICShortDesc(ctx context.Context) []api.GuestnetworkShortDesc { + nicsMap := fetchGuestNICs(ctx, []string{self.Id}, tristate.False) + if nicsMap == nil { + return nil + } + return nicsMap[self.Id] +} + type sGuestVpcsInfo struct { GuestId string Vpc []string