mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: esxi server skus return empty results
This commit is contained in:
@@ -160,7 +160,7 @@ func (self *SCloudproviderregion) Detach(ctx context.Context, userCred mcclient.
|
||||
func (manager *SCloudproviderregionManager) QueryRelatedRegionIds(cloudAccountId string, providerIds ...string) *sqlchemy.SSubQuery {
|
||||
q := manager.Query("cloudregion_id")
|
||||
|
||||
if len(providerIds) > 0 {
|
||||
if len(providerIds) > 0 {
|
||||
q = q.Filter(sqlchemy.In(q.Field("cloudprovider_id"), providerIds))
|
||||
}
|
||||
|
||||
|
||||
@@ -514,7 +514,7 @@ func providerFilter(q *sqlchemy.SQuery, provider string, public_cloud bool) *sql
|
||||
if provider == "all" {
|
||||
// provider 参数为all时。表示查询所有instance type.
|
||||
return q
|
||||
} else if len(provider) > 0 && !utils.IsInStringArray(provider, []string{api.CLOUD_PROVIDER_ONECLOUD, api.CLOUD_PROVIDER_VMWARE, "kvm"}) {
|
||||
} else if len(provider) > 0 && !utils.IsInStringArray(provider, []string{api.CLOUD_PROVIDER_ONECLOUD, api.CLOUD_PROVIDER_VMWARE, "kvm", "esxi"}) {
|
||||
q = q.Equals("provider", provider)
|
||||
} else if public_cloud {
|
||||
q = q.IsNotEmpty("provider")
|
||||
|
||||
Reference in New Issue
Block a user