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