From 7b6f28eefab15534ff17300cb2bf026cc003a81c Mon Sep 17 00:00:00 2001 From: Qu Xuan Date: Fri, 4 Jun 2021 14:36:20 +0800 Subject: [PATCH] fix(region): huawei disk tags --- pkg/multicloud/huawei/disk.go | 2 +- pkg/multicloud/tag_base.go | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/pkg/multicloud/huawei/disk.go b/pkg/multicloud/huawei/disk.go index 29c3cad97e..7e9f2f65ca 100644 --- a/pkg/multicloud/huawei/disk.go +++ b/pkg/multicloud/huawei/disk.go @@ -91,7 +91,7 @@ type VolumeImageMetadata struct { type SDisk struct { storage *SStorage multicloud.SDisk - multicloud.HuaweiTags + multicloud.HuaweiDiskTags details *SResourceDetail ID string `json:"id"` diff --git a/pkg/multicloud/tag_base.go b/pkg/multicloud/tag_base.go index e9b3efd718..d0374f3d6f 100644 --- a/pkg/multicloud/tag_base.go +++ b/pkg/multicloud/tag_base.go @@ -275,6 +275,22 @@ func (self *HuaweiTags) SetTags(tags map[string]string, replace bool) error { return errors.Wrap(cloudprovider.ErrNotImplemented, "SetTags") } +type HuaweiDiskTags struct { + Tags map[string]string +} + +func (self *HuaweiDiskTags) GetTags() (map[string]string, error) { + return self.Tags, nil +} + +func (self *HuaweiDiskTags) GetSysTags() map[string]string { + return nil +} + +func (self *HuaweiDiskTags) SetTags(tags map[string]string, replace bool) error { + return errors.Wrap(cloudprovider.ErrNotImplemented, "SetTags") +} + type OpenStackTags struct { Metadata map[string]string }