From b195bb98d18a00c15ab8e2f9ca8e496b0f6c4f37 Mon Sep 17 00:00:00 2001 From: Guillaume Raffy Date: Thu, 22 Sep 2011 08:59:23 +0000 Subject: [PATCH] managed to get the cluster web application to use the cluster controller to retreive the machines state --- SimpaDbUtil.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SimpaDbUtil.py b/SimpaDbUtil.py index 9363c47..867a4eb 100644 --- a/SimpaDbUtil.py +++ b/SimpaDbUtil.py @@ -32,7 +32,7 @@ def isMachineResponding(machineName): def machineNameToMacAddress( machineName ): - conn = MySQLdb.connect('simpatix10', 'root', '', 'simpadb') + conn = MySQLdb.connect('simpatix10', 'simpadb_reader', '', 'simpadb') assert(conn) sqlQuery = """SELECT mac_address FROM ethernet_cards WHERE machine_name='"""+machineName+"""' AND type='normal'""" #print sqlQuery @@ -50,7 +50,7 @@ def getLightOutManagementIpAddress( machineName ): """ the light out management ip of servers allows to talk to the server even when it's asleep """ - conn = MySQLdb.connect('simpatix10', 'root', '', 'simpadb') + conn = MySQLdb.connect('simpatix10', 'simpadb_reader', '', 'simpadb') assert(conn) sqlQuery = """SELECT ip_address_1,ip_address_2,ip_address_3,ip_address_4 FROM ethernet_cards WHERE machine_name='"""+machineName+"""' AND type='light_out_management'""" #print sqlQuery @@ -67,7 +67,7 @@ def getLightOutManagementIpAddress( machineName ): def getClusterMachinesNames(): clusterMachinesNames = [] - conn = MySQLdb.connect('simpatix10', 'root', '', 'simpadb') + conn = MySQLdb.connect('simpatix10', 'simpadb_reader', '', 'simpadb') assert(conn) sqlQuery = """SELECT name FROM machines WHERE affectation='cluster'""" #print sqlQuery