guest-os.cfg: Purging unused guest OS

Our config file has been carrying out a bunch of guest
OS that are way too old, and nobody has been using them.
Let's purge those, and when we get to a point where
the step engine is more widely used, we can add new
legac guests.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
run: Add general option --list-guests

Although we want JeOS to be as flexible and useful for
people as possible, it may not be the best option for
all people. Therefore, make it possible for people to
choose which guest OS they want to use with the tests.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
run: Add general option --guest-os (-g)

Make it possible to select which guest OS to select for
the given test run. Besides from JeOS, other guest OS
require that the user download the pre-installed images.

Some additional patches add the ability to display which
images had already been downloaded.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
standalone_test: Inform user which guest OS images are missing

In order for the --list-guests options to be useful, check
whether the appropriate qcow2 images are available, and
if not, tell the user that the given image is missing.

By default, after bootstrap only the JeOS should be
available, all other guest images should be missing.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
stepmaker: If no step file found on params, create one

In order to automate more the creation of a new step
file, create one based on the image name params rather
than failing the test.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
run: Pick guest-os.cfg from the test type dir

Since we plan on auto generating guest-os.cfg, let's
parse the file in the test dir rather than the shared
resource.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
standalone_test: Create a function to decide when to shorten names

Also, put an additional constraint in that function, which
is to only shorten names when using JeOS.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
stepmaker: Don't stop if step file already exists

1) If a step file was deleted by mistake, git will catch it.
2) It'll make it easier for people running stepmaker tests.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
stepmaker: Use current APIs

Change methods in run_stepmaker to make it look like
a recent virt test. Also, cleanup an unneeded import.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
stepmaker: Cleanups

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
steps: Make it use current APIs
qemu_monitor: Fix arguments passed to string formatting

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
qemu - tests.cfg - Reorganizing options

Setting the qemu binaries is not necessary anymore, and
some other options are going to be removed in order to
make them configurable.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
run: Add qemu specific option --smp

Add a --smp option to the run command line, that will
allow people to configure the number of virtual CPUs of
the qemu based vm.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
run: add qemu specific options --image-type, --nic-type, --disk-bus

Make it possible to configure both image type,
nic type and disk bus. Valid options would be valid
image types and nic types for qemu. Disk buses have
a more restricted option set, properly explained
in the help text.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Auto generate guest-os.cfg

In order to simplify adding new guest os files, split
it and arrange it in a directory structure, very much
like it was done with subtests.cfg. This way it is
possible to define a new guest os dropping a snippet
as simple as:

- guest.name:
    image_name = images/guest-name

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Add new guest-os cfg dir

This is the result of splitting guest-os.cfg. Now it is
possible to define new guests by dropping files to appropriate
locations inside this dir structure.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Add LinuxCustom and WindowsCustom variants to guest-os structure

Add a bunch of config helpers for both Linux and Windows
guests, and put README files to help people with the task
of setting a new guest.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
unattended_install: Fix installation for user networking

With commit bd50d1d9, we changed the behavior of the
API utils_net.get_ip_address_by_interface, so that
it throws an exception if we could not get the interface.

This broke unattended_install when using userspace nw,
so let's fix it by handling the exception and assigning
None to the auto_ip in case the call fail, reproducing
the original (pre bd50d1d9) behavior.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
run: Reorganizing option parsing, clarifying flags usage

We did miss the fact that a bunch of our new command
line flags were breaking -c usage, given that those
new flags parsed "only" filters to the existing cartesian
configurations.

So reorganize the general options parsing, and carefully
review which options can go with -c and which ones will
be ignored, documenting this on --help output.

This also resolves one of the requests from Igor Mammedov,
of not compulsorily setting --qemu-bin when using custom
config files. So if -c is provided and no --qemu-bin was
provided in the command line, no attempt to set it will
be made. Of course, that was also explained in the --help
output.

CC: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>