[annuaire] On passe sur ula base de données PgSQL
darcs-hash:20100831065041-ffbb2-c44e28237d99ba472e0465ad88f1cd7149e3081d.gz
This commit is contained in:
parent
337905013d
commit
a1427076b5
15 changed files with 32 additions and 35 deletions
|
@ -18,7 +18,7 @@ from sys import path
|
|||
|
||||
path.append('/usr/scripts/gestion')
|
||||
|
||||
from annuaires import chbre_prises
|
||||
from annuaires_pg import chbre_prises, bat_switchs
|
||||
from affich_tools import *
|
||||
from ldap_crans import crans_ldap
|
||||
from ldap_crans import MachineCrans, MachineWifi, BorneWifi
|
||||
|
@ -61,7 +61,7 @@ def scan_bats(bats, annuaire=chbre_prises, verbose=False):
|
|||
# On Commence par itérer sur chaque batiment :
|
||||
for bat in bats:
|
||||
prises = dict()
|
||||
for chbre, prise in annuaire[bat].iteritems():
|
||||
for chbre, prise in annuaire(bat).iteritems():
|
||||
prises[prise] = chbre
|
||||
|
||||
current_switch = -1
|
||||
|
@ -232,7 +232,7 @@ if __name__ == "__main__":
|
|||
|
||||
if bats == 'all':
|
||||
# On récupère tous les bâtiments contenus dans l'annuaire :
|
||||
lbats = chbre_prises.keys()
|
||||
lbats = bat_switchs
|
||||
else:
|
||||
# On génère une liste avec les bâtiments pour être propre
|
||||
lbats = [bat for bat in bats]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue