Blogs

NETCONF Java Toolkit

By Erdem posted 08-10-2015 20:12

  

Overview

The NETCONF Java toolkit provides an object-oriented interface for communicating with a NETCONF server. The toolkit enables programmers familiar with the Java programming language to easily connect to a device, open a NETCONF session, construct configuration hierarchies in XML, and create and execute operational and configuration requests.

Feature

 
The NETCONF Java toolkit provides classes with methods that implement the functionality of the NETCONF protocol operations defined in RFC 4741. All basic protocol operations are supported. The NETCONF XML management protocol uses XML-based data encoding for configuration data and remote procedure calls. The toolkit provides classes and methods that aid in creating, modifying, and parsing XML.

The NETCONF Java toolkit has four basic classes, which are described in Table 1.

Table 1: NETCONF Java Toolkit Classes

Class

Summary

Device

Defines the device on which the NETCONF server runs, and represents the SSHv2 connection and default NETCONF session with that device.

NetconfSession

Represents a NETCONF session established with the device on which the NETCONF server runs.

XMLBuilder

Creates XML-encoded data.

XML

XML-encoded data that represents an operational or configuration request or configuration data.

configuration management server is generally a PC or workstation that is used to configure a router, switch, or security device remotely. The communication between the configuration management server and the NETCONF server via the NETCONF Java toolkit involves:

  • Establishing a NETCONF session over SSHv2 between the configuration management server and the NETCONF server.
  • Creating RPCs corresponding to requests and sending these requests to the NETCONF server.
  • Receiving and processing the RPC replies from the NETCONF server.

 

To use the NETCONF Java toolkit, you must install the toolkit and add the .jar path to your CLASSPATH. For more information about installing the NETCONF Java toolkit, see Downloading and Installing the NETCONF Java Toolkit.

Once the toolkit is installed, you connect to a device, create a NETCONF session, and execute operations by adding the associated code to a Java program file, which is then compiled and executed. For more information about creating NETCONF Java toolkit programs, see Creating and Executing a NETCONF Java Toolkit Program File.

6.gif

Note: Juniper Networks devices running Junos OS Release 7.5R1 or later support the NETCONF XML management protocol.

NETCONF Java Toolkit

 

http://www.juniper.net/techpubs/en_US/junos/information-products/pathway-pages/netconf-java-toolkit/netconf-java-toolkit.html

 

Examples

 

Troubleshooting Exception Errors in a NETCONF Java Toolkit Program

Using the NETCONF Java Toolkit to Execute an Operational Request RPC

Using the NETCONF Java Toolkit to Print Component Temperatures

Using the NETCONF Java Toolkit to Load and Commit a Configuration

NETCONF Java

https://github.com/Juniper/netconf-java


#java
#FAQ
#netconf
#How-To