-
Notifications
You must be signed in to change notification settings - Fork 15
Add timeout parameter #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Is this draft pull request still valid? I thought timeout was already configurable in testbed file. |
@miott This PR is still valid, but it's waiting on ncclient/ncclient#550 Although you can pass a timeout through the testbed it wasn't processed in yang in certain cases, and even once it is processed it's not being passed through properly in ncclient. So it would always use the default timeout. |
@GerriorL can we merge this? |
@GerriorL, does timeout work now or not? |
@@ -364,6 +366,12 @@ def connect(self): | |||
except Exception: | |||
pass | |||
|
|||
# check timeout | |||
try: | |||
defaults['timeout'] = int(self.connection_info['timeout']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.timeout
already exist via __init__
. you might want to use this instead to be simple.
and please be aware of that the timeout
is already used here. https://github.com/CiscoTestAutomation/yang/blob/master/connector/src/yang/connector/netconf.py#L284
so the timeout value will be shared between this and your code.
Allow timeout to be user configurable as netconf connections hits ncclient default timeout.
Updated ncclient to allow a custom parameter to be passed
ncclient/ncclient#543