Fixed simulator and vmware NPE issue.

This commit is contained in:
Sanjay Tripathi 2015-03-13 14:46:39 +05:30
parent 602fafd0a1
commit 3d411dc616
2 changed files with 2 additions and 0 deletions

View File

@ -70,6 +70,7 @@ public class SimulatorStorageProcessor implements StorageProcessor {
public Answer copyTemplateToPrimaryStorage(CopyCommand cmd) {
TemplateObjectTO template = new TemplateObjectTO();
template.setPath(UUID.randomUUID().toString());
template.setSize(new Long(100));
template.setFormat(Storage.ImageFormat.RAW);
return new CopyCmdAnswer(template);
}

View File

@ -345,6 +345,7 @@ public class VmwareStorageProcessor implements StorageProcessor {
else {
newTemplate.setPath(templateUuidName);
}
newTemplate.setSize(new Long(0)); // TODO: replace 0 with correct template physical_size.
return new CopyCmdAnswer(newTemplate);
} catch (Throwable e) {