strongswan/src/libcharon/plugins/vici/python
Tobias Brunner 2610cd7928 vici: Decode error messages in Python bindings
Otherwise we might end up with b'<errmsg>' in the output.
2021-01-18 17:39:15 +01:00
..
test vici: Move Python test dir and include it in sdist 2020-01-14 16:53:19 +01:00
vici vici: Decode error messages in Python bindings 2021-01-18 17:39:15 +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: Don't use pytest-pycodestyle with Python 3.5 2020-08-17 15:22:34 +02: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')]))])