Can somebody tell me what is the most suitable Java API for development of NETCONF managers that (successfully) interoperate to netopeer-server? There are some APIs as the provided by Juniper and others like netconf4j and netconf4android. I'm trying to use the Juniper's API, because it seems the most well-documented and updated. However, an error occurs when I try to get the server capabilities - more accurately, the SSH channel is closed by netopeer-server.
My apologies for this off-topic issue.
Helcio.
-- Radek Krejci mobile : +420 732 212 714 office : +420 234 680 256 e-mail : rkr...@cesnet.cz LinkedIn: http://www.linkedin.com/in/radekkrejci CESNET Association of Legal Entities 160 00 Praha 6, Zikova 4 Czech Republic
Hi, Radek.
Well, I'm learning how I can use this Java API to establish a connection to netopeer-server and do some things that I did with the libnetconf API - i.e., send <create-subscription>, <edit-config> and generic <rpc> operations to netopeer-server and receive notifications from it. In order to do that with the Juniper, I must create a 'Device' object, According to the API's documentation, this class "defines the device on which the NETCONF server runs, and represents the SSHv2 connection and default NETCONF session with that device." The following lines have worked very well:
Device device = new Device("localhost", "root", "myRootPassword", null);device.connect();desvice.close();
If my code is restricted to those lines, I'll see on netopeer-server output:
netopeer-server[3482]: message is a method-callnetopeer-server[3482]: message path: /org/liberouter/netopeer2/servernetopeer-server[3482]: message interface: org.liberouter.netopeer2.servernetopeer-server[3482]: message member: GetCapabilitiesnetopeer-server[3482]: message destination: org.liberouter.netopeer2.servernetopeer-server[3482]: Some message receivednetopeer-server[3482]: Sending capabilities to agent.
For the record, netopeer-agent (which begun to run after netopeer-server had been launched) shows nothing.
OK, let's move to the problem itself, i.e.: an exception is thrown when I invoke the 'getRunningConfig' method, which "retrieve the whole running configuration". More accurately, the following line:
XML capabilities = device.getRunningConfig();
causes:
Exception in thread "main" ch.ethz.ssh2.channel.ChannelClosedException: SSH channel is closed. (Close requested by remote)
Again, netopeer-agent shows nothing.
I'll try to load a module using that API and present the results. The Juniper API can be obtained from:
--
You received this message because you are subscribed to the Google Groups "Netopeer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netopeer+u...@googlegroups.com.
Visit this group at http://groups.google.com/group/netopeer.
For more options, visit https://groups.google.com/d/optout.