While the previous implementation has served us well, it was
very quickly cobbled together using a language that's not really
suitable for the purpose; the fact that we had to embed a Perl
(previously Python) script in there is a clear indication that we
had outgrown the language pretty much from the get go, and while
I'm weirdly proud of the hackish way I implemented inventory
handling I'll take a proper YAML parser instead any day :)
The new implementation is not quite a drop-in replacement, but
getting used to it should take very little time; most importantly,
the new command line syntax lends itself to being extended in
ways that had simply been impossible previously, and we're going
to take advantage of the fact very soon when we integrate the
Dockerfile generator (see [1]) and [secret feature redacted].
We also get some minor but neat improvements like much better
host list handling and XDG_CONFIG_HOME support. The script is
compatible with both Python 2.7 and Python 3, and doesn't rely
on any downstream patch being applied to the former.
I'm absolutely not great at Python, so any input on style and
such will be greatly appreciated.
[1]
https://www.redhat.com/archives/libvir-list/2018-June/msg01238.html
Andrea Bolognani (8):
lcitool: Drop shell implementation
lcitool: Stub out Python implementation
lcitool: Add tool configuration handling
lcitool: Add inventory handling
lcitool: Implement the 'list' action
lcitool: Implement the 'install' action
lcitool: Implement the 'update' action
guests: Update documentation
guests/README.markdown | 8 +-
guests/lcitool | 585 +++++++++++++++++++++++++----------------
2 files changed, 366 insertions(+), 227 deletions(-)
--
2.17.1