[strongSwan-dev] Python vici library

Martin Willi martin at strongswan.org
Mon Mar 2 15:45:31 CET 2015


Björn,

> Your README.rst is not yet part of it, probably we should integrate
> that to the vici README.md.

I've updated our vici README.md [1] to include some basic steps to get
started with the python library.

In addition, I'd like to propose a minor change to the main Session
command calls. Instead of returning a CommandResult, I'd prefer to raise
a CommandException if a command failed [2].

While I think implicit error checking with exceptions makes sense, the
main reason for that change is that it allows us to return generators
for streamed objects [3]. I think that is favorable, especially as some
longer lasting commands return immediate feedback when called
interactively. For example, the initiate() command directly returns
streamed log messages, long before the command finally succeeds or
fails.

Please let me know what you think about these changes.

Best regards
Martin

[1]https://github.com/strongswan/strongswan/blob/vici-python/src/libcharon/plugins/vici/README.md#vici-python-egg
[2]http://git.strongswan.org/?p=strongswan.git;a=commitdiff;h=713d2f42
[3]http://git.strongswan.org/?p=strongswan.git;a=commitdiff;h=ec599c65



More information about the Dev mailing list