CLOUDSTACK-5454: Delete previous template and snapshot after migrating

NFS to S3 throws Error.
This commit is contained in:
Min Chen 2013-12-11 16:54:11 -08:00
parent 26c1ba296c
commit 5dccaa1832

View File

@ -1666,6 +1666,10 @@ public class NfsSecondaryStorageResource extends ServerResourceBase implements S
protected Answer execute(final DeleteCommand cmd) {
DataTO obj = cmd.getData();
DataObjectType objType = obj.getObjectType();
if (obj.getPath() == null) {
// account for those fake entries for NFS migration to object store
return new Answer(cmd, true, "Object with null install path does not exist on image store , no need to delete");
}
switch (objType) {
case TEMPLATE:
return deleteTemplate(cmd);