ā04-02-2019 08:51 PM - edited ā04-02-2019 08:52 PM
Hi team,
I'm trying to cut down the NetconfSession is trying to open a netconf session to an unreachable host, the example below it takes about 130s until the instance comes back.
provider = NetconfServiceProvider(address=kwargs.get("host"), port=kwargs.get("port"), username=kwargs.get("auth").get("user"), password=kwargs.get("auth").get("passwd"), protocol=kwargs.get("protocol"), timeout=0)
and I had tried to change the timeout to 60s(60*1000), but it seems no difference:
provider = NetconfServiceProvider(address=kwargs.get("host"), port=kwargs.get("port"), username=kwargs.get("auth").get("user"), password=kwargs.get("auth").get("passwd"), protocol=kwargs.get("protocol"), timeout=60*1000)
So, what is the default timeout for NetconfSession timeout? and how to change the timeout for the NetconfSession?
Thanks.
ā09-17-2020 02:25 AM
Any solution to this?
ā09-21-2020 09:00 AM
By default the timeout set to -1, which means not limited. By setting the timeout value to some other number you define the maximum delay.
ā09-22-2020 01:50 AM
The timeout parameter in provider doesn't seem to have any effect. I've used timeout=5000000 which should equal to 5 seconds, but when I try to run the code on an unreachable device, nothing happens after 5 seconds. The code gets stuck, waiting for response.
ā09-22-2020 05:50 AM
I understand that you cut down connectivity after the connection hd been established. Similar issue was resolved some time ago. In this regards I wonder what YDK release are you using?
ā09-23-2020 11:18 PM
I'm using version 0.8.4
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide