mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
guest short desc add backup host id
This commit is contained in:
@@ -4240,6 +4240,14 @@ func (self *SGuest) GetShortDesc(ctx context.Context) *jsonutils.JSONDict {
|
||||
billingInfo.SCloudProviderInfo = host.getCloudProviderInfo()
|
||||
}
|
||||
|
||||
if len(self.BackupHostId) > 0 {
|
||||
backupHost := HostManager.FetchHostById(self.BackupHostId)
|
||||
if backupHost != nil {
|
||||
desc.Set("backup_host", jsonutils.NewString(backupHost.Name))
|
||||
desc.Set("backup_host_id", jsonutils.NewString(backupHost.Id))
|
||||
}
|
||||
}
|
||||
|
||||
if priceKey := self.GetMetadata("ext:price_key", nil); len(priceKey) > 0 {
|
||||
billingInfo.PriceKey = priceKey
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user