fix(region): vendor update (#23580)

This commit is contained in:
屈轩
2025-10-22 11:12:12 +08:00
committed by GitHub
parent d5711d7d64
commit 807454ab63
4 changed files with 14 additions and 20 deletions
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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=
+1 -1
View File
@@ -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
+10 -16
View File
@@ -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 {