mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/yunionio/cloudpods.git
synced 2026-09-20 08:03:53 +08:00
fix(region): vendor update (#18850)
This commit is contained in:
4
go.mod
4
go.mod
@@ -88,14 +88,14 @@ 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.20231117073519-7ef229608659
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231201074750-e3565755ad00
|
||||
yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32
|
||||
yunion.io/x/jsonutils v1.0.1-0.20230613121553-0f3b41e2ef19
|
||||
yunion.io/x/log v1.0.1-0.20230411060016-feb3f46ab361
|
||||
yunion.io/x/ovsdb v0.0.0-20230306173834-f164f413a900
|
||||
yunion.io/x/pkg v1.0.1-0.20231101105448-abef64cdc142
|
||||
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
|
||||
yunion.io/x/sqlchemy v1.1.2-0.20231017172907-561e7f013926
|
||||
yunion.io/x/sqlchemy v1.1.2-0.20231201052514-97026b18ccf0
|
||||
yunion.io/x/structarg v0.0.0-20231017124457-df4d5009457c
|
||||
)
|
||||
|
||||
|
||||
8
go.sum
8
go.sum
@@ -1195,8 +1195,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.20231117073519-7ef229608659 h1:nJw6EQUYRBsFLz60mCklAKoxdXmL2qsY54WEkDDOtlM=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231117073519-7ef229608659/go.mod h1:2sgCN7nRPQL3woLfdgqLDd92vwAHqtlz3KKiHxC5BAw=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231201074750-e3565755ad00 h1:t+xE4ItFjCTO4A1bd7LONB3UbzbiUrIg4PdjjTIvqDw=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231201074750-e3565755ad00/go.mod h1:2sgCN7nRPQL3woLfdgqLDd92vwAHqtlz3KKiHxC5BAw=
|
||||
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=
|
||||
@@ -1214,7 +1214,7 @@ yunion.io/x/pkg v1.0.1-0.20231101105448-abef64cdc142 h1:L6LqxfP08eWUx+A6yQdrL6VB
|
||||
yunion.io/x/pkg v1.0.1-0.20231101105448-abef64cdc142/go.mod h1:ksCJVQ+DwKrJ5QBEoU8pzrDFfDaZVAFH/iJ6yQCYxJk=
|
||||
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e h1:v+EzIadodSwkdZ/7bremd7J8J50Cise/HCylsOJngmo=
|
||||
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e/go.mod h1:0iFKpOs1y4lbCxeOmq3Xx/0AcQoewVPwj62eRluioEo=
|
||||
yunion.io/x/sqlchemy v1.1.2-0.20231017172907-561e7f013926 h1:FJ+2J0MwmxUcuN/8ukWHdK2XIoV3GGCotTCgi0w4L+w=
|
||||
yunion.io/x/sqlchemy v1.1.2-0.20231017172907-561e7f013926/go.mod h1:uuPVZEyEq3sWd5vf9VjGSy6lZzof22X87OEHw9sddJQ=
|
||||
yunion.io/x/sqlchemy v1.1.2-0.20231201052514-97026b18ccf0 h1:+MaykFV6YCakTLnHR3v31tovXhkvWgkBPFa83MuCekA=
|
||||
yunion.io/x/sqlchemy v1.1.2-0.20231201052514-97026b18ccf0/go.mod h1:uuPVZEyEq3sWd5vf9VjGSy6lZzof22X87OEHw9sddJQ=
|
||||
yunion.io/x/structarg v0.0.0-20231017124457-df4d5009457c h1:QuLab2kSRECZRxo4Lo2KcYn6XjQFDGaZ1+x0pYDVVwQ=
|
||||
yunion.io/x/structarg v0.0.0-20231017124457-df4d5009457c/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng=
|
||||
|
||||
4
vendor/modules.txt
vendored
4
vendor/modules.txt
vendored
@@ -1473,7 +1473,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.20231117073519-7ef229608659
|
||||
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20231201074750-e3565755ad00
|
||||
## explicit; go 1.18
|
||||
yunion.io/x/cloudmux/pkg/apis
|
||||
yunion.io/x/cloudmux/pkg/apis/billing
|
||||
@@ -1619,7 +1619,7 @@ yunion.io/x/pkg/utils
|
||||
# yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
|
||||
## explicit; go 1.12
|
||||
yunion.io/x/s3cli
|
||||
# yunion.io/x/sqlchemy v1.1.2-0.20231017172907-561e7f013926
|
||||
# yunion.io/x/sqlchemy v1.1.2-0.20231201052514-97026b18ccf0
|
||||
## explicit; go 1.17
|
||||
yunion.io/x/sqlchemy
|
||||
yunion.io/x/sqlchemy/backends
|
||||
|
||||
1
vendor/yunion.io/x/cloudmux/pkg/multicloud/qcloud/certificate.go
generated
vendored
1
vendor/yunion.io/x/cloudmux/pkg/multicloud/qcloud/certificate.go
generated
vendored
@@ -288,6 +288,7 @@ func (self *SRegion) GetILoadBalancerCertificates() ([]cloudprovider.ICloudLoadb
|
||||
|
||||
icerts := make([]cloudprovider.ICloudLoadbalancerCertificate, len(certs))
|
||||
for i := range certs {
|
||||
certs[i].region = self
|
||||
icerts[i] = &certs[i]
|
||||
}
|
||||
|
||||
|
||||
5
vendor/yunion.io/x/cloudmux/pkg/multicloud/qcloud/instancenic.go
generated
vendored
5
vendor/yunion.io/x/cloudmux/pkg/multicloud/qcloud/instancenic.go
generated
vendored
@@ -16,6 +16,7 @@ package qcloud
|
||||
|
||||
import (
|
||||
"yunion.io/x/cloudmux/pkg/cloudprovider"
|
||||
"yunion.io/x/pkg/util/netutils"
|
||||
)
|
||||
|
||||
type SInstanceNic struct {
|
||||
@@ -38,6 +39,10 @@ func (self *SInstanceNic) GetIP() string {
|
||||
}
|
||||
|
||||
func (self *SInstanceNic) GetMAC() string {
|
||||
if len(self.macAddr) == 0 {
|
||||
ip, _ := netutils.NewIPV4Addr(self.GetIP())
|
||||
return ip.ToMac("00:16:")
|
||||
}
|
||||
return self.macAddr
|
||||
}
|
||||
|
||||
|
||||
9
vendor/yunion.io/x/cloudmux/pkg/multicloud/remotefile/instancenic.go
generated
vendored
9
vendor/yunion.io/x/cloudmux/pkg/multicloud/remotefile/instancenic.go
generated
vendored
@@ -14,7 +14,10 @@
|
||||
|
||||
package remotefile
|
||||
|
||||
import "yunion.io/x/cloudmux/pkg/cloudprovider"
|
||||
import (
|
||||
"yunion.io/x/cloudmux/pkg/cloudprovider"
|
||||
"yunion.io/x/pkg/util/netutils"
|
||||
)
|
||||
|
||||
type SInstanceNic struct {
|
||||
SResourceBase
|
||||
@@ -32,6 +35,10 @@ func (self *SInstanceNic) GetIP() string {
|
||||
}
|
||||
|
||||
func (self *SInstanceNic) GetMAC() string {
|
||||
if len(self.Mac) == 0 {
|
||||
ip, _ := netutils.NewIPV4Addr(self.GetIP())
|
||||
return ip.ToMac("00:16:")
|
||||
}
|
||||
return self.Mac
|
||||
}
|
||||
|
||||
|
||||
4
vendor/yunion.io/x/cloudmux/pkg/multicloud/zstack/disk.go
generated
vendored
4
vendor/yunion.io/x/cloudmux/pkg/multicloud/zstack/disk.go
generated
vendored
@@ -111,11 +111,9 @@ func (region *SRegion) GetDiskWithStorage(diskId string) (*SDisk, error) {
|
||||
}
|
||||
}
|
||||
return nil, cloudprovider.ErrNotFound
|
||||
case StorageTypeCeph:
|
||||
default:
|
||||
disk.storage = storage
|
||||
return disk, nil
|
||||
default:
|
||||
return nil, fmt.Errorf("Unsupport StorageType %s", storage.Type)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
9
vendor/yunion.io/x/cloudmux/pkg/multicloud/zstack/host.go
generated
vendored
9
vendor/yunion.io/x/cloudmux/pkg/multicloud/zstack/host.go
generated
vendored
@@ -107,9 +107,8 @@ func (host *SHost) GetIStorages() ([]cloudprovider.ICloudStorage, error) {
|
||||
return nil, err
|
||||
}
|
||||
istorages = append(istorages, localStorages...)
|
||||
case StorageTypeCeph:
|
||||
default:
|
||||
istorages = append(istorages, &storages[i])
|
||||
case StorageTypeVCenter:
|
||||
}
|
||||
}
|
||||
return istorages, nil
|
||||
@@ -337,7 +336,11 @@ func (region *SRegion) createDataDisks(disks []cloudprovider.SDiskInfo, hostId s
|
||||
return diskIds, err
|
||||
}
|
||||
default:
|
||||
return diskIds, fmt.Errorf("not support storageType %s", disks[i].StorageType)
|
||||
disk, err := region.CreateDisk(disks[i].Name, storage.UUID, "", "", disks[i].SizeGB, "")
|
||||
if err != nil {
|
||||
return diskIds, err
|
||||
}
|
||||
diskIds = append(diskIds, disk.UUID)
|
||||
}
|
||||
}
|
||||
return diskIds, nil
|
||||
|
||||
12
vendor/yunion.io/x/cloudmux/pkg/multicloud/zstack/storage.go
generated
vendored
12
vendor/yunion.io/x/cloudmux/pkg/multicloud/zstack/storage.go
generated
vendored
@@ -93,10 +93,9 @@ func (region *SRegion) getIStorages(zondId string) ([]cloudprovider.ICloudStorag
|
||||
return nil, err
|
||||
}
|
||||
istorage = append(istorage, ilocalStorages...)
|
||||
case StorageTypeCeph:
|
||||
default:
|
||||
primaryStorage.region = region
|
||||
istorage = append(istorage, &primaryStorage)
|
||||
case StorageTypeVCenter:
|
||||
}
|
||||
}
|
||||
return istorage, nil
|
||||
@@ -157,10 +156,6 @@ func (storage *SStorage) GetGlobalId() string {
|
||||
return storage.GetId()
|
||||
}
|
||||
|
||||
func (storage *SStorage) IsEmulated() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (storage *SStorage) GetIZone() cloudprovider.ICloudZone {
|
||||
zone, err := storage.region.GetZone(storage.ZoneUUID)
|
||||
if err != nil {
|
||||
@@ -205,11 +200,6 @@ func (storage *SStorage) GetStorageConf() jsonutils.JSONObject {
|
||||
return conf
|
||||
}
|
||||
|
||||
func (storage *SStorage) Refresh() error {
|
||||
// do nothing
|
||||
return nil
|
||||
}
|
||||
|
||||
func (storage *SStorage) GetEnabled() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
2
vendor/yunion.io/x/sqlchemy/backends/clickhouse/columninfo.go
generated
vendored
2
vendor/yunion.io/x/sqlchemy/backends/clickhouse/columninfo.go
generated
vendored
@@ -168,7 +168,7 @@ func findSegment(sqlStr string, prefix string) string {
|
||||
func trimPartition(partStr string) string {
|
||||
for {
|
||||
partStr = strings.TrimSpace(partStr)
|
||||
if partStr[0] == '(' {
|
||||
if len(partStr) > 0 && partStr[0] == '(' {
|
||||
partStr = partStr[1 : len(partStr)-1]
|
||||
} else {
|
||||
break
|
||||
|
||||
16
vendor/yunion.io/x/sqlchemy/reflect.go
generated
vendored
16
vendor/yunion.io/x/sqlchemy/reflect.go
generated
vendored
@@ -164,20 +164,11 @@ func setValueBySQLString(value reflect.Value, val string) error {
|
||||
if jsonV == jsonutils.JSONNull {
|
||||
return nil
|
||||
}
|
||||
jsonM, err := jsonV.GetMap()
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "jsonV.GetMap val %s json %s", val, jsonV)
|
||||
}
|
||||
mapValue := reflect.MakeMap(value.Type())
|
||||
value.Set(mapValue)
|
||||
for k, jsonV := range jsonM {
|
||||
elemValue := reflect.New(value.Type().Elem()).Elem()
|
||||
jsonStr, _ := jsonV.GetString()
|
||||
err := setValueBySQLString(elemValue, jsonStr)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "TestSetValueBySQLString %s", jsonV.String())
|
||||
}
|
||||
value.SetMapIndex(reflect.ValueOf(k), elemValue)
|
||||
err = jsonV.Unmarshal(mapValue.Interface())
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "jsonV.Unmarshal")
|
||||
}
|
||||
return nil
|
||||
default:
|
||||
@@ -208,7 +199,6 @@ func setValueBySQLString(value reflect.Value, val string) error {
|
||||
}
|
||||
value.Set(reflect.Indirect(newVal))
|
||||
return nil
|
||||
// return errors.Wrapf(ErrNotSupported, "not supported type: %s", valueType)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user