CLOUDSTACK-7328:[Automation] Register ISO failing with invalid iso

format error.
This commit is contained in:
Min Chen 2014-08-12 14:53:16 -07:00
parent cf8a00cbfd
commit a22abeb0e7

View File

@ -337,7 +337,8 @@ public class UriUtils {
&& !uripath.toLowerCase().endsWith("vmdk.bz2")
&& !uripath.toLowerCase().endsWith("vmdk.gz")))
|| (format.equalsIgnoreCase("iso")
&& (!uripath.toLowerCase().endsWith("iso.zip")
&& (!uripath.toLowerCase().endsWith("iso")
&& !uripath.toLowerCase().endsWith("iso.zip")
&& !uripath.toLowerCase().endsWith("iso.bz2")
&& !uripath.toLowerCase().endsWith("iso.gz")))) {
throw new IllegalArgumentException("Please specify a valid URL. URL:" + uripath + " is an invalid for the format " + format.toLowerCase());