mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #16032 from ioito/hotfix/qx-vm-bill-type-sync
fix(region): vm bill type sync
This commit is contained in:
@@ -2905,23 +2905,13 @@ func (self *SGuest) syncWithCloudVM(ctx context.Context, userCred mcclient.Token
|
||||
|
||||
self.IsEmulated = extVM.IsEmulated()
|
||||
|
||||
if provider.GetFactory().IsSupportPrepaidResources() && !recycle &&
|
||||
!extVM.GetExpiredAt().IsZero() {
|
||||
|
||||
if provider.GetFactory().IsSupportPrepaidResources() && !recycle {
|
||||
self.BillingType = extVM.GetBillingType()
|
||||
self.ExpiredAt = extVM.GetExpiredAt()
|
||||
if self.GetDriver().IsSupportSetAutoRenew() {
|
||||
self.AutoRenew = extVM.IsAutoRenew()
|
||||
}
|
||||
}
|
||||
|
||||
// no need to sync CreatedAt
|
||||
// if !recycle {
|
||||
// if createdAt := extVM.GetCreatedAt(); !createdAt.IsZero() {
|
||||
// self.CreatedAt = createdAt
|
||||
// }
|
||||
// }
|
||||
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user