@Override
public Answer Delete(DeleteCommand cmd) {
TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.SIMULATOR_DB);
try {
txn.start();
MockVolumeVO template = _mockVolumeDao.findByStoragePathAndType(cmd.getData().getPath());
if (template == null) {
return new Answer(cmd, false, "can't find object to delete:" + cmd.getData().getPath());
}
_mockVolumeDao.remove(template.getId());
txn.commit();
} catch (Exception ex) {
txn.rollback();
throw new CloudRuntimeException("Error when deleting object");
} finally {