Nouveau IP + on recupere l'ip du switch dans la base

darcs-hash:20070830211831-c3cc4-170e49e50de6053e6d72cafb59c3701d4934355b.gz
This commit is contained in:
dubost 2007-08-30 23:18:31 +02:00
parent 9fdd3c69c5
commit d532767298

View file

@ -46,17 +46,17 @@ snmp-server community "public" Operator
;-------------------------------------------------------- Heure/date
time timezone 60
time daylight-time-rule Western-Europe
sntp server 138.231.144.3
sntp server 10.231.136.3
timesync sntp
sntp unicast
;-------------------------------------------------------- Misc
console inactivity-timer 30
;-------------------------------------------------------- Logs
logging 138.231.144.7
logging 10.231.136.7
;-------------------------------------------------------- Logs
%(INTERFACES_CONF)s
;-------------------------------------------------------- IP du switch
ip default-gateway 138.231.144.4
ip default-gateway 10.231.136.4
vlan 1
name "DEFAULT_VLAN"
%(prises_default)s
@ -86,7 +86,7 @@ aaa authentication ssh login public-key
aaa authentication ssh enable public-key
ip ssh
ip ssh version 2
ip authorized-managers 138.231.144.0 255.255.255.0
ip authorized-managers 10.231.136.0 255.255.255.0
ip ssh filetransfer
;------------------------------------------------------- Spanning-tree
spanning-tree protocol-version rstp
@ -118,7 +118,7 @@ no stack
exit
"""
# Serveurs radius
rad_servs = [ '138.231.144.10' , '138.231.144.18' ]
rad_servs = [ '10.231.136.10' , '10.231.136.18' ]
rad_template = "radius-server host %s\n"
def __init__(self,truc):
@ -255,7 +255,7 @@ exit
params['modele'] = modele.split()[1]
# IP
params['ip'] = commands.getoutput("host %s" % switch).split()[-1]
params['ip'] = str(self.db.search(switch)['machine'][0].ip())
### Configuration prises
params['INTERFACES_CONF'] = ''