From eeadb0147e6ec10bc49e4f732d394151df06af9c Mon Sep 17 00:00:00 2001 From: Qu Xuan Date: Tue, 29 Oct 2024 15:05:36 +0800 Subject: [PATCH] fix(ucloud): avoid panic when sync vm tags --- pkg/multicloud/ucloud/instance.go | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/pkg/multicloud/ucloud/instance.go b/pkg/multicloud/ucloud/instance.go index 91158dd5a..4f2cbc604 100644 --- a/pkg/multicloud/ucloud/instance.go +++ b/pkg/multicloud/ucloud/instance.go @@ -184,28 +184,6 @@ func (self *SInstance) Refresh() error { return jsonutils.Update(self, new) } -func (self *SInstance) IsEmulated() bool { - return false -} - -func (self *SInstance) GetSysTags() map[string]string { - data := map[string]string{} - // todo: add price key here - data["zone_ext_id"] = self.host.zone.GetGlobalId() - if len(self.BasicImageID) > 0 { - if image, err := self.host.zone.region.GetImage(self.BasicImageID); err != nil { - log.Errorf("Failed to find image %s for instance %s", self.BasicImageID, self.GetName()) - } else { - meta := image.GetSysTags() - for k, v := range meta { - data[k] = v - } - } - } - - return data -} - // 计费模式,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费(需开启权限); func (self *SInstance) GetBillingType() string { switch self.ChargeType {