[annuaire] On passe sur ula base de données PgSQL

darcs-hash:20100831065041-ffbb2-c44e28237d99ba472e0465ad88f1cd7149e3081d.gz
This commit is contained in:
Nicolas Dandrimont 2010-08-31 08:50:41 +02:00
parent 337905013d
commit a1427076b5
15 changed files with 32 additions and 35 deletions

View file

@ -10,7 +10,7 @@ Frédéric Pauget, Nicolas Salles, Etienne Chové
import sys, os
sys.path.append('/usr/scripts/gestion')
from hptools import hpswitch
from annuaires import all_switchs, uplink_prises
from annuaires_pg import all_switchs, uplink_prises
####################################################################
## Définition des chaines à audimater

View file

@ -98,7 +98,7 @@ for net in config.NETs:
hosts_plugins["munin"]["stats-ip_%s" % net] = "stats-ip_"
# Stats de peuplement des bâtiments
for bat in annuaires.chbre_prises:
for bat in annuaires.bat_switchs:
if bat not in ('v',):
hosts_plugins["munin"]["stats-batiment_%s" % bat] = "stats-batiment_"

View file

@ -7,7 +7,7 @@
import sys,os,string
sys.path.append('/usr/scripts/gestion')
from annuaires import reverse, chbre_prises, bat_switchs, all_switchs, uplink_prises
from annuaires_pg import reverse, chbre_prises, bat_switchs, all_switchs, uplink_prises
from hptools import hpswitch
from ldap_crans import crans_ldap
@ -127,6 +127,6 @@ else :
if BAT in BAT_CHBRES.keys() :
print "chbres.value %d" % BAT_CHBRES[BAT]
print "connues.value %d" % len(chbre_prises[BAT].keys())
print "connues.value %d" % len(chbre_prises(BAT).keys())
else :
print "chbres.value %d" % len(chbre_prises[BAT].keys())
print "chbres.value %d" % len(chbre_prises(BAT).keys())