Skip to content

Commit 58bad41

Browse files
karuturikishankavala
authored andcommitted
Fixed CLOUDSTACK-6983: unable to register lxc template
added a check for tar.gz format in checktemplate
1 parent 9dc322d commit 58bad41

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

utils/src/org/apache/cloudstack/utils/template/TemplateUtils.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ public static String checkTemplateFormat(String path, String url) {
6161
s_logger.debug("File at path " + path + " looks like ova : " + output);
6262
return "";
6363
}
64+
65+
//lxc
66+
if (output.contains("POSIX tar") && isCorrectExtension(url, "tar")) {
67+
s_logger.debug("File at path " + path + " looks like just tar : " + output);
68+
return "";
69+
}
70+
6471
if (output.contains("ISO 9660") && isCorrectExtension(url, "iso")) {
6572
s_logger.debug("File at path " + path + " looks like an iso : " + output);
6673
return "";

0 commit comments

Comments
 (0)