resizeVolume: Volume can be in ready state or allocated state to resize

This commit is contained in:
Marcus Sorensen 2014-03-03 17:44:30 -07:00
parent 23c113bff6
commit 974fc4e671
1 changed files with 1 additions and 1 deletions

View File

@ -705,7 +705,7 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
throw new InvalidParameterValueException("Cloudstack currently only supports volumes marked as KVM, VMware, XenServer hypervisor for resize");
}
if (volume.getState() != Volume.State.Ready || volume.getState() != Volume.State.Allocated) {
if (volume.getState() != Volume.State.Ready && volume.getState() != Volume.State.Allocated) {
throw new InvalidParameterValueException("Volume should be in ready or allocated state before attempting a resize");
}