virt: Add virsh net create/list/destroy functions

This patch adds functions about network to virt/libvirt_vm.py.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
client.shared.base_utils.py: Added function to get the cpu affinity of vcpu

Signed-off-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
client.virt.libvirt_vm.py: Added the functions to support virsh_vcpupin testcase

vcpupin(): to pin the vcpu to cpu
get_vcpus_pid(): to get the vcpu pid
virsh_qemu_monitor_command(): implements virsh qemu-monitor-command
virsh_vcpupin(): implements virsh vcpupin command
virsh_vcpuinfo(): implements virsh vcpuinfo command
virsh_vcpucount_live(): implements vcpucount command

Signed-off-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
libvirt.tests: to test virsh vcpupin test case

Added a file to test virsh vcpupin testcase and modified subtests.cfg to add the
support for the same

Signed-off-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
virt: Add SLES11 SP2 to guest list

Signed-off-by: Yury Tsarev <ytsarev@suse.com>
virt: SLES 11 SP2: Add open-iscsi to package list

So it is not installed during stage 2.

Signed-off-by: Yury Tsarev <ytsarev@suse.com>
client: xml_utils cleanup / clarifications

* Style cleanup
* Updated comments/docstrings
* Renamed class XMLBase -> XMLTreeFile for clarity
* Merged XMLTreeFile.readablefile() into __init__()
* Made XMLTreeFile.sourcebackupfile content uniform
* Made XMLTreeFile.sourcefilename content uniform
* Updated & enhanced unittests

Signed-off-by: Chris Evich <cevich@redhat.com>
virt: Add paused state in vm's preprocess

Allow controling running/paused state of vm by parameter within vm_preprocess()

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virt: Fix RHEL 6.3 cdrom iso name

Signed-off-by: Chris Evich <cevich@redhat.com>
virt.kvm.unittests: Change main vm unittest name

With the new virtnet, the previously stored vm1
by the unittests test was failing subsequent
unattended installs. It is not necessary to call
the unittest vm 'vm1', so let's change the name
and call this a day.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.tests.iostress: No need to chdir(self.srcdir) for twice

Currently,in func setup,exec the  os.chdir(self.srcdir) for twice,
It is no need to do so

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
koji: fix wording when describing invalid package specification

Changes from v1:
 * More correct wording as suggested by lmr

Signed-off-by: Cleber Rosa <crosa@redhat.com>
koji: introduce koji_pkgspec tool

A quick and dirty tool for finding out exactly what packages
will be fetched and installed on a system based during a virt
test that uses a KojiInstaller.

This tool can fetch the information directly from a cartesian config
file, provided that it has the *right* configuration keys. Currently
this is hard coded to users of the kvm test, and looks for the
'koji_qemu_kvm_tag' and 'koji_qemu_kvm_pkgs' configuration keys.

Sample usage, query information about build id 123:

./koji_pkg_spec.py 123

Query information about build a given tag and many packages:

./koji_pkg_spec.py -t RHEL-6.3 qemu-kvm spice-server

Query information in a cartesian configuration file:

./koji_pkg_spec.py -c client/tests/kvm/build.cfg

Changes from v1:
 * Better adhere to the autotest import code style, import module
   instead of individual symbols inside a module.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
add 'Category' label to split subtests in results

Use 'Category' to split results to different blocks,
regression.py will compute 'Total Significance' for
each block.

Signed-off-by: Amos Kong <akong@redhat.com>
compute 'Total Significance' for each category

Signed-off-by: Amos Kong <akong@redhat.com>
update netperf test to store results to D.B

Use test.write_perf_keyval() to store results to table in
Autotest database, use test.write_test_keyval() to record
test environment info to database.

Signed-off-by: Amos Kong <akong@redhat.com>
virt performance: store perf result to D.B

Currently we only store performance results to files,
it's simple and convenient. This patch added a new interface,
the raw results would be stored to database of Autotest
server.

Original file interface is reserved, it can work without
Autotest server.

examples:
@ cd client/tools/
@ python regression.py netperf database 98 99
@ python regression.py netperf file /results/98-debug_user/ \
         /results/99-debug_user/

Signed-off-by: Amos Kong <akong@redhat.com>
virt: Add option log_func to QemuIO

Add option log_func to QemuIO to help user to record the
informations in different levels.
Also fix the problem caused by the scripts will try to call
output_func when it is None.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
client.tests.dacapo: Move cache dir to parent dir of self.srcdir

Currently,in test case dacapo,it put the cache dir,which used to put
the download files in it, down to self.bindir.
Now change the cache dir to parent dir of self.srcdir, that is to
say by default is client/tmp/dacapo/cache

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
client.tests.lsb_dtk: Move cache dir to parent dir of self.srcdir

Currently,in test case lsb_dtk,it put the cache dir,which used to put
the download files in it, down to self.bindir.
Now change the cache dir to parent dir of self.srcdir,that is to
say by default is client/tmp/lsb_dtk/cache

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>