-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-------------------------------------------------------------------------------- | ||
Fix | ||
-------------------------------------------------------------------------------- | ||
* yang.connector | ||
* Modified netconf.py: | ||
* Add custom timeout parameter to Netconf.connect |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -295,6 +295,7 @@ def connect(self): | |
port: 830 | ||
username: admin | ||
password: admin | ||
timeout: 120 | ||
|
||
Code Example:: | ||
|
||
|
@@ -335,6 +336,7 @@ def connect(self): | |
'hostkey_verify': False, | ||
'look_for_keys': False, | ||
'ssh_config': None, | ||
'timeout': 60 | ||
} | ||
defaults.update(self.connection_info) | ||
|
||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more.
and please be aware of that the so the timeout value will be shared between this and your code. |
||
except (KeyError, ValueError): | ||
pass | ||
|
||
# support sshtunnel | ||
if 'sshtunnel' in defaults: | ||
from unicon.sshutils import sshtunnel | ||
|
Uh oh!
There was an error while loading. Please reload this page.