mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
Automatic merge from release/2.6.0 -> release/2.7.0
* commit '4f6ac33f4cbb37447ab77274aa97e614d5e38149': server disk list add storage type
This commit is contained in:
@@ -84,6 +84,9 @@ func (joint *SGuestdisk) Slave() db.IStandaloneModel {
|
||||
|
||||
func (self *SGuestdisk) getExtraInfo(extra *jsonutils.JSONDict) *jsonutils.JSONDict {
|
||||
disk := self.GetDisk()
|
||||
if storage := disk.GetStorage(); storage != nil {
|
||||
extra.Add(jsonutils.NewString(storage.StorageType), "storage_type")
|
||||
}
|
||||
extra.Add(jsonutils.NewInt(int64(disk.DiskSize)), "disk_size")
|
||||
extra.Add(jsonutils.NewString(disk.Status), "status")
|
||||
extra.Add(jsonutils.NewString(disk.DiskType), "disk_type")
|
||||
|
||||
@@ -10,7 +10,7 @@ func init() {
|
||||
"guestdisks",
|
||||
[]string{"Guest_ID", "Guest",
|
||||
"Disk_ID", "Disk", "Disk_size",
|
||||
"Driver", "Cache_mode", "Index", "Status", "Disk_type"},
|
||||
"Driver", "Cache_mode", "Index", "Status", "Disk_type", "Storage_type"},
|
||||
[]string{},
|
||||
&Servers,
|
||||
&Disks)
|
||||
|
||||
Reference in New Issue
Block a user