From 807454ab63d77b7e2984f575f810716bf8b6a356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=88=E8=BD=A9?= Date: Wed, 22 Oct 2025 11:12:12 +0800 Subject: [PATCH] fix(region): vendor update (#23580) --- go.mod | 2 +- go.sum | 4 +-- vendor/modules.txt | 2 +- .../pkg/multicloud/huawei/secgrouprule.go | 26 +++++++------------ 4 files changed, 14 insertions(+), 20 deletions(-) diff --git a/go.mod b/go.mod index 23ea454ec4..f0f78630eb 100644 --- a/go.mod +++ b/go.mod @@ -88,7 +88,7 @@ require ( k8s.io/client-go v0.19.3 k8s.io/cluster-bootstrap v0.19.3 moul.io/http2curl/v2 v2.3.0 - yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251015023247-81d74fec1924 + yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251022024207-a6ddf356a465 yunion.io/x/executor v0.0.0-20250518005516-5402e9e0bed0 yunion.io/x/jsonutils v1.0.1-0.20250507052344-1abcf4f443b1 yunion.io/x/log v1.0.1-0.20240305175729-7cf2d6cd5a91 diff --git a/go.sum b/go.sum index c050724f55..761f2e6e56 100644 --- a/go.sum +++ b/go.sum @@ -1279,8 +1279,8 @@ sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251015023247-81d74fec1924 h1:qTi24EPljmEJk2YLJsICBs37gUBbCo/NaH/oc9TmTdg= -yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251015023247-81d74fec1924/go.mod h1:S9o/TRZsnYWGaGe7o3PpeOv6CgMY8ZJwITYsEnGfOgQ= +yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251022024207-a6ddf356a465 h1:UQDct7l4uICSmaGsju1BhSFPUEM7xsE+n+7u2GqgvAs= +yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251022024207-a6ddf356a465/go.mod h1:S9o/TRZsnYWGaGe7o3PpeOv6CgMY8ZJwITYsEnGfOgQ= yunion.io/x/executor v0.0.0-20250518005516-5402e9e0bed0 h1:msG4SiDSVU7CrXH06WuHlNEZXIooTcmNbfrIGHuIHBU= yunion.io/x/executor v0.0.0-20250518005516-5402e9e0bed0/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws= yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634= diff --git a/vendor/modules.txt b/vendor/modules.txt index 207e153a74..ea84f07dc6 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1605,7 +1605,7 @@ sigs.k8s.io/structured-merge-diff/v4/value # sigs.k8s.io/yaml v1.2.0 ## explicit; go 1.12 sigs.k8s.io/yaml -# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251015023247-81d74fec1924 +# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251022024207-a6ddf356a465 ## explicit; go 1.21 yunion.io/x/cloudmux/pkg/apis yunion.io/x/cloudmux/pkg/apis/billing diff --git a/vendor/yunion.io/x/cloudmux/pkg/multicloud/huawei/secgrouprule.go b/vendor/yunion.io/x/cloudmux/pkg/multicloud/huawei/secgrouprule.go index 4c8b1a32bb..04c7c25206 100644 --- a/vendor/yunion.io/x/cloudmux/pkg/multicloud/huawei/secgrouprule.go +++ b/vendor/yunion.io/x/cloudmux/pkg/multicloud/huawei/secgrouprule.go @@ -15,7 +15,6 @@ package huawei import ( - "fmt" "net/url" "strings" @@ -32,14 +31,14 @@ type SecurityGroupRule struct { Ethertype string Id string Description string - PortRangeMax int64 - PortRangeMin int64 + Multiport string Protocol string RemoteGroupId string RemoteIPPrefix string SecurityGroupId string TenantId string Priority int + Action string } func (self *SecurityGroupRule) GetGlobalId() string { @@ -62,7 +61,10 @@ func (self *SecurityGroupRule) GetPriority() int { } func (self *SecurityGroupRule) GetAction() secrules.TSecurityRuleAction { - return secrules.SecurityRuleAllow + if self.Action == "allow" { + return secrules.SecurityRuleAllow + } + return secrules.SecurityRuleDeny } func (self *SecurityGroupRule) GetProtocol() string { @@ -73,17 +75,7 @@ func (self *SecurityGroupRule) GetProtocol() string { } func (self *SecurityGroupRule) GetPorts() string { - if self.PortRangeMax > 0 && self.PortRangeMin > 0 { - if self.PortRangeMax == self.PortRangeMin { - return fmt.Sprintf("%d", self.PortRangeMax) - } - return fmt.Sprintf("%d-%d", self.PortRangeMin, self.PortRangeMax) - } - return "" -} - -type SPageInfo struct { - NextMarker string + return self.Multiport } func (self *SecurityGroupRule) GetCIDRs() []string { @@ -121,7 +113,9 @@ func (self *SRegion) GetSecurityGroupRules(groupId string) ([]SecurityGroupRule, } part := struct { SecurityGroupRules []SecurityGroupRule - PageInfo SPageInfo + PageInfo struct { + NextMarker string + } }{} err = resp.Unmarshal(&part) if err != nil {