if (tmpltSwiftRef == null) {
msg = "Delete Template failed due to cannot find Template" + cmd.getId() + " in Swift ";
s_logger.warn(msg);
throw new CloudRuntimeException(msg);
}
Answer answer = _agentMgr.sendToSSVM(null, new DeleteObjectFromSwiftCommand(swift, "T-" + cmd.getId(), null));
if (answer == null || !answer.getResult()) {
msg = "Failed to delete " + tmpltSwiftRef + " due to " + ((answer == null) ? "answer is null" : answer.getDetails());
s_logger.warn(msg);
throw new CloudRuntimeException(msg);
} else {