fix(region): sync ksyun tag (#19974)

This commit is contained in:
屈轩
2024-04-14 13:02:11 +08:00
committed by GitHub
parent 2258c9e15f
commit 72ece6d698
5 changed files with 11 additions and 12 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.20240412122117-cabd77839065
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240414044510-9b337f813b2e
yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32
yunion.io/x/jsonutils v1.0.1-0.20240203102553-4096f103b401
yunion.io/x/log v1.0.1-0.20240305175729-7cf2d6cd5a91
+2 -2
View File
@@ -1204,8 +1204,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.20240412122117-cabd77839065 h1:QhmnLH7I83/FnruaFr9ybeR5VM63YDbO6kp54jYG9Nc=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240412122117-cabd77839065/go.mod h1:dsUESXIbXJ+/ywbNClhldOrbPOiBi2udrgOnB/ffoWk=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240414044510-9b337f813b2e h1:Zqw7V6qufsqQoZZY24vr3RcZckzmtevO+7J6H7RyeuE=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240414044510-9b337f813b2e/go.mod h1:dsUESXIbXJ+/ywbNClhldOrbPOiBi2udrgOnB/ffoWk=
yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32 h1:v7POYkQwo1XzOxBoIoRVr/k0V9Y5JyjpshlIFa9raug=
yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=
+1 -1
View File
@@ -1472,7 +1472,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.20240412122117-cabd77839065
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20240414044510-9b337f813b2e
## explicit; go 1.18
yunion.io/x/cloudmux/pkg/apis
yunion.io/x/cloudmux/pkg/apis/billing
+3 -3
View File
@@ -459,14 +459,14 @@ func (cli *SESXiClient) SearchTemplateVM(id string) (*SVirtualMachine, error) {
var movms []mo.VirtualMachine
err := cli.scanMObjectsWithFilter(cli.client.ServiceContent.RootFolder, VIRTUAL_MACHINE_PROPS, &movms, filter)
if err != nil {
return nil, err
return nil, errors.Wrapf(err, "scanMObjectsWithFilter")
}
if len(movms) == 0 {
return nil, errors.ErrNotFound
return nil, errors.Wrapf(errors.ErrNotFound, "empty templates")
}
vm := NewVirtualMachine(cli, &movms[0], nil)
if !vm.IsTemplate() {
return nil, errors.ErrNotFound
return nil, errors.Wrapf(errors.ErrNotFound, "%s is not template", vm.GetName())
}
dc, err := vm.fetchDatacenter()
if err != nil {
+4 -5
View File
@@ -68,13 +68,12 @@ func (wire *SWire) GetINetworks() ([]cloudprovider.ICloudNetwork, error) {
if err != nil {
return nil, errors.Wrap(err, "GetNetworks")
}
inetworks := []cloudprovider.ICloudNetwork{}
ret := []cloudprovider.ICloudNetwork{}
for i := 0; i < len(networks); i++ {
if networks[i].AvailabilityZoneName == wire.zone.GetName() {
inetworks = append(inetworks, &networks[i])
}
networks[i].wire = wire
ret = append(ret, &networks[i])
}
return inetworks, nil
return ret, nil
}
func (wire *SWire) GetBandwidth() int {