Alon Bar-Lev has uploaded a new change for review.

Change subject: packaging: cleanup: remove unused isDBUp, execSqlCommand
......................................................................

packaging: cleanup: remove unused isDBUp, execSqlCommand

Change-Id: I8276e7a22c1d6e486d16ef9ae516cc5632c9d0d6
Signed-off-by: Alon Bar-Lev <[email protected]>
---
M packaging/fedora/setup/common_utils.py
M packaging/fedora/setup/engine-upgrade.py
2 files changed, 0 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/08/8108/1

diff --git a/packaging/fedora/setup/common_utils.py 
b/packaging/fedora/setup/common_utils.py
index a9be291..30f25b4 100755
--- a/packaging/fedora/setup/common_utils.py
+++ b/packaging/fedora/setup/common_utils.py
@@ -339,17 +339,6 @@
         raise Exception(msg)
     return ("".join(output.splitlines(True)), proc.returncode)
 
-def execSqlCommand(userName, dbName, sqlQuery, failOnError=False, 
errMsg=output_messages.ERR_SQL_CODE):
-    logging.debug("running sql query \'%s\' on db." % sqlQuery)
-    env = { "PGPASSFILE" : basedefs.DB_PASS_FILE }
-    cmd = [
-        basedefs.EXEC_PSQL,
-        "-U", userName,
-        "-d", dbName,
-        "-c", sqlQuery,
-    ]
-    return execCmd(cmdList=cmd, failOnError=failOnError, msg=errMsg, 
envDict=env)
-
 #TODO: refactor this and previous functions into same execution.
 def execRemoteSqlCommand(userName, dbHost, dbPort, dbName, sqlQuery, 
failOnError=False, errMsg=output_messages.ERR_SQL_CODE):
     env = { "PGPASSFILE" : basedefs.DB_PASS_FILE }
diff --git a/packaging/fedora/setup/engine-upgrade.py 
b/packaging/fedora/setup/engine-upgrade.py
index 1b7504b..68b8bb0 100755
--- a/packaging/fedora/setup/engine-upgrade.py
+++ b/packaging/fedora/setup/engine-upgrade.py
@@ -215,13 +215,6 @@
         print MSG_ERROR_USER_NOT_ROOT%(username)
         sys.exit(1)
 
-def isDBUp():
-    """
-    check if ovirt-engine db is up
-    """
-    logging.debug("checking if %s db is already installed and 
running.."%basedefs.DB_NAME)
-    (out, rc) = utils.execSqlCommand(basedefs.DB_ADMIN, basedefs.DB_NAME, 
"select 1", True)
-
 class MYum():
     def __init__(self):
         self.updated = False


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

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

Reply via email to