On Wed, Mar 19, 2014 at 06:19:39PM +0100, Pino Toscano wrote:
On Tuesday 18 March 2014 16:08:55 Richard W.M. Jones wrote:
> Split virt-builder into build and customize steps, so that we can spin
> off a separate tool called 'virt-customize'. This commit does not in
> fact create such a tool, but it moves all the common code into a
> library, in the customize/ subdirectory of the source.
Sounds good at a first look.
While I tried few solutions to not make the list dynamic as the sysprep
operations, I didn't think about making generator do that :)
> Although this is mostly refactoring, it does change the order in which
> virt-builder command line arguments are processed, so they are now
> processed in the order they appear, not the inflexible fixed order
> used before.
I guess this won't matter that much, since people would have not been
able to rely on that before.
> customize/.depend | 30 +++
> customize/customize_cmdline.ml | 183 +++++++++++++
> customize/customize_cmdline.mli | 75 ++++++
These should be left out, I guess.
Yeah I will remove those in the second version.
I'm still wrestling with virt-sysprep, so not yet ...
> generator/customize.ml | 577
++++++++++++++++++++++++++++++++++++++++
Regarding this file: the only thing I would do now is split the actual
list of customize operations in an own file, just like actions.ml has
only the lists of actions.
I know the list of operations won't make this file that big as
actions.ml is, but still would be cleaner to have "data vs operations".
The special guestfish commands are actually in actions.ml, so
perhaps these should go there too.
OTOH actions.ml is very (too) big already.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v