mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/yunionio/cloudpods.git
synced 2026-09-20 08:03:53 +08:00
Merge pull request #11906 from ioito/automated-cherry-pick-of-#11905-release-3.7
Automated cherry pick of #11905: fix(cloudevent): hcso event fix
This commit is contained in:
@@ -303,8 +303,9 @@ func (self *SCloudprovider) GetNextTimeRange() (time.Time, time.Time, error) {
|
||||
}
|
||||
|
||||
type SCloudproviderDelegate struct {
|
||||
Id string
|
||||
Name string
|
||||
Id string
|
||||
Name string
|
||||
CloudaccountId string
|
||||
|
||||
Enabled bool
|
||||
Status string
|
||||
@@ -336,6 +337,16 @@ func (self *SCloudprovider) GetDelegate() (*SCloudproviderDelegate, error) {
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "result.Unmarshal")
|
||||
}
|
||||
if provider.Provider == api.CLOUD_PROVIDER_APSARA || provider.Provider == api.CLOUD_PROVIDER_HUAWEI_CLOUD_STACK {
|
||||
result, err := modules.Cloudaccounts.Get(s, provider.CloudaccountId, nil)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "modules.Cloudaccounts.Get")
|
||||
}
|
||||
err = result.Unmarshal(&provider.Options, "options")
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "result.Unmarshal")
|
||||
}
|
||||
}
|
||||
return provider, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user