Statistics
| Branch: | Tag: | Revision:

root / docs / source / intro.rst @ 0b7d3b31

History | View | Annotate | Download (1 kB)

1 216bb34c Shikhar Bhushan
*************
2 216bb34c Shikhar Bhushan
Introduction
3 216bb34c Shikhar Bhushan
*************
4 216bb34c Shikhar Bhushan
5 0b7d3b31 Shikhar Bhushan
NCClient is a Python library for NETCONF clients. NETCONF is a network management protocol defined in :rfc:`4741`.
6 0b7d3b31 Shikhar Bhushan
7 0b7d3b31 Shikhar Bhushan
It is meant for Python 2.6+ (not Python 3 yet, though).
8 216bb34c Shikhar Bhushan
9 216bb34c Shikhar Bhushan
The features of NCClient include:
10 216bb34c Shikhar Bhushan
11 216bb34c Shikhar Bhushan
* Request pipelining.
12 216bb34c Shikhar Bhushan
* (A)synchronous RPC requests.
13 216bb34c Shikhar Bhushan
* Keeps XML out of the way unless really needed.
14 216bb34c Shikhar Bhushan
* Supports all operations and capabilities defined in :rfc:`4741`.
15 216bb34c Shikhar Bhushan
* Extensible. New transport mappings and capabilities/operations can be easily added.
16 216bb34c Shikhar Bhushan
17 216bb34c Shikhar Bhushan
The best way to introduce is of course, through a simple code example::
18 216bb34c Shikhar Bhushan
19 216bb34c Shikhar Bhushan
    from ncclient import manager
20 216bb34c Shikhar Bhushan
21 216bb34c Shikhar Bhushan
    with manager.connect_ssh('host', 'username') as m:
22 216bb34c Shikhar Bhushan
        assert(":url" in manager.server_capabilities)
23 216bb34c Shikhar Bhushan
        with m.locked('running'):
24 216bb34c Shikhar Bhushan
            m.copy_config(source="running", target="file://new_checkpoint.conf")
25 216bb34c Shikhar Bhushan
            m.copy_config(source="file://old_checkpoint.conf", target="running")
26 216bb34c Shikhar Bhushan
27 216bb34c Shikhar Bhushan
It is recommended to use the high-level :class:`Manager` API where possible. It exposes almost all of the functionality.