Skip to content

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Add timeout parameter #69

wants to merge 4 commits into from

Conversation

GerriorL
Copy link
Contributor

@GerriorL GerriorL commented Aug 11, 2022

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

@miott
Copy link
Contributor

miott commented Oct 6, 2022

Is this draft pull request still valid? I thought timeout was already configurable in testbed file.

@GerriorL
Copy link
Contributor Author

GerriorL commented Oct 6, 2022

@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 GerriorL marked this pull request as ready for review November 1, 2022 18:22
@GerriorL GerriorL requested a review from a team as a code owner November 1, 2022 18:22
@GerriorL GerriorL requested review from domachad and stevedhn November 1, 2022 18:22
@GerriorL GerriorL marked this pull request as draft November 1, 2022 18:23
@dwapstra
Copy link
Contributor

dwapstra commented Nov 3, 2022

@GerriorL can we merge this?

@miott
Copy link
Contributor

miott commented Apr 5, 2023

@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'])
Copy link
Contributor

@tahigash tahigash Apr 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/CiscoTestAutomation/yang/blob/master/connector/src/yang/connector/netconf.py#L266

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants