mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: private cloud sku attached disk count
This commit is contained in:
@@ -1093,6 +1093,7 @@ func (self *SServerSku) SyncWithPrivateCloudSku(ctx context.Context, userCred mc
|
||||
}
|
||||
|
||||
func (self *SServerSku) constructSku(extSku cloudprovider.ICloudSku) {
|
||||
self.ExternalId = extSku.GetGlobalId()
|
||||
self.InstanceTypeFamily = extSku.GetInstanceTypeFamily()
|
||||
self.InstanceTypeCategory = extSku.GetInstanceTypeCategory()
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ func (self *SInstanceType) GetAttachedDiskSizeGB() int {
|
||||
}
|
||||
|
||||
func (self *SInstanceType) GetAttachedDiskCount() int {
|
||||
return 6
|
||||
return 0
|
||||
}
|
||||
|
||||
func (self *SInstanceType) GetDataDiskTypes() string {
|
||||
|
||||
@@ -192,11 +192,11 @@ func (flavor *SFlavor) GetGlobalId() string {
|
||||
}
|
||||
|
||||
func (flavor *SFlavor) GetInstanceTypeFamily() string {
|
||||
return flavor.GetName()
|
||||
return api.InstanceFamilies[api.SkuCategoryGeneralPurpose]
|
||||
}
|
||||
|
||||
func (flavor *SFlavor) GetInstanceTypeCategory() string {
|
||||
return flavor.GetName()
|
||||
return api.SkuCategoryGeneralPurpose
|
||||
}
|
||||
|
||||
func (flavor *SFlavor) GetPrepaidStatus() string {
|
||||
@@ -244,7 +244,7 @@ func (flavor *SFlavor) GetAttachedDiskSizeGB() int {
|
||||
}
|
||||
|
||||
func (flavor *SFlavor) GetAttachedDiskCount() int {
|
||||
return 6
|
||||
return 0
|
||||
}
|
||||
|
||||
func (flavor *SFlavor) GetDataDiskTypes() string {
|
||||
|
||||
@@ -154,11 +154,11 @@ func (region *SRegion) DeleteOffering(offeringId string) error {
|
||||
}
|
||||
|
||||
func (offering *SInstanceOffering) GetInstanceTypeFamily() string {
|
||||
return offering.AllocatorStrategy
|
||||
return api.InstanceFamilies[api.SkuCategoryGeneralPurpose]
|
||||
}
|
||||
|
||||
func (offering *SInstanceOffering) GetInstanceTypeCategory() string {
|
||||
return offering.AllocatorStrategy
|
||||
return api.SkuCategoryGeneralPurpose
|
||||
}
|
||||
|
||||
func (offering *SInstanceOffering) GetPrepaidStatus() string {
|
||||
@@ -206,7 +206,7 @@ func (offering *SInstanceOffering) GetAttachedDiskSizeGB() int {
|
||||
}
|
||||
|
||||
func (offering *SInstanceOffering) GetAttachedDiskCount() int {
|
||||
return 6
|
||||
return 0
|
||||
}
|
||||
|
||||
func (offering *SInstanceOffering) GetDataDiskTypes() string {
|
||||
@@ -214,7 +214,7 @@ func (offering *SInstanceOffering) GetDataDiskTypes() string {
|
||||
}
|
||||
|
||||
func (offering *SInstanceOffering) GetDataDiskMaxCount() int {
|
||||
return 6
|
||||
return 0
|
||||
}
|
||||
|
||||
func (offering *SInstanceOffering) GetNicType() string {
|
||||
|
||||
Reference in New Issue
Block a user