Hello mooli tayer,

I'd like you to do a code review.  Please visit

    http://gerrit.ovirt.org/24699

to review the following change.

Change subject: tools: notifier: remove smtp host validation on notifier startup
......................................................................

tools: notifier: remove smtp host validation on notifier startup

A daemon running non interactively should start always
and log failures during runtime.

Change-Id: Ie1385c910824a66567540dff4b76e80d8a1298a5
Signed-off-by: Mooli Tayer <[email protected]>
---
M 
backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/NotificationProperties.java
1 file changed, 0 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/99/24699/1

diff --git 
a/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/NotificationProperties.java
 
b/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/NotificationProperties.java
index 80f41dc..fd28441 100644
--- 
a/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/NotificationProperties.java
+++ 
b/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/NotificationProperties.java
@@ -1,6 +1,5 @@
 package org.ovirt.engine.core.notifier.utils;
 
-import java.net.InetAddress;
 import javax.mail.internet.InternetAddress;
 
 import org.apache.commons.lang.StringUtils;
@@ -122,9 +121,6 @@
         validateCommon();
 
         validateSmtp();
-        if (isConfigured(MAIL_SERVER)) {
-            validateSmtpAvailability();
-        }
     }
 
     private void validateCommon() {
@@ -212,24 +208,6 @@
 
     public boolean isConfigured(String property) {
         return !StringUtils.isEmpty(getProperty(property, true));
-    }
-
-    // Availability
-    private void validateSmtpAvailability() {
-        // try to resolve MAIL_SERVER host
-        validateHost(MAIL_SERVER, getProperty(MAIL_SERVER));
-    }
-
-    private void validateHost(String propName, String propVal) {
-        try {
-            InetAddress.getAllByName(propVal);
-        } catch (Exception ex) {
-            throw new IllegalArgumentException(
-                    String.format(
-                            GENERIC_MESSAGE + "cannot verify '%s' value",
-                            propName),
-                    ex);
-        }
     }
 
     private void requireAll(String... mandatoryProperties) {


-- 
To view, visit http://gerrit.ovirt.org/24699
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1385c910824a66567540dff4b76e80d8a1298a5
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: mooli tayer <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to