CLOUDSTACK-10019: template.properties has hardcoded id (#2243)

The template.properties file created after creating template from snapshot has hardcoded id = 1.
The id should have template ID.
This commit is contained in:
mrunalinikankariya 2017-09-14 17:54:12 +05:30 committed by Rohit Yadav
parent d84585fa6e
commit c7a55eb812

View File

@ -463,7 +463,7 @@ public class NfsSecondaryStorageResource extends ServerResourceBase implements S
FormatInfo info = processor.process(destPath, null, templateUuid);
TemplateLocation loc = new TemplateLocation(_storage, destPath);
loc.create(1, true, templateUuid);
loc.create(destData.getId(), true, templateUuid);
loc.addFormat(info);
loc.save();
TemplateProp prop = loc.getTemplateInfo();
@ -553,7 +553,7 @@ public class NfsSecondaryStorageResource extends ServerResourceBase implements S
FormatInfo info = processor.process(destPath, null, templateName);
TemplateLocation loc = new TemplateLocation(_storage, destPath);
loc.create(1, true, destData.getName());
loc.create(destData.getId(), true, destData.getName());
loc.addFormat(info);
loc.save();