Automatic merge from release/2.6.0 -> release/2.7.0

* commit 'a294f7b42d67342a7e7b9787b616892d65bf95dd':
  minor fix
This commit is contained in:
邱剑
2019-02-22 17:54:31 +08:00
+5 -5
View File
@@ -1332,6 +1332,11 @@ func (self *SGuest) moreExtraInfo(extra *jsonutils.JSONDict) *jsonutils.JSONDict
extra.Add(self.getDisksInfoDetails(), "disks_info")
extra.Add(jsonutils.NewString(self.getIsolatedDeviceDetails()), "isolated_devices")
if len(self.BackupHostId) > 0 {
backupHost := HostManager.FetchHostById(self.BackupHostId)
extra.Set("backup_host_name", jsonutils.NewString(backupHost.Name))
}
host := self.GetHost()
if host != nil {
info := host.getCloudProviderInfo()
@@ -1400,11 +1405,6 @@ func (self *SGuest) GetExtraDetails(ctx context.Context, userCred mcclient.Token
}
extra.Add(isGpu, "is_gpu")
if len(self.BackupHostId) > 0 {
backupHost := HostManager.FetchHostById(self.BackupHostId)
extra.Set("backup_host_name", jsonutils.NewString(backupHost.Name))
}
if self.IsPrepaidRecycle() {
extra.Add(jsonutils.JSONTrue, "is_prepaid_recycle")
} else {