Fixed CLOUDSTACK-6983: unable to register lxc template

added a check for tar.gz format in checktemplate
This commit is contained in:
Rajani Karuturi 2014-07-17 11:44:26 +05:30 committed by Kishan Kavala
parent 9dc322d46f
commit 58bad41910
1 changed files with 7 additions and 0 deletions

View File

@ -61,6 +61,13 @@ public class TemplateUtils {
s_logger.debug("File at path " + path + " looks like ova : " + output);
return "";
}
//lxc
if (output.contains("POSIX tar") && isCorrectExtension(url, "tar")) {
s_logger.debug("File at path " + path + " looks like just tar : " + output);
return "";
}
if (output.contains("ISO 9660") && isCorrectExtension(url, "iso")) {
s_logger.debug("File at path " + path + " looks like an iso : " + output);
return "";