cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

Who Me Too'd this topic

How to set connection timeout in NetconfServiceProvider or NetconfSession?

vipaoqun@hotmail.com
Cisco Employee
Cisco Employee

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.

 

Who Me Too'd this topic