Recherche possible sur prise meme si pas dans l'annuaire.
Indique le numero de prise meme sur les machines sans snmp. darcs-hash:20051007145024-41617-edca216ef609d0f26502645179a1bb4e726e1f7b.gz
This commit is contained in:
parent
7ae4b258ab
commit
991c627d35
1 changed files with 17 additions and 16 deletions
|
@ -750,7 +750,7 @@ def prise_etat(chbre) :
|
|||
f+= u', activée, lien non détecté'
|
||||
except ConversationError:
|
||||
# Switch non manageable ou down
|
||||
f = u'info prise non dispo : erreur de communication'
|
||||
f += u', erreur de communication avec le switch'
|
||||
except :
|
||||
f = u'info prise non dispo : erreur prog'
|
||||
|
||||
|
@ -878,20 +878,21 @@ def __recherche() :
|
|||
try:
|
||||
from annuaires import reverse
|
||||
chbre = reverse(prise[0].lower())[prise[1:]]
|
||||
except :
|
||||
except KeyError:
|
||||
try:
|
||||
chbre = reverse(prise[0].lower())[prise[1:]+'-']
|
||||
except :
|
||||
print u"Prise inconnue."
|
||||
return
|
||||
if len(chbre) != 1 :
|
||||
print u"Prise correspondante à plusieurs prises %s " % ' '.join(chbre)
|
||||
return
|
||||
except KeyError:
|
||||
chbre=None
|
||||
|
||||
# On fait la recherche sur la prise
|
||||
if chbre:
|
||||
if len(chbre) != 1 :
|
||||
print u"Prise correspondante à plusieurs chambres %s " % ' '.join(chbre)
|
||||
return
|
||||
# On fait la recherche sur la chambre
|
||||
chbre= prise[0] + chbre[0]
|
||||
#print u"Recherche sur chambre %s" % chbre
|
||||
arg = 'chbre=%s' % chbre
|
||||
# sinon on ne fait rien et on recherche sur le champ prise
|
||||
|
||||
try:
|
||||
if only_crans :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue