strongswan/src/libcharon/plugins/vici/python
Tobias Brunner ecf161e517 vici: Move Python test dir and include it in sdist
This is the recommended location and import config as it allows running the
tests against installed versions of the package.  And while the test file
itself is automatically included in the source distribution this way, the
__init__.py file is not, so we still have to update MANIFEST.in.
2020-01-14 16:53:19 +01:00
..
test vici: Move Python test dir and include it in sdist 2020-01-14 16:53:19 +01:00
vici vici: Move Python test dir and include it in sdist 2020-01-14 16:53:19 +01:00
.gitignore vici: Add tox.ini to run tests with tox 2020-01-14 15:26:29 +01:00
LICENSE vici: Move event (un-)registration to a helper method in Python library 2015-08-17 11:12:17 +02:00
MANIFEST.in vici: Move Python test dir and include it in sdist 2020-01-14 16:53:19 +01:00
Makefile.am vici: Move Python test dir and include it in sdist 2020-01-14 16:53:19 +01:00
README.rst vici: Add README.rst to be used as description on PyPI 2016-05-11 11:16:43 +02:00
setup.py.in vici: List newer Python versions in setup.py 2020-01-14 10:48:53 +01:00
tox.ini vici: Add tox.ini to run tests with tox 2020-01-14 15:26:29 +01:00
tox.sh vici: Run Python tests via tox if available 2020-01-14 15:26:52 +01:00

README.rst

About
-----

The strongSwan VICI protocol allows external applications to monitor, configure
and control the IKE daemon charon. This Python package provides a native client
side implementation of the VICI protocol, well suited to script automated tasks
in a reliable way.


Example Usage
-------------

.. code-block:: python

    >>> import vici
    >>> s = vici.Session()
    >>> s.version()
    OrderedDict([('daemon', b'charon'), ('version', b'5.4.0'),
    ('sysname', b'Linux'), ('release', b'3.13.0-27-generic'), ('machine', b'x86_64')])
    >>> s.load_pool({"p1": {"addrs": "10.0.0.0/24"}})
    OrderedDict([('success', b'yes')])
    >>> s.get_pools()
    OrderedDict([('p1', OrderedDict([('base', b'10.0.0.0'), ('size', b'254'),
    ('online', b'0'), ('offline', b'0')]))])