mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(region): check whether the disks of the instance snapshot is empty when creating vm
This commit is contained in:
@@ -1101,7 +1101,11 @@ func parseInstanceSnapshot(input *api.ServerCreateInput) (*api.ServerCreateInput
|
||||
if isp.Status != api.INSTANCE_SNAPSHOT_READY {
|
||||
return nil, httperrors.NewBadRequestError("Instance snapshot not ready")
|
||||
}
|
||||
return isp.ToInstanceCreateInput(input)
|
||||
input, err = isp.ToInstanceCreateInput(input)
|
||||
if len(input.Disks) == 0 {
|
||||
return nil, httperrors.NewInputParameterError("there are no disks in this instance snapshot, try another one")
|
||||
}
|
||||
return input, nil
|
||||
}
|
||||
|
||||
func (manager *SGuestManager) validateCreateData(
|
||||
|
||||
Reference in New Issue
Block a user