From d532767298b3006652de6e1d24fd57865f62e628 Mon Sep 17 00:00:00 2001 From: dubost Date: Thu, 30 Aug 2007 23:18:31 +0200 Subject: [PATCH] Nouveau IP + on recupere l'ip du switch dans la base darcs-hash:20070830211831-c3cc4-170e49e50de6053e6d72cafb59c3701d4934355b.gz --- gestion/gen_confs/switchs.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gestion/gen_confs/switchs.py b/gestion/gen_confs/switchs.py index d5bde7c3..4d7eb6d1 100755 --- a/gestion/gen_confs/switchs.py +++ b/gestion/gen_confs/switchs.py @@ -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'] = ''