Clean up the examples/ directory.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Add more unit tests.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Add a check for an x86_64 install on an i386 host.

This can never work, so ensure it here.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Slight cleanup in oz-install for 80 columns

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Add the ability to generate ICICLE safely

This patch allows users to generate ICICLE while preserving the
pristine content of the original image generated by the native
installer.  This avoids embedding the results of "first boot" type
tasks such as the generation of SSH keys and the initialization of
log files.

This is particularly useful when generating images for cloud targets
using custom install scripts and no customization in the TDL itself.

It works by running the ICICLE step against a temporary qcow2 disk
image which uses the "real" image as a backing store.  All writes
are done to the qcow2 image which is discarded when ICICLE generation
is complete.

This features is a new option in the config file and is disabled
by default.

For the moment it only works with RPM/Anaconda distros but could
likely be extended to support any OS for which ICICLE can be generated.
Fix Ubuntu 12.04.2 amd64 install.

For reasons I don't understand, Ubuntu changed
the name of the kernel on the 12.04.2 amd64
boot CD from vmlinuz to vmlinuz.efi.  Add a
special case for it.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Fix up a bug pointed out by pylint.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Add support for Ubuntu 13.04 (Stable release on 25th of April) and add in 12.04.2 (Mid Feb)
Clean up imports and various other smaller items

- Import OzException directly instead of referencing the full package name
- Import various os.path and oz.ozutil functions to more readable and shorter lines
- Replace multiple write() calls with a single multi line write() call
Move to a more versatile subprocess.popen wrapper.

This wrapper is still mindful of the 64kb limit of subprocess.PIPE and provides handy debug functionality.
It also moves into its own file / class under a new utils directory to reduce the size of ozutil

Various Guest OS classes moved to using that implementation.

Command.run() accepts the command as a python list as a first param, with additional parameters, such as extra ENV items, CWD and a debug function to be used with the track generator. A timeout can be defined for each run, allowing us to be rigid about how long each command runs.

Command.run() returns a Response object with exit (status code), output (stderr and stdout) and command as its properties.

CommandException is the new exception class around it all
Ensure utils get installed as well
Move the scp and ssh functionality to the Command class
Pass in the self.log.debug() function that Guest has into all available Command.run().

This way Command.run(), ssh() and scp() don't really care what kind of debug functions they get and they can stay dump
Only have ssh and scp commnands run the debug info
Move executable_exists under a command test file
remove unused import
Remove redundant returns on guest_execute_command(). None of them were used.
Sync with main implementation
fix typo