fix(region): vendor update (#23904)

This commit is contained in:
屈轩
2025-12-07 16:00:55 +08:00
committed by GitHub
parent 7a5a2c549a
commit 3a2ab9e73d
6 changed files with 61 additions and 21 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ require (
k8s.io/cri-api v0.28.15
k8s.io/klog/v2 v2.20.0
moul.io/http2curl/v2 v2.3.0
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251202110400-a578a051a26c
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251205085801-178d14a173e0
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
@@ -1661,8 +1661,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.20251202110400-a578a051a26c h1:51GtIg9t8r4B9U2W4VlgQx5hMhcaSVG3JgRfZspEphs=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251202110400-a578a051a26c/go.mod h1:aWRX5Phwz3nbHUNnIAm1oVogjguXPYDDgCOy/9Hnnvk=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251205085801-178d14a173e0 h1:qCGkj0FDYNdWVUlD2RXsp5FMPCfJjri6E6djUDItWz8=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251205085801-178d14a173e0/go.mod h1:aWRX5Phwz3nbHUNnIAm1oVogjguXPYDDgCOy/9Hnnvk=
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=
+12 -12
View File
@@ -94,20 +94,20 @@ func (self *SBaiduGuestDriver) GetInstanceCapability() cloudprovider.SInstanceCa
},
Storages: cloudprovider.Storage{
DataDisk: []cloudprovider.StorageInfo{
{StorageType: api.STORAGE_BAIDU_SSD, MaxSizeGb: 32765, MinSizeGb: 50, StepSizeGb: 1, Resizable: true},
{StorageType: api.STORAGE_BAIDU_PREMIUM_SSD, MaxSizeGb: 32765, MinSizeGb: 50, StepSizeGb: 1, Resizable: true},
{StorageType: api.STORAGE_BAIDU_HDD, MaxSizeGb: 32765, MinSizeGb: 5, StepSizeGb: 1, Resizable: true},
{StorageType: api.STORAGE_BAIDU_ENHANCED_SSD_PL1, MaxSizeGb: 32765, MinSizeGb: 50, StepSizeGb: 1, Resizable: true},
{StorageType: api.STORAGE_BAIDU_ENHANCED_SSD_PL2, MaxSizeGb: 32765, MinSizeGb: 50, StepSizeGb: 1, Resizable: true},
{StorageType: api.STORAGE_BAIDU_ENHANCED_SSD_PL3, MaxSizeGb: 32765, MinSizeGb: 50, StepSizeGb: 1, Resizable: true},
{StorageType: api.STORAGE_BAIDU_SSD, MaxSizeGb: 65536, MinSizeGb: 5, StepSizeGb: 1, Resizable: true},
{StorageType: api.STORAGE_BAIDU_PREMIUM_SSD, MaxSizeGb: 65536, MinSizeGb: 20, StepSizeGb: 1, Resizable: true},
{StorageType: api.STORAGE_BAIDU_HDD, MaxSizeGb: 65536, MinSizeGb: 5, StepSizeGb: 1, Resizable: true},
{StorageType: api.STORAGE_BAIDU_ENHANCED_SSD_PL1, MaxSizeGb: 65536, MinSizeGb: 5, StepSizeGb: 1, Resizable: true},
{StorageType: api.STORAGE_BAIDU_ENHANCED_SSD_PL2, MaxSizeGb: 65536, MinSizeGb: 461, StepSizeGb: 1, Resizable: true},
{StorageType: api.STORAGE_BAIDU_ENHANCED_SSD_PL3, MaxSizeGb: 65536, MinSizeGb: 1261, StepSizeGb: 1, Resizable: true},
},
SysDisk: []cloudprovider.StorageInfo{
{StorageType: api.STORAGE_BAIDU_SSD, MaxSizeGb: 32765, MinSizeGb: 50, StepSizeGb: 1, Resizable: true},
{StorageType: api.STORAGE_BAIDU_PREMIUM_SSD, MaxSizeGb: 32765, MinSizeGb: 20, StepSizeGb: 1, Resizable: true},
{StorageType: api.STORAGE_BAIDU_HDD, MaxSizeGb: 32765, MinSizeGb: 20, StepSizeGb: 1, Resizable: true},
{StorageType: api.STORAGE_BAIDU_ENHANCED_SSD_PL1, MaxSizeGb: 32765, MinSizeGb: 50, StepSizeGb: 1, Resizable: true},
{StorageType: api.STORAGE_BAIDU_ENHANCED_SSD_PL2, MaxSizeGb: 32765, MinSizeGb: 50, StepSizeGb: 1, Resizable: true},
{StorageType: api.STORAGE_BAIDU_ENHANCED_SSD_PL3, MaxSizeGb: 32765, MinSizeGb: 50, StepSizeGb: 1, Resizable: true},
{StorageType: api.STORAGE_BAIDU_SSD, MaxSizeGb: 20480, MinSizeGb: 10, StepSizeGb: 1, Resizable: true},
{StorageType: api.STORAGE_BAIDU_PREMIUM_SSD, MaxSizeGb: 20480, MinSizeGb: 10, StepSizeGb: 1, Resizable: true},
{StorageType: api.STORAGE_BAIDU_HDD, MaxSizeGb: 20480, MinSizeGb: 10, StepSizeGb: 1, Resizable: true},
{StorageType: api.STORAGE_BAIDU_ENHANCED_SSD_PL1, MaxSizeGb: 20480, MinSizeGb: 20, StepSizeGb: 1, Resizable: true},
{StorageType: api.STORAGE_BAIDU_ENHANCED_SSD_PL2, MaxSizeGb: 20480, MinSizeGb: 461, StepSizeGb: 1, Resizable: true},
{StorageType: api.STORAGE_BAIDU_ENHANCED_SSD_PL3, MaxSizeGb: 20480, MinSizeGb: 1261, StepSizeGb: 1, Resizable: true},
},
},
}
+1 -1
View File
@@ -2243,7 +2243,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.20251202110400-a578a051a26c
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20251205085801-178d14a173e0
## explicit; go 1.24
yunion.io/x/cloudmux/pkg/apis
yunion.io/x/cloudmux/pkg/apis/billing
+33 -5
View File
@@ -178,7 +178,13 @@ func (cli *SBaiduClient) bosList(regionId, bucketName, resource string, params u
return nil, err
}
_, ret, err := httputils.ParseJSONResponse("", resp, err, cli.debug)
return ret, err
if err != nil {
return nil, errors.Wrapf(err, "ParseJSONResponse")
}
if gotypes.IsNil(ret) {
return jsonutils.NewDict(), nil
}
return ret, nil
}
func (cli *SBaiduClient) bosDelete(regionId, bucketName, resource string, params url.Values) (jsonutils.JSONObject, error) {
@@ -187,7 +193,13 @@ func (cli *SBaiduClient) bosDelete(regionId, bucketName, resource string, params
return nil, err
}
_, ret, err := httputils.ParseJSONResponse("", resp, err, cli.debug)
return ret, err
if err != nil {
return nil, errors.Wrapf(err, "ParseJSONResponse")
}
if gotypes.IsNil(ret) {
return jsonutils.NewDict(), nil
}
return ret, nil
}
func (cli *SBaiduClient) bosUpdate(regionId, bucketName, resource string, params url.Values, body map[string]interface{}) (jsonutils.JSONObject, error) {
@@ -200,7 +212,13 @@ func (cli *SBaiduClient) bosUpdate(regionId, bucketName, resource string, params
return nil, err
}
_, ret, err := httputils.ParseJSONResponse("", resp, err, cli.debug)
return ret, err
if err != nil {
return nil, errors.Wrapf(err, "ParseJSONResponse")
}
if gotypes.IsNil(ret) {
return jsonutils.NewDict(), nil
}
return ret, nil
}
func (cli *SBaiduClient) bosRequest(method httputils.THttpMethod, regionId, bucketName, resource string, params url.Values, header http.Header, body io.Reader) (*http.Response, error) {
@@ -271,7 +289,13 @@ func (cli *SBaiduClient) request(method httputils.THttpMethod, service, regionId
return nil, err
}
_, ret, err := httputils.ParseJSONResponse("", resp, err, cli.debug)
return ret, err
if err != nil {
return nil, errors.Wrapf(err, "ParseJSONResponse")
}
if gotypes.IsNil(ret) {
return jsonutils.NewDict(), nil
}
return ret, nil
}
func (cli *SBaiduClient) raw_request(method httputils.THttpMethod, service, regionId, bucketName, resource string, params url.Values, header http.Header, body io.Reader) (*http.Response, error) {
@@ -302,7 +326,11 @@ func (cli *SBaiduClient) raw_request(method httputils.THttpMethod, service, regi
}
header.Set("Authorization", signature)
return httputils.Request(cli.getDefaultClient(), cli.ctx, method, uri, header, body, cli.debug)
resp, err := httputils.Request(cli.getDefaultClient(), cli.ctx, method, uri, header, body, cli.debug)
if err != nil {
return nil, err
}
return resp, nil
}
func (cli *SBaiduClient) GetSubAccounts() ([]cloudprovider.SSubAccount, error) {
+12
View File
@@ -28,6 +28,7 @@ import (
"yunion.io/x/cloudmux/pkg/multicloud"
"yunion.io/x/jsonutils"
"yunion.io/x/pkg/errors"
"yunion.io/x/pkg/gotypes"
"yunion.io/x/pkg/util/httputils"
)
@@ -103,6 +104,9 @@ func (b *SBucket) GetTags() (map[string]string, error) {
if err != nil {
return nil, errors.Wrap(err, "ParseJSONResponse")
}
if gotypes.IsNil(body) {
return nil, nil
}
ret := struct {
Tag []struct {
TagKey string `json:"tagKey"`
@@ -313,6 +317,9 @@ func (b *SBucket) NewMultipartUpload(ctx context.Context, key string, cannedAcl
if err != nil {
return "", errors.Wrapf(err, "ParseJSONResponse %s %s", b.Name, key)
}
if gotypes.IsNil(body) {
return "", errors.Errorf("empty response for NewMultipartUpload %s %s", b.Name, key)
}
return body.GetString("uploadId")
}
@@ -381,6 +388,11 @@ func (b *SBucket) CopyPart(ctx context.Context, key string, uploadId string, par
if err != nil {
return "", errors.Wrapf(err, "ParseJSONResponse %s %s %s", b.Name, key, uploadId)
}
if gotypes.IsNil(body) {
return "", errors.Errorf("empty response for CopyPart %s %s %s %s %d %d", b.Name, key, uploadId, srcBucket, srcOffset, srcLength)
}
return body.GetString("eTag")
}