Merge pull request #315 in YUNIONIO/onecloud from ~QUXUAN/onecloud:hotfix/qx-azure-meter to release/2.2.0

* commit '0a5ca41d3d8e0166521fe307e0f4c38d27231aa6':
  Azure 计费依赖操作系统类型
This commit is contained in:
邱剑
2018-10-18 17:58:26 +08:00
+4
View File
@@ -3754,6 +3754,10 @@ func (self *SGuest) GetShortDesc() *jsonutils.JSONDict {
desc.Set("int_bandwidth", jsonutils.NewInt(int64(intBw)))
}
if len(self.OsType) > 0 {
desc.Add(jsonutils.NewString(self.OsType), "os_type")
}
if priceKey := self.GetMetadata("price_key", nil); len(priceKey) > 0 {
desc.Add(jsonutils.NewString(priceKey), "price_key")
}