virt: Don't automaticly update network prop. cache

Just about everywhere that changes networking info. calls
to update the database afterward.  However, the code was
also updating the database automatically on every get/set
of in-memory values.  This was causing enormous amount of
extranious and unnecessary lock activity.  This was causing
severe lock contention in some multi-vm, multi-thread tests.

Signed-off-by: Chris Evich <cevich@redhat.com>
JeOS: Add some extra packages required for virt-tests

This is a solution for issue #115.

Add kbd, bind-utils, vconfig, to fix tests linux_s3,
nic_hotplug.default, vlan.

Also, do not regenerate initrd, as this may cause problems
with grub.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
JeOS: Enable update repos and clean yum cache at the end

Since the Fedora GA might have some bugs that might hurt
testing, enable the updates repo and install from it, so
we have an up to date Fedora image at install time. Clean
the yum package cache, and after install is done, the
qcow2 image will be scrubbed, to make it smaller.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
utils_net_unittest: Fix duplicated function signature

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
run: Terminate all threads upon Ctrl+C

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
base.cfg: Remove explicit set of drive cache

In a default Ubuntu 12.04 install, the option cache=none
was breaking virt tests. Since this is not a particularly
critical config, leave it commented so the default
cache for each platform to be chosen.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
standalone_test: Change the order of the env cleanup

So if by a chance the current cartesian conf did not
generate any dicts, we avoid displaying a raw IterationStop
exception to the user.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
run: Try to make a good effort to find the qemu path

Different distros tend to name their qemu components
differently. Try to do the best to guess where the
component is, to avoid failing tests out of necessity.

With this, in Ubuntu, Fedora and RHEL it is possible
to run the tests and have the code to figure out the
correct qemu path automatically.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virt: add complete_uri() to libvirt_vm.

To combinate an ip or a hostname with local uri.

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virt-libvirt: add configuration for virsh setvcpus

Signed-off-by: Li Yang <yumingfei@cn.fujitsu.com>
virt-libvirt: add vcpuinfo function for virsh setvcpus

Signed-off-by: Li Yang <yumingfei@cn.fujitsu.com>
virt-libvirt: add set_vm_vcpus function for virsh setvcpus

Signed-off-by: Li Yang <yumingfei@cn.fujitsu.com>
virt-libvirt: Make set_vm_vcpu() into staticmethod

Since only this single operation is being performed and caller doesn't
care about further XML operations or return value, use a staticmethod.
Exchange 'self' for a local 'vmxml' instance produced by xmldump.  This
way we can let accessor methods deal with value as appropriate.  Also
added docstring describing parameters.

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: add test for virsh setvcpus

Signed-off-by: Li Yang <yumingfei@cn.fujitsu.com>
virt-libvirt: add virsh setvcpus function

Signed-off-by: Li Yang <yumingfei@cn.fujitsu.com>
bootstrap: Better verification of testsuite dependencies

Introduce a list of mandatory commands (and includes),
required for each subtest. Check them all and fail if
some is missing. Do the best to guide the user through
the process.

Reorganize the bootstrap procedure to check those at
the very beginning of the process.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
common.py: Point out the autotest-framework package

If the autotest libs can't be found, point the other
possible solution: Installing the autotest-framework
package (currently available only for Fedora).

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
bootstrap: Better check of recommended programs

If one is trying out the virt tests, the person might
be able to just use the kvm distro shipped packages to
play a little. Do a better job of finding the distro
commands, and if some of them can't be found, tell the
user that if he/she is not building the command from
source, it is better to install the mentioned command.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
bootstrap: Use find_command to find required commands

On OpenSUSE, tcpdump is installed under /usr/sbin. Let's
use the more thorough find_command to find all commands.

Also, fix a couple of bugs with find_command.

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