You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 13, 2025. It is now read-only.
Hi,
I´m having almost the same issue as listed in #37
But already checked to be correctly using 'net/netconf/jnpr'
Here is the script:
#!/usr/bin/rubyrequire'pp'require'net/netconf/jnpr'require'junos-ez/stdlib'require'highline/import'# Create a hash map to hold login parameters for NetConf sessionlogin=Hash.new# Prompt for system IP, username and passwordlogin[:target]="192.168.108.199"login[:username]=ask("username: "){ |a| a.echo=true}# Connect to target and start netconf ssh sessiondev=Netconf::SSH.new(login)dev.openJunos::Ez::Provider(dev)ppdev.facts.catalogdev.close
And here the output:
# ./ruby_ez_1.rb
username: test
/usr/local/rvm/gems/ruby-2.2.1/gems/net-netconf-0.4.3/lib/net/netconf/rpc.rb:32:in `block (3 levels) in method_missing': undefined method `each' for "show version":String (NoMethodError)
from /usr/local/rvm/gems/ruby-2.2.1/gems/nokogiri-1.6.7.2/lib/nokogiri/xml/builder.rb:391:in `call'
from /usr/local/rvm/gems/ruby-2.2.1/gems/nokogiri-1.6.7.2/lib/nokogiri/xml/builder.rb:391:in `insert'
from /usr/local/rvm/gems/ruby-2.2.1/gems/nokogiri-1.6.7.2/lib/nokogiri/xml/builder.rb:375:in `method_missing'
from /usr/local/rvm/gems/ruby-2.2.1/gems/net-netconf-0.4.3/lib/net/netconf/rpc.rb:31:in `block (2 levels) in method_missing'
from /usr/local/rvm/gems/ruby-2.2.1/gems/nokogiri-1.6.7.2/lib/nokogiri/xml/builder.rb:391:in `call'
from /usr/local/rvm/gems/ruby-2.2.1/gems/nokogiri-1.6.7.2/lib/nokogiri/xml/builder.rb:391:in `insert'
from /usr/local/rvm/gems/ruby-2.2.1/gems/nokogiri-1.6.7.2/lib/nokogiri/xml/builder.rb:375:in `method_missing'
from /usr/local/rvm/gems/ruby-2.2.1/gems/net-netconf-0.4.3/lib/net/netconf/rpc.rb:31:in `block in method_missing'
from /usr/local/rvm/gems/ruby-2.2.1/gems/nokogiri-1.6.7.2/lib/nokogiri/xml/builder.rb:293:in `initialize'
from /usr/local/rvm/gems/ruby-2.2.1/gems/net-netconf-0.4.3/lib/net/netconf/rpc.rb:30:in `new'
from /usr/local/rvm/gems/ruby-2.2.1/gems/net-netconf-0.4.3/lib/net/netconf/rpc.rb:30:in `method_missing'
from /usr/local/rvm/gems/ruby-2.2.1/gems/net-netconf-0.4.3/lib/net/netconf/rpc.rb:65:in `method_missing'
from /usr/local/rvm/gems/ruby-2.2.1/gems/junos-ez-stdlib-0.1.2/lib/junos-ez/facts/version.rb:22:in `block in <top (required)>'
from /usr/local/rvm/gems/ruby-2.2.1/gems/junos-ez-stdlib-0.1.2/lib/junos-ez/facts.rb:67:in `block in read!'
from /usr/local/rvm/gems/ruby-2.2.1/gems/junos-ez-stdlib-0.1.2/lib/junos-ez/facts.rb:64:in `each'
from /usr/local/rvm/gems/ruby-2.2.1/gems/junos-ez-stdlib-0.1.2/lib/junos-ez/facts.rb:64:in `read!'
from /usr/local/rvm/gems/ruby-2.2.1/gems/junos-ez-stdlib-0.1.2/lib/junos-ez/facts.rb:16:in `Provider'
from ./ruby_ez_1.rb:20:in `<main>'
Hi,
I´m having almost the same issue as listed in #37
But already checked to be correctly using 'net/netconf/jnpr'
Here is the script:
And here the output:
Any ideas?