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