Merge pull request #2819 from ioito/bugfix/qx-vmware-data-disk-sort

fix: 避免数据盘顺序也被颠倒
This commit is contained in:
yunion-ci-robot
2019-09-09 23:30:21 +08:00
committed by GitHub
+1 -1
View File
@@ -60,7 +60,7 @@ type byDiskType []SVirtualDisk
func (d byDiskType) Len() int { return len(d) }
func (d byDiskType) Swap(i, j int) { d[i], d[j] = d[j], d[i] }
func (d byDiskType) Less(i, j int) bool {
if d[i].GetDiskType() == api.DISK_TYPE_SYS || d[j].GetDiskType() == api.DISK_TYPE_DATA {
if d[i].GetDiskType() == api.DISK_TYPE_SYS {
return true
}
return false