Use one write with heredocs and move to the with statement as per PEP343
Switch over to using lxml instead of libxml2

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Validate the TDL schema.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Appease MacOSX for tests.
Fix up unit tests.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
StringIO is in the io module in Python 3
Remove dead code paths in `_parse_disksize()`
Fix a small bug in icicle generation from lxml conversion.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Make sure to sleep while doing ssh connection test.

If an ssh connection test failed very quickly, we could
burn through all of our tries before sshd in the guest
could ever had a chance to start.  Instead, make sure we
do a sleep in the loop if the ssh command very fast.
Also add some extra debug statements so it is easier to
debug this issue.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Fix an OpenSUSE bug introduced by lxml conversion.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Fix ssh timeouts on Ubuntu and OpenSuse as well.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Fix up more fallout from "with" conversion.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Remove 2 FIXME comments that no longer apply.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Don't use default arguments of lists or dictionaries.

This probably doesn't matter in practice for us, but is
good practice nonetheless.  Default arguments as lists or
dictionaries are dangerous in python, since they can be
modified by the called function, and will retain that
value.  Just use None as the default value instead.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Fix more fallout from lxml conversion.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Make a LinuxCDClass

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Remove tunnels.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
new: Module to install FreeBSD 10.0.

It uses the same aproach that is used with Windows installation, where the iso is modified to incorporate a rules file. Bsdinstall reads such a file (from /etc/) and install the new system according to the rules and scripts found inside. After installing the base groups it's possible to install additional packages specified in the tdl. Running extra commands is not yet possible.

Now all FreeBSD needs is cloud-init so the resulting image can be
deployed and used in the cloud.
fix: Configure the proper shutdown method otherwise it wants to reboot. fix: FreeBSD doesn't need any reboots during setup.
Remove deprecated functions