pynetconf
libnetconf wrapper for Python
|
Example applications using the libnetconf Python API are located in the source tree inside the libnetconf/python/examples/
directory.
Simple client-side application printing the result of the NETCONF <get> operation.
Very simple (4 LOC) NETCONF server server.py
is alternative to the Netopeer's single-layer server.
To see, how the server interacts with a client, you can run it from the command line and communicate with the server interactively (if you don't understand the following lines, and you want to, read RFC 6241 and RFC 6242):
However, the more usual way how to use it, is to set your SSH server to run it as its netconf
SSH Subsystem. In this case, the server is started automatically when client connects to the host. To configure your SSH server this way, add the following line to the /etc/ssh/sshd_config
file.
Also remember to correctly set the port where the SSH server listens. By default, it listens on port 22, but NETCONF has assigned port 830 and the most of clients use it by default.
And finally, don't forget to make the SSH server reload the changed configuration.