Revision 09e50473 docs/source/index.rst
b/docs/source/index.rst | ||
---|---|---|
1 |
ncclient documentation
|
|
2 |
======================
|
|
1 |
Welcome
|
|
2 |
======= |
|
3 | 3 |
|
4 |
ncclient is a Python library for NETCONF clients. NETCONF is a network management protocol defined in :rfc:`4741`. It is suitable for Python 2.6+ (not Python 3 yet, though), and depends on paramiko, an SSH library. |
|
5 |
|
|
6 |
The objective is to offer an intuitive API that sensibly maps the XML-encoded parameters of NETCONF to Python constructs and idioms. The other features are: |
|
4 |
``ncclient`` is a Python library for NETCONF clients. It aims to offer an intuitive API that sensibly maps the XML-encoded nature of NETCONF to Python constructs and idioms, and make writing network-management scripts easier. Other key features are: |
|
7 | 5 |
|
8 | 6 |
* Supports all operations and capabilities defined in :rfc:`4741`. |
9 | 7 |
* Request pipelining. |
... | ... | |
11 | 9 |
* Keeping XML out of the way unless really needed. |
12 | 10 |
* Extensible. New transport mappings and capabilities/operations can be easily added. |
13 | 11 |
|
12 |
It is suitable for Python 2.6+ (not Python 3 yet, though), and depends on `paramiko <http://www.lag.net/paramiko/>`_, an SSH library. |
|
13 |
|
|
14 | 14 |
The best way to introduce is of course, through a simple code example:: |
15 | 15 |
|
16 | 16 |
from ncclient import manager |
17 | 17 |
|
18 |
# use ssh-agent or ~/.ssh keys for auth, and relying on known_hosts
|
|
19 |
with manager.connect_ssh("host", username="username") as m:
|
|
18 |
# use unencrypted keys from ssh-agent or ~/.ssh keys, and rely on known_hosts
|
|
19 |
with manager.connect_ssh("host", username="user") as m: |
|
20 | 20 |
assert(":url" in manager.server_capabilities) |
21 | 21 |
with m.locked("running"): |
22 | 22 |
m.copy_config(source="running", target="file:///new_checkpoint.conf") |
... | ... | |
27 | 27 |
.. toctree:: |
28 | 28 |
|
29 | 29 |
manager |
30 |
api |
|
30 | 31 |
extending |
31 | 32 |
|
32 | 33 |
Indices and tables |
33 |
==================
|
|
34 |
------------------
|
|
34 | 35 |
|
35 | 36 |
* :ref:`genindex` |
36 | 37 |
* :ref:`modindex` |
Also available in: Unified diff