Juan Hernandez has uploaded a new change for review.

Change subject: packaging: Check ENGINE_PROXY_ENABLED correctly
......................................................................

packaging: Check ENGINE_PROXY_ENABLED correctly

Currently the setup only checks if this configuration is present, but it
should check if it is present and if it is value is true.

Change-Id: I7e7819b51ef8f6a91bc3c1c4e7389c034bc6567b
Signed-off-by: Juan Hernandez <[email protected]>
---
M packaging/ovirt-engine-dwh-setup.py
1 file changed, 8 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-dwh refs/changes/54/7454/1

diff --git a/packaging/ovirt-engine-dwh-setup.py 
b/packaging/ovirt-engine-dwh-setup.py
index 048288d..53c30ef 100755
--- a/packaging/ovirt-engine-dwh-setup.py
+++ b/packaging/ovirt-engine-dwh-setup.py
@@ -117,7 +117,7 @@
     logging.debug("Setting DB pass")
     logging.debug("editing etl db connectivity file")
 
-    (fqdn, port) = getHostParams()
+    (protocol, fqdn, port) = getHostParams()
 
     file_handler = utils.TextConfigFileHandler(FILE_DB_CONN)
     file_handler.open()
@@ -129,14 +129,17 @@
                            
"jdbc\:postgresql\://%s\:%s/engine?stringtype\=unspecified" % (db_dict["host"], 
db_dict["port"]))
     file_handler.editParam("ovirtEngineHistoryDbJdbcConnection",
                            
"jdbc\:postgresql\://%s\:%s/ovirt_engine_history?stringtype\=unspecified" % 
(db_dict["host"], db_dict["port"]))
+    file_handler.editParam("ovirtEnginePortalConnectionProtocol", protocol)
+    file_handler.editParam("ovirtEnginePortalAddress", fqdn)
     file_handler.editParam("ovirtEnginePortalPort", port)
     file_handler.close()
 
 def getHostParams(secure=True):
     """
-    get hostname & secured port from /etc/sysconfig/ovirt-engine
+    get protocol, hostname & secured port from /etc/sysconfig/ovirt-engine
     """
 
+    protocol = "https" if secure else "http"
     hostFqdn = None
     port = None
 
@@ -146,7 +149,8 @@
     logging.debug("reading %s", FILE_WEB_CONF)
     file_handler = utils.TextConfigFileHandler(FILE_WEB_CONF)
     file_handler.open()
-    if file_handler.getParam("ENGINE_PROXY_ENABLED"):
+    proxyEnabled = file_handler.getParam("ENGINE_PROXY_ENABLED")
+    if proxyEnabled != None and proxyEnabled.lower() in ["true", "t", "yes", 
"y", "1"]:
         if secure:
             port = file_handler.getParam("ENGINE_PROXY_HTTPS_PORT")
         else:
@@ -172,7 +176,7 @@
         logging.error("Could not find the web port from %s", FILE_WEB_CONF)
         raise Exception("Cannot find the web port from configuration, please 
verify that ovirt-engine is configured")
 
-    return (hostFqdn, port)
+    return (protocol, hostFqdn, port)
 
 def isVersionSupported(rawMinimalVersion, rawCurrentVersion):
     """


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e7819b51ef8f6a91bc3c1c4e7389c034bc6567b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-dwh
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to