Affichage des adresses MAC prsentes sur les prises
darcs-hash:20041002084849-d1718-3ed894da0f7d005541d9109e2052d5f20cc14d14.gz
This commit is contained in:
parent
434958ace1
commit
e771a7cebb
1 changed files with 20 additions and 0 deletions
|
@ -311,6 +311,7 @@ def adher_details(adher) :
|
||||||
if prise :
|
if prise :
|
||||||
f += u'(prise %s' % prise
|
f += u'(prise %s' % prise
|
||||||
f += prise_etat(chbre)
|
f += prise_etat(chbre)
|
||||||
|
f += prise_macs(chbre)
|
||||||
f += ')'
|
f += ')'
|
||||||
|
|
||||||
f += '\n'
|
f += '\n'
|
||||||
|
@ -561,6 +562,25 @@ def __bases_machines(m) :
|
||||||
|
|
||||||
return t , bl
|
return t , bl
|
||||||
|
|
||||||
|
def prise_macs(chbre) :
|
||||||
|
f = ''
|
||||||
|
try :
|
||||||
|
# On ajoute une partie des adresses MAC qui sont sur la prise
|
||||||
|
conn = sw_chbre(chbre)
|
||||||
|
result = conn.show_prise_mac()
|
||||||
|
f += ',\n\t\t'
|
||||||
|
if len(result) == 0:
|
||||||
|
f += coul('aucune MAC détectée', 'rouge')
|
||||||
|
else:
|
||||||
|
f += 'MACs: %s' % ", ".join(result[0:2])
|
||||||
|
if len(result) > 3:
|
||||||
|
f += ' [...]'
|
||||||
|
except:
|
||||||
|
# Switch non manageable
|
||||||
|
pass
|
||||||
|
|
||||||
|
return f
|
||||||
|
|
||||||
def prise_etat(chbre) :
|
def prise_etat(chbre) :
|
||||||
f = ''
|
f = ''
|
||||||
try :
|
try :
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue