mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
Fixed simulator and vmware NPE issue.
This commit is contained in:
parent
602fafd0a1
commit
3d411dc616
@ -70,6 +70,7 @@ public class SimulatorStorageProcessor implements StorageProcessor {
|
|||||||
public Answer copyTemplateToPrimaryStorage(CopyCommand cmd) {
|
public Answer copyTemplateToPrimaryStorage(CopyCommand cmd) {
|
||||||
TemplateObjectTO template = new TemplateObjectTO();
|
TemplateObjectTO template = new TemplateObjectTO();
|
||||||
template.setPath(UUID.randomUUID().toString());
|
template.setPath(UUID.randomUUID().toString());
|
||||||
|
template.setSize(new Long(100));
|
||||||
template.setFormat(Storage.ImageFormat.RAW);
|
template.setFormat(Storage.ImageFormat.RAW);
|
||||||
return new CopyCmdAnswer(template);
|
return new CopyCmdAnswer(template);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -345,6 +345,7 @@ public class VmwareStorageProcessor implements StorageProcessor {
|
|||||||
else {
|
else {
|
||||||
newTemplate.setPath(templateUuidName);
|
newTemplate.setPath(templateUuidName);
|
||||||
}
|
}
|
||||||
|
newTemplate.setSize(new Long(0)); // TODO: replace 0 with correct template physical_size.
|
||||||
|
|
||||||
return new CopyCmdAnswer(newTemplate);
|
return new CopyCmdAnswer(newTemplate);
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user