@@ -13,67 +13,87 @@ REQUIREMENTS
1313============
1414
1515[ OpenJDK 8] ( http://openjdk.java.net/projects/jdk8/ ) or Java 8
16+ [ Maven] ( https://maven.apache.org/download.cgi ) if you want to build using ` mvn ` [ Supported from v2.1.1] .
1617
1718Releases
1819========
19- Latest .jar file in release section contains netconf-java compiled from Java SE 8u65.
20- If user wants to use some other java version, then download the source code and compile it with desired version.
20+ Releases contain source code only. Due to changing JDK licensing, jar files are not released.
21+ User may download the source code and compile it with desired JDK version.
22+
23+ * Instructions to build
24+ * Download Source Code for the required release
25+ * Compile the code and build the jar using your chosen JDK version
26+ * Use the jar file
27+
28+ * Instructions to build using ` mvn `
29+ * Download Source Code for the required release
30+ * Compile the code and build the jar using ` mvn package `
31+ * Use the jar file from (source to netconf-java)/netconf-java/target
32+
33+ v2.1.1
34+ ------
35+
36+ * Fixed ` mvn ` build issues
2137
2238v2.0.0
2339------
40+
2441* Replaced the ssh library with [ JSch] ( http://www.jcraft.com/jsch/ )
25- * Adds support for new ssh crypto algorithms
26- * More modern ssh implementation
42+ * Adds support for new ssh crypto algorithms
43+ * More modern ssh implementation
2744* Added support for importing and building the library with maven
2845* Added FindBugs code testing to maven build
2946
3047This is a breaking change to the API. New Device objects are now created using a builder.
3148Example:
32- ```
49+
50+ ``` Java
3351Device device = Device . builder(). hostName(" hostname" )
3452 .userName(" username" )
3553 .password(" password" )
3654 .hostKeysFileName(" hostKeysFileName" )
37- .build();
55+ .build();
3856```
3957
4058SYNOPSIS
4159========
4260
43- import java.io.IOException;
44- import javax.xml.parsers.ParserConfigurationException ;
45- import net.juniper.netconf.NetconfException ;
46- import org.xml.sax.SAXException ;
47-
48- import net.juniper.netconf.XML;
49- import net.juniper.netconf.Device ;
50-
51- public class ShowInterfaces {
52- public static void main(String args[]) throws NetconfException,
53- ParserConfigurationException, SAXException, IOException {
54-
55- //Create device
56- Device device = Device.builder()
57- .hostName("hostname" )
58- .userName("username ")
59- .password("password ")
60- .hostKeysFileName("hostKeysFileName ")
61- .build();
62- device.connect ();
63-
64- //Send RPC and receive RPC Reply as XML
65- XML rpc_reply = device.executeRPC("get-interface-information");
66- /* OR
67- * device.executeRPC("<get-interface-information/>");
68- * OR
69- * device.executeRPC("<rpc><get-interface-information/></rpc>");
70- */
71-
72- //Print the RPC-Reply and close the device.
73- System.out.println(rpc_reply);
74- device.close( );
75- }
61+ ``` Java
62+ import java.io.IOException ;
63+ import javax.xml.parsers.ParserConfigurationException ;
64+ import net.juniper.netconf.NetconfException ;
65+ import org.xml.sax.SAXException ;
66+
67+ import net.juniper.netconf.XML ;
68+ import net.juniper.netconf.Device ;
69+
70+ public class ShowInterfaces {
71+ public static void main ( String args []) throws NetconfException ,
72+ ParserConfigurationException , SAXException , IOException {
73+
74+ // Create device
75+ Device device = Device . builder( )
76+ .hostName( " hostname " )
77+ .userName( " username " )
78+ .password( " password " )
79+ .hostKeysFileName( " hostKeysFileName " )
80+ .build ();
81+ device . connect();
82+
83+ // Send RPC and receive RPC Reply as XML
84+ XML rpc_reply = device . executeRPC( " get-interface-information " );
85+ /* OR
86+ * device.executeRPC("<get-interface-information/>");
87+ * OR
88+ * device.executeRPC("<rpc><get-interface-information/></rpc>");
89+ */
90+
91+ // Print the RPC-Reply and close the device.
92+ System . out . println(rpc_reply );
93+ device . close();
7694 }
95+ }
96+ ```
7797
7898LICENSE
7999=======
0 commit comments