Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

Bigsuds timeout

I've started using the bigsuds python package. It appears that it uses the default suds timeout of 90 seconds.

Is there a way to specify a timeout for connections? I'd like to make it a bit shorter so that I can skip down devices quicker.

Thanks!

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

So I just had to deal with this myself and made a small modification to the bigsuds module.

At line 23 I added a variable -

timeout = 5

Change the value to the number of seconds you want the new timeout to be.


Then at line 226 and 227 you will see where the suds Client class is called like so -

	client = Client(url, doctor=doctor, username=username, password=password,
                    cache=cachedir)

After the cache attribute add the timeout object -

	client = Client(url, doctor=doctor, username=username, password=password,
                    cache=cachedir,timeout = timeout)



Not the most elegant but it works. Perhaps in the next version of bigsuds it could be an attribute set in the BIGIP class args?

0
Comments on this Answer
Comment made 17-Nov-2015 by Tim Rupp
Hey all, I realize it's been a long time coming and this thread is kinda old, but I've pushed a new version of bigsuds that incorporates Eric's work and should address Matt's need also. You can get it via pypi https://pypi.python.org/pypi/bigsuds And follow along for future updates here https://github.com/F5Networks/bigsuds
0