From: Shikhar Bhushan Date: Tue, 22 Sep 2009 15:23:38 +0000 (+0000) Subject: docu X-Git-Tag: 0.2a~22 X-Git-Url: https://code.grnet.gr/git/ncclient/commitdiff_plain/84e0f4f21796acf44731089ab6637e7d619a0b91 docu git-svn-id: http://ncclient.googlecode.com/svn/trunk@186 6dbcf712-26ac-11de-a2f3-1373824ab735 --- diff --git a/docs/source/extending.rst b/docs/source/extending.rst new file mode 100644 index 0000000..2da8fd4 --- /dev/null +++ b/docs/source/extending.rst @@ -0,0 +1,4 @@ +Extending ncclient +================== + +Here it is briefly discussed how new transport mappings and new operations can be added. \ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/index.rst index de187de..bb54272 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,10 +1,33 @@ ncclient documentation ====================== +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. + +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: + +* Supports all operations and capabilities defined in :rfc:`4741`. +* Request pipelining. +* Asynchronous RPC requests. +* Keeping XML out of the way unless really needed. +* Extensible. New transport mappings and capabilities/operations can be easily added. + +The best way to introduce is of course, through a simple code example:: + + from ncclient import manager + + # use ssh-agent or ~/.ssh keys for auth, and relying on known_hosts + with manager.connect_ssh("host", username="username") as m: + assert(":url" in manager.server_capabilities) + with m.locked("running"): + m.copy_config(source="running", target="file:///new_checkpoint.conf") + m.copy_config(source="file:///old_checkpoint.conf", target="running") + Contents: .. toctree:: - :maxdepth: 2 + + manager + extending Indices and tables ================== @@ -12,4 +35,3 @@ Indices and tables * :ref:`genindex` * :ref:`modindex` * :ref:`search` - diff --git a/docs/source/manager.rst b/docs/source/manager.rst new file mode 100644 index 0000000..2aaa935 --- /dev/null +++ b/docs/source/manager.rst @@ -0,0 +1,4 @@ +High-level API +============== + +Most use-cases are met by using the high-level :class:`Manager` API. \ No newline at end of file