-
Notifications
You must be signed in to change notification settings - Fork 26
Fix for the issue #37 and #38 #39
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
Open
Balakrishnan-Easwaran
wants to merge
47
commits into
netconf-perl-0.01
Choose a base branch
from
master
base: netconf-perl-0.01
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a complete rewrite of Net::Netconf::Access::ssh, replacing all prior use of Expect and the 'ssh' binary with Net::SSH2. This means Net::Netconf no longer requires Expect (nor, by extension, Tcl/Tk). It should also be much more robust, as the previous Expect implementation is suspectible to breakage if the 'ssh' binary changes its output. Finally, it fixes issue #19.
Net::SSH2::Channel2::write() isn't guaranteed to write the entire buffer that is passed to it, especially if the buffer is large. Therefore loop over it until all bytes have been written. In order to avoid busy-looping while the channel isn't ready to accept more data, set it as blocking before starting the write loop. Make recv() explicitly set the channel back to non-blocking before starting the read loop. This removes the need to set the blocking state in start().
According to Net::Netconf::Device(3pm), 'netconf' should be used as the default subsystem if the user hasn't specified anything else in the 'server' argument to Net::Netconf::Device::new(). Noticed by @Jainpriyal in #19, thanks!
Rewrite Net::Netconf::Access::ssh using Net::SSH2
Modified README and README.md
…an override to pass a port => into Net::Netconf::Manager
Added support to launch junoscript/netconf via the shell, as well as an ...
User can provide port no for establishing connection
updating troubleshooting
This example demonstrates how to collect and parse the output of show interfaces command using XML::XPath and XML DOM.
Create collect-show-interface.pl
* docker container netconf-perl * remove obsolete statements * use variable for container name * make /scripts the working directory. Document -v in README.md
…ethods (#34) * adding exception handling for reads and writes I've added exception handling to catch when a write or read fails. When one of these failures occur, we disconnect the underlying ssh connection. It is the callers responsibility to attempt any reconnections. * adding ref to methods on object for external access * Removing static error messages Error messages were persisting as new Device objects were created. This caused unexpected errors to be announced. * adding spec file to build rpm * adding two extra dependencies * updating version and spec file with a fix for our dying NetConf session.... * updated the build process and cleaned up a few things for Juniper folks * One last fix for when we receive 0 bytes because the netconf session has died * fixing the timeout so if we do get data and it takes more than 15sec to receive it we wont timeout
@Balakrishnan-Easwaran Thank you for your contribution. The pull request seems to have gone awry. Please check the source branch and destination. I see the pull request says - "...wants to merge 44 commits into netconf-perl-0.01 from master" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have raised two issues #37 and #38 and I thought of providing fix for both. So giving a pull request.
Thanks,
Balakrishnan