# The short X.Y version.
version = '0.1'
# The full version, including alpha/beta/rc tags.
-release = '0.1.1a'
+release = '0.1.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
from ncclient import manager
- with manager.connect_ssh('host', 'username') as m:
+ # use ssh-agent or ~/.ssh keys for auth, load known_hosts by default
+ 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")
-It is recommended to use the high-level :class:`Manager` API where possible. It exposes almost all of the functionality.
+It is recommended to use the high-level :class:`Manager` API where possible. It exposes all of the functionality except asynchronous RPC requests.
**********************
-:mod:`content` module
+:mod:`xml_` module
**********************
.. automodule:: ncclient.xml_
if not reply.ok:
if self._raise == RAISE_ALL:
raise reply.error
- elif self._raise == RAISE_ERROR:
+ elif self._raise == RAISE_ERR:
for error in reply.errors:
if error.severity == 'error':
raise error
taking delivery of the reply.
"""
- # : Subclasses can specify their dependencies on capabilities. List of URI's
+ #: Subclasses can specify their dependencies on capabilities. List of URI's
# or abbreviated names, e.g. ':writable-running'. These are verified at the
# time of object creation. If the capability is not available, a
# :exc:`MissingCapabilityError` is raised.
DEPENDS = []
- # : Subclasses can specify a different reply class, but it must be a
+ #: Subclasses can specify a different reply class, but it must be a
# subclass of :class:`RPCReply`.
REPLY_CLS = RPCReply
:exc:`MissingCapabilityError` will be raised if the capability is not
available."""
if capability not in self._session.server_capabilities:
- raise MissingCapabilityError('Server does not support [%s]' % cap)
+ raise MissingCapabilityError('Server does not support [%s]' %
+ capability)
def deliver_reply(self, raw):
# internal use
SPEC = { 'tag': 'close-session' }
- def _delivsery_hook(self):
+ def _delivery_hook(self):
self.session.close()
def request(self):