Automatic merge from release/2.3.0 -> release/2.4.0

* commit '39902718f2f258b34727b15399e42522b0da1dac':
  腾讯云不允许扩容系统盘
This commit is contained in:
邱剑
2018-12-05 17:52:49 +08:00
+3
View File
@@ -74,6 +74,9 @@ func (self *SQcloudGuestDriver) ValidateResizeDisk(guest *models.SGuest, disk *m
if !utils.IsInStringArray(guest.Status, []string{models.VM_READY, models.VM_RUNNING}) {
return fmt.Errorf("Cannot resize disk when guest in status %s", guest.Status)
}
if disk.DiskType == models.DISK_TYPE_SYS {
return fmt.Errorf("Cannot resize system disk")
}
if utils.IsInStringArray(storage.StorageType, []string{models.STORAGE_LOCAL_BASIC, models.STORAGE_LOCAL_SSD}) {
return fmt.Errorf("Cannot resize %s disk", storage.StorageType)
}