Commit b45d1f91 authored by Tomas Hlavacek's avatar Tomas Hlavacek

Add BIRD pexpect timeout adjustments.

Add timeout parameter to defaults.
parent 7bc98ee0
...@@ -23,7 +23,7 @@ refresh_interval = 5 # interval of html refresh ...@@ -23,7 +23,7 @@ refresh_interval = 5 # interval of html refresh
usage_limit = 1 # maximum concurrently processed requests usage_limit = 1 # maximum concurrently processed requests
range_step = 100 # number of table lines in the decorated output per page range_step = 100 # number of table lines in the decorated output per page
# Settings defaults # Default settings
always_start_thread = True # True is highly recommended always_start_thread = True # True is highly recommended
debug = True debug = True
rescan_on_display = False rescan_on_display = False
...@@ -35,6 +35,7 @@ default_bird_sock = '/var/run/bird.ctl' ...@@ -35,6 +35,7 @@ default_bird_sock = '/var/run/bird.ctl'
default_bird_sock_timeout = 30 default_bird_sock_timeout = 30
default_bin_birdc = '/usr/sbin/birdc' default_bin_birdc = '/usr/sbin/birdc'
bin_whois = '/usr/bin/whois' bin_whois = '/usr/bin/whois'
timeout = 180
# Template dir relative to the index.py script # Template dir relative to the index.py script
template_dir = 'templates' template_dir = 'templates'
......
...@@ -570,7 +570,7 @@ class BirdRouterRemote(ulgmodel.RemoteRouter,BirdRouter): ...@@ -570,7 +570,7 @@ class BirdRouterRemote(ulgmodel.RemoteRouter,BirdRouter):
def runRawCommand(self,command,outfile): def runRawCommand(self,command,outfile):
c = '/bin/bash -c \'echo "'+command+'" | '+self.bin_ssh+' -p'+str(self.getPort())+' '+str(self.getUser())+'@'+self.getHost()+' '+self.bin_birdc+'\'' c = '/bin/bash -c \'echo "'+command+'" | '+self.bin_ssh+' -p'+str(self.getPort())+' '+str(self.getUser())+'@'+self.getHost()+' '+self.bin_birdc+'\''
s=pexpect.spawn(c) s=pexpect.spawn(c,timeout=defaults.timeout)
# s.logfile = open('/tmp/ulgbird.log', 'w') # s.logfile = open('/tmp/ulgbird.log', 'w')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment