Is this available as a gem
Closed this issue · 10 comments
Hi Andrew,
I was looking for a NETCONF client in Ruby and came across your code. Please excuse for my naiveness, but how do I install your client in my setup?
Hello,
First of all, the code is very much written to support Juniper Infranet
Controllers at this time. I'm working on updating the code to be more
generic and be more able to support other vendors/equipment. If you'd
still like to play with the code you can create a gem for installation by
doing the following:
- clone the git repo to the server you want to run the code on (github has
a bunch of instructions on this, so I won't go into detail) - navigate to the cloned directory
- build the gem:
gem build netconf.gemspec - Install the gem:
gem install netconf-0.0.1.gem
Hope this helps!
Andrew
On Tue, Sep 18, 2012 at 5:39 AM, ankitjain093 notifications@github.comwrote:
Hi Andrew,
I was looking for a NETCONF client in Ruby and came across your code.
Please excuse for my naiveness, but how do I install your client in my
setup?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/1.
Thanks Andrew. I actually need it to connect to a JUNOS box. Is your client
currently in a position to support that? (Connect to a JUNOS router, push
some configuration/execute any RPC).
Using your client, can you share a small example how to:
- Connect to a JUNOS box.
- Execute any random RPC. e.g. ]]>]]>
- Close the connection.
Regards
Ankit
On Tue, Sep 18, 2012 at 7:02 PM, Andrew Bates notifications@github.comwrote:
Hello,
First of all, the code is very much written to support Juniper Infranet
Controllers at this time. I'm working on updating the code to be more
generic and be more able to support other vendors/equipment. If you'd
still like to play with the code you can create a gem for installation by
doing the following:
- clone the git repo to the server you want to run the code on (github
has
a bunch of instructions on this, so I won't go into detail)- navigate to the cloned directory
- build the gem:
gem build netconf.gemspec- Install the gem:
gem install netconf-0.0.1.gemHope this helps!
AndrewOn Tue, Sep 18, 2012 at 5:39 AM, ankitjain093 notifications@github.comwrote:
Hi Andrew,
I was looking for a NETCONF client in Ruby and came across your code.
Please excuse for my naiveness, but how do I install your client in my
setup?—
Reply to this email directly or view it on GitHub<
https://github.com/abates/Netconf/issues/1>.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-8654810.
- o__
> /_
() ()... Burn fat not fuel - Byke along to a healthier lyfe and
cleaner world! :)*
Small Loans, Big Impacts. Log on to www.rangde.org to make a social
investment today!
Ankit,
It probably won't work "out of the box" for JunOS today. However, it
should be pretty easy to get it working with JunOS. I have an SRX here
that I can test with. Can you give me some examples of how you want to use
the gem? For instance, do you want to have a text config file that you
want to upload, or will you want to make more programmatic changes? Some
very simple use cases will help me get it working for you.
Also, if you are interested in contributing to the code we can work
something out and I can give you some pointers on how it is built.
Andrew
On Wed, Sep 19, 2012 at 5:34 AM, ankitjain093 notifications@github.comwrote:
Thanks Andrew. I actually need it to connect to a JUNOS box. Is your
client
currently in a position to support that? (Connect to a JUNOS router, push
some configuration/execute any RPC).Using your client, can you share a small example how to:
- Connect to a JUNOS box.
- Execute any random RPC. e.g. ]]>]]>
- Close the connection.
Regards
AnkitOn Tue, Sep 18, 2012 at 7:02 PM, Andrew Bates notifications@github.comwrote:
Hello,
First of all, the code is very much written to support Juniper Infranet
Controllers at this time. I'm working on updating the code to be more
generic and be more able to support other vendors/equipment. If you'd
still like to play with the code you can create a gem for installation
by
doing the following:
- clone the git repo to the server you want to run the code on (github
has
a bunch of instructions on this, so I won't go into detail)- navigate to the cloned directory
- build the gem:
gem build netconf.gemspec- Install the gem:
gem install netconf-0.0.1.gemHope this helps!
AndrewOn Tue, Sep 18, 2012 at 5:39 AM, ankitjain093 notifications@github.comwrote:
Hi Andrew,
I was looking for a NETCONF client in Ruby and came across your code.
Please excuse for my naiveness, but how do I install your client in my
setup?—
Reply to this email directly or view it on GitHub<
https://github.com/abates/Netconf/issues/1>.—
Reply to this email directly or view it on GitHub<
https://github.com/abates/Netconf/issues/1#issuecomment-8654810>.
- o__
> /_
() ()... Burn fat not fuel - Byke along to a healthier lyfe and
cleaner world! :)*Small Loans, Big Impacts. Log on to www.rangde.org to make a social
investment today!—
Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-8688052.
Hi Andrew,
Here's an example of what I want to do:
- Connect to the SRX box.
- Execute any RPC. Say ""
- Print the rpc-reply received from SRX, on the screen. Expected output
would be something like:
Basically establish the netconf/ssh channel and be able to exchange
rpc/rpc-reply over the channel.
I'm sure your client should be able to do this easily, as its already
written for Juniper infranet controller(does it run JUNOS?). But just
looking for a basic example how to do this.
I would be glad to contribute but I'm new to Ruby, and right now looking
for a quick way to get started.
Regards
Ankit
On Wed, Sep 19, 2012 at 8:55 PM, Andrew Bates notifications@github.comwrote:
Ankit,
It probably won't work "out of the box" for JunOS today. However, it
should be pretty easy to get it working with JunOS. I have an SRX here
that I can test with. Can you give me some examples of how you want to use
the gem? For instance, do you want to have a text config file that you
want to upload, or will you want to make more programmatic changes? Some
very simple use cases will help me get it working for you.Also, if you are interested in contributing to the code we can work
something out and I can give you some pointers on how it is built.Andrew
On Wed, Sep 19, 2012 at 5:34 AM, ankitjain093 notifications@github.comwrote:
Thanks Andrew. I actually need it to connect to a JUNOS box. Is your
client
currently in a position to support that? (Connect to a JUNOS router,
push
some configuration/execute any RPC).Using your client, can you share a small example how to:
- Connect to a JUNOS box.
- Execute any random RPC. e.g.
]]>]]>- Close the connection.
Regards
AnkitOn Tue, Sep 18, 2012 at 7:02 PM, Andrew Bates notifications@github.comwrote:
Hello,
First of all, the code is very much written to support Juniper
Infranet
Controllers at this time. I'm working on updating the code to be more
generic and be more able to support other vendors/equipment. If you'd
still like to play with the code you can create a gem for installation
by
doing the following:
- clone the git repo to the server you want to run the code on
(github
has
a bunch of instructions on this, so I won't go into detail)- navigate to the cloned directory
- build the gem:
gem build netconf.gemspec- Install the gem:
gem install netconf-0.0.1.gemHope this helps!
AndrewOn Tue, Sep 18, 2012 at 5:39 AM, ankitjain093 <
notifications@github.com>wrote:Hi Andrew,
I was looking for a NETCONF client in Ruby and came across your
code.
Please excuse for my naiveness, but how do I install your client in
my
setup?—
Reply to this email directly or view it on GitHub<
https://github.com/abates/Netconf/issues/1>.—
Reply to this email directly or view it on GitHub<
https://github.com/abates/Netconf/issues/1#issuecomment-8654810>.
- o__
> /_
() ()... Burn fat not fuel - Byke along to a healthier lyfe and
cleaner world! :)*Small Loans, Big Impacts. Log on to www.rangde.org to make a social
investment today!—
Reply to this email directly or view it on GitHub<
https://github.com/abates/Netconf/issues/1#issuecomment-8688052>.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-8694657.
- o__
> /_
() ()... Burn fat not fuel - Byke along to a healthier lyfe and
cleaner world! :)*
Small Loans, Big Impacts. Log on to www.rangde.org to make a social
investment today!
Also, I'm not sure if that's the right way, but I simply downloaded the
.zip version of your package on my Windows, and tried building the gem,
unsuccessfully:
C:\Users\ankitj\Downloads\abates-Netconf-4f45521> gem build netconf.gemspec
Invalid gemspec in [netconf.gemspec]: No such file or directory - git
ls-files
ERROR: Error loading gemspec. Aborting.
C:\Users\ankitj\Downloads\abates-Netconf-4f45521>
On Wed, Sep 19, 2012 at 11:58 PM, ankit jain ankitjain093@gmail.com wrote:
Hi Andrew,
Here's an example of what I want to do:
... ...
- Connect to the SRX box.
- Execute any RPC. Say ""
- Print the rpc-reply received from SRX, on the screen. Expected output
would be something like:Basically establish the netconf/ssh channel and be able to exchange
rpc/rpc-reply over the channel.
I'm sure your client should be able to do this easily, as its already
written for Juniper infranet controller(does it run JUNOS?). But just
looking for a basic example how to do this.I would be glad to contribute but I'm new to Ruby, and right now looking
for a quick way to get started.Regards
AnkitOn Wed, Sep 19, 2012 at 8:55 PM, Andrew Bates notifications@github.comwrote:
Ankit,
It probably won't work "out of the box" for JunOS today. However, it
should be pretty easy to get it working with JunOS. I have an SRX here
that I can test with. Can you give me some examples of how you want to
use
the gem? For instance, do you want to have a text config file that you
want to upload, or will you want to make more programmatic changes? Some
very simple use cases will help me get it working for you.Also, if you are interested in contributing to the code we can work
something out and I can give you some pointers on how it is built.Andrew
On Wed, Sep 19, 2012 at 5:34 AM, ankitjain093 notifications@github.comwrote:
Thanks Andrew. I actually need it to connect to a JUNOS box. Is your
client
currently in a position to support that? (Connect to a JUNOS router,
push
some configuration/execute any RPC).Using your client, can you share a small example how to:
- Connect to a JUNOS box.
- Execute any random RPC. e.g.
]]>]]>- Close the connection.
Regards
AnkitOn Tue, Sep 18, 2012 at 7:02 PM, Andrew Bates notifications@github.comwrote:
Hello,
First of all, the code is very much written to support Juniper
Infranet
Controllers at this time. I'm working on updating the code to be more
generic and be more able to support other vendors/equipment. If you'd
still like to play with the code you can create a gem for
installation
by
doing the following:
- clone the git repo to the server you want to run the code on
(github
has
a bunch of instructions on this, so I won't go into detail)- navigate to the cloned directory
- build the gem:
gem build netconf.gemspec- Install the gem:
gem install netconf-0.0.1.gemHope this helps!
AndrewOn Tue, Sep 18, 2012 at 5:39 AM, ankitjain093 <
notifications@github.com>wrote:Hi Andrew,
I was looking for a NETCONF client in Ruby and came across your
code.
Please excuse for my naiveness, but how do I install your client in
my
setup?—
Reply to this email directly or view it on GitHub<
https://github.com/abates/Netconf/issues/1>.—
Reply to this email directly or view it on GitHub<
https://github.com/abates/Netconf/issues/1#issuecomment-8654810>.
- o__
> /_
() ()... Burn fat not fuel - Byke along to a healthier lyfe and
cleaner world! :)*Small Loans, Big Impacts. Log on to www.rangde.org to make a social
investment today!—
Reply to this email directly or view it on GitHub<
https://github.com/abates/Netconf/issues/1#issuecomment-8688052>.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-8694657.
- o__
> /_
() ()... Burn fat not fuel - Byke along to a healthier lyfe and cleaner world! :)*Small Loans, Big Impacts. Log on to www.rangde.org to make a social investment today!
- o__
> /_
() ()... Burn fat not fuel - Byke along to a healthier lyfe and
cleaner world! :)*
Small Loans, Big Impacts. Log on to www.rangde.org to make a social
investment today!
Just download and add the lib dir to your RUBYLIB path and it should work. I pulled this code down and made some changes to get it to work with a Juniper EX switch. I am currently under the gun trying to get something resolved at $DAYJOB, but this weekend I was going to speak up to see how I can get what I've done merged in such a way that abates code will work for at least EX and SRX.
Cool! I think if you got it to work on EX, that should make it work on any
JUNOS box. I'll wait for your updated changes...
Regards
Ankit
On Thu, Sep 20, 2012 at 12:07 AM, jeremypruitt notifications@github.comwrote:
Just download and add the lib dir to your RUBYLIB path and it should work.
I pulled this code down and made some changes to get it to work with a
Juniper EX switch. I am currently under the gun trying to get something
resolved at $DAYJOB, but this weekend I was going to speak up to see how I
can get what I've done merged in such a way that abates code will work for
at least EX and SRX.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-8701567.
- o__
> /_
() ()... Burn fat not fuel - Byke along to a healthier lyfe and
cleaner world! :)*
Small Loans, Big Impacts. Log on to www.rangde.org to make a social
investment today!
Thanks Jeremy! Been on vacation for a few days and just got back into
things. I'm in the process of refactoring the code a bit to be more
modular/easier to add devices to. I think it will take me a few days. I'm
interested in seeing what you've done with the code.
Andrew
On Wed, Sep 19, 2012 at 12:37 PM, jeremypruitt notifications@github.comwrote:
Just download and add the lib dir to your RUBYLIB path and it should work.
I pulled this code down and made some changes to get it to work with a
Juniper EX switch. I am currently under the gun trying to get something
resolved at $DAYJOB, but this weekend I was going to speak up to see how I
can get what I've done merged in such a way that abates code will work for
at least EX and SRX.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-8701567.
Andrew:
I just installed the library via the method you described above (gem build ...), but when I "require 'netconf'" I get the following:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require': no such file to load -- netconf/string_methods (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
require'
from /Library/Ruby/Gems/1.8/gems/netconf-0.0.1/lib/netconf/device.rb:9
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in
require'
from netconf-test.rb:4
Obviously this is on a Mac, though I don't know why that would matter. "string_methods" doesn't seem to be included in the "netconf" tree anywhere...
This should be fixed. An old require was hanging around for a file that
was previously removed. Please pull down the code and try again. I
haven't tested it just now (not in an environment where I can test at the
moment), but the fix should be good.
Andrew
On Wed, Oct 3, 2012 at 4:38 PM, fatcat notifications@github.com wrote:
Andrew:
I just installed the library via the method you described above (gem build
...), but when I "require 'netconf'" I get the following:/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require': no such file to load -- netconf/string_methods
(LoadError)
from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
require'
from /Library/Ruby/Gems/1.8/gems/netconf-0.0.1/lib/netconf/device.rb:9
from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in
gem_original_require'
from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in
require'
from netconf-test.rb:4Obviously this is on a Mac, though I don't know why that would matter.
"string_methods" doesn't seem to be included in the "netconf" tree
anywhere...—
Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-9121246.