NETCONF Client GUI
The NETCONF client is a simple GUI client application that can be used to understand the implementation of the NETCONF protocol in Cisco E-DI.
This appendix includes the following information:
•Client Application Files
•Starting a NETCONF Session
•Making a NETCONF Request to the Cisco E-DI Server
•Ending the NETCONF Session
Client Application Files
The client is distributed as a set of three jar files, one startup script and a directory of example requests.
Copy the client files from Cisco E-DI Documentation CD-ROM to D:\eft\client. The structure should look similar to the structure in figure that follows.
Figure B-1 Typical Client File Structure
Starting a NETCONF Session
You will need the following information before you can create a NETCONF session:
1. The location of the Cisco E-DI server. For example, the localhost if it is running locally, or the IP address.
2. The username and password to login to Cisco E-DI.
3. The IP address of the device to be managed through the NETCONF protocol.
Start the client GUI, enter the following command:
The client GUI opens. See the following figure.
Figure B-2 GUI Example
Note The GUI has not connected to Cisco E-DI server yet.
Refer to the Cisco Enhanced Device User's Guide, 2.2.1 for information about operational modes such as session based device authentication, and IP-aliasing mode.
Table B-1 GUI Fields
The IP address or the name of the Cisco E-DI server.
Note If Cisco E-DI is running in IP-Aliasing mode and if the device to be managed is aliased, then that alias can be used in this field.
The login id on the Cisco E-DI server.
The password on the Cisco E-DI server.
Note If a device alias is used (as above), then the login and password should be that of the device.
Note If Cisco E-DI is running in session based device authentication mode, the credentials of the device are expected to be available on Cisco E-DI itself.
NC Session With Device
This is the IP address or the name of the device to be managed in this session.
Note If Cisco E-DI is running in IP-Aliasing mode and the device is aliased, then you can use the device alias in the 'EDI Server' field and skip filling this field.
The login id to be used by Cisco E-DI during device authentication.
Note In IP-Aliasing mode this field is disabled.
The password to be used by Cisco E-DI during device authentication.
Note In IP-Aliasing mode this field is disabled.
Enter the following information:
•Cisco E-DI server address (EDI Server field)
•Username (Login field)
•Password (Password field)
•Device IP address (NC Session with Device field)
•Device login—Required when session based device authentication is enabled.
•Device password—Required when session based device authentication is enabled.
Note Cisco E-DI can have session based device authentication enabled or disabled. The device credentials (device login and password) are required when session based device authentication is enabled. Otherwise, these credentials are optional.
Note When the session is established, the fields cannot be edited. To change the information, you will have to close the current client session, and open a new session.
Click Connect to E-DI.
When a session is created, the Session ID is added to the device IP field. The Connect to E-DI button now says Send Hello, and the button outline is colored cyan. See the figure that follows.
Figure B-3 Hello Message Exchange
Making a NETCONF Request to the Cisco E-DI Server
When a session with Cisco E-DI is created, you see a window similar to Figure B-3. When a client connects to Cisco E-DI, it sends a hello message from the NETCONF agent which contains the session id. In Figure B-3, the hello message is displayed in the response text area (lower left pane). The client extracts the session id, this is displayed in the Session id field.
The button is now Send Hello. As specified in the NETCONF protocol, both the agent (Cisco E-DI) and the manager (the GUI client) are required to send hello messages.
The default hello message from the client to Cisco E-DI is displayed in the request text area (upper left pane). You can edit this message, for example, to specify a different set of capabilities.
At this point, you can enter the device information (the device id, device login and password), and the tool will provide the associate-devices message which can be used after send hello is sent.
Note The tool now has a connection with the Cisco E-DI server, but Cisco E-DI does not know which device you want to manage through the XML PI.
Enter the device information, and click Send Hello.
The tool prepares the default associate devices message, and displays it in the request text area. See Figure B-4. Associate devices is a Cisco E-DI specific operation. It is required to inform Cisco E-DI about the device the client wants to manage through the XML PI.
Click Associate With Device.
Figure B-4 Associate With Devices
When Associate devices is successful, Cisco E-DI now knows which device is being managed in this NETCONF session, and is ready to start NETCONF operations. See Figure B-5.
You can now send protocol messages such as get-config, and edit-config. In the following example, the user navigates to the device specific get-config protocol message.
Figure B-5 Starting a NETCONF Operation
Note The NETCONF session is active when the first button reads Submit Request.
Know the Device Type
Each device type and OS combination has its own set of data model elements (the XSD). In operations where you have to express device commands in XML format, you will need to refer to the device specific namespace. The operations edit-config and get-config or get with filter will require this information.
An operation where the user is not expressing a specific command set in XML format does not need this namespace information. For example, lock is one operation which refers to a data store, and not configuration data.
If you do not know the device type, you can obtain the information from Cisco E-DI as follows:
Use an operation that does not require the namespace to be specified. For example, you can use a get operation without the filter element. This means that the get operation without a filter element looks the same no matter what device you are talking to. Select any get from any device specific example in the hierarchy in the right pane.
In Figure B-6, a get from the Cat6500 set of examples is selected, and the response shows that the device 172.25.86.106 is a Cisco2600.
Now that you know the device type, you can use the Cisco2600 specific example set. In this example, navigate through the hierarchy to locate the Cisco 2600 to see the running configuration of the device 172.25.86.106. See Figure B-7.
Figure B-6 Finding the Device Type
Figure B-7 Displaying the Running Configuration
Ending the NETCONF Session
When you want to close the session, you can use the close-session.xml file from the Sample requests in the right pane. You will see a window similar to Figure B-8.
Click Submit Request.
Note You can also click the Close button to close the window, and end the session.
Figure B-8 Closing a Session