virt: fix a typo

Found while investigating a network issue

Signed-off-by: Cleber Rosa <crosa@redhat.com>
client.harness_autoserv: Make AutoservFetcher call parent's init()

The AutoservFetcher object constructor used to not call
its parent constructor. However, the work to support
a GitFetcher moved some methods to common code, and now
it is necessary to call install_pkg_setup, that does
require the setup made by the parent's constructor.

This patch fixes the following problem, when running
a simple sleeptest using the web interface:

07/30 17:31:44 DEBUG|  parallel:0030| AttributeError: 'AutoservFetcher' object has no attribute 'pkgmgr'

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.shared.base_packages: pass full package name

Restore the old code behavior of passing the full
tarball name to the underlying code, and only parse
the tarball name in case we need the package name
and type back, such as we have with git packager.

This resolves a regression using the autoserv packager
as a package provider for autotest jobs (the default
using the web interface).

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virt: Fix SLES 11 installation bug

Fix bug of sles-release fetching on Stage2 of
installation by patching up a yast packages module.

Signed-off-by: Yury Tsarev <ytsarev@novell.com>
virt: Fix index judge problem when setup host_setup_flag

The last_index should be the number of the dicts minus one. And
Should not use if... else ... for the parameter setup. If we run
single case then that case will be both the first and last one
in the parser.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
client/virt/tests/rv_connect.py: Prevent killing remote_viewer after test finish

There was a bug which caused gnome-session kill after the test ends. This caused that remote-viewer was killed too.
NOHUP had no influence to change this behavior. DISOWN gnome-session and remote-viewer processes works time to time.

This patch removes get_pid() method which was needed for disown gnome-session and remote-viewer process. And adds disown -ar to all processes running on VM.

After that remote-viewer is running and it's possible to call for example rv_disconnect test.

Signed-off-by: Vaclav Ehrlich <vehrlich@redhat.com>
Signed-off-by: Marian Krcmarik <mkrcmari@redhat.com>
virt.virt_test: Fix wrong variable name for subtest directory

Signed-off-by: Plamen Dimitrov <plamen.dimitrov@intra2net.com>
client.shared.test: Copy source code dir to new test.srcdir

Recently we've changed the test modules to be 'read only',
that is, we don't want anything to write to the test modules
dir, since autotest might be installed on a system wide
location. However, some autotest tests do have source
code directories on them, and currently they'll fail to
run, since now test.srcdir points to a different directory.

So verify whether the source code dir 'src' exists inside
the test module dir, if so, copy the source contents to
the test.srcdir temporary directory.

This patch fixes a bug where tests such as hackbench,
aio_dio_bugs and others were failing to run.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
tests.ffsb: Copy profile to parent of test.srcdir

Following the work of making the profile file available
with the new schema of test module directories read only.

This patch fixes a bug where the ffsb module was failing
to run due to absence of a profile.cfg file in the parent
directory of test.srcdir.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.shared.test: Copy patch files to parent of test.srcdir

A bunch of autotest tests do rely on using patch files
to fix/tweak an upstream shipped test tarball. With the
new schema 'test module read only', a series of expectations
of the tests (patch file located on parent of test.srcdir)
is being broken. So copy each patch file found on the test
module to the test tmp area, parent of srcdir.

This patch fixes tests such as bonnie, that rely on such
patches for proper test suite execution.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Mass indentation fix in the autotest tree

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
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: Introducing virt_v2v module

With this module, we will be able to implement a virt-v2v test.

As of implementation details, we uses virt-v2v command line tool
to convert an existing VM into libvirt-managed KVM, or an open
manageable virtualized environment - oVirt.

v2:
 - Fix a typo, s/autoorization/authorization/.
 - Improve codes docstring.
 - Remove unused variables.
 - Directly return cmd_result.

Signed-off-by: Alex Jia <ajia@redhat.com>
Signed-off-by: Wayne Sun <gsun@redhat.com>
virt: Introducing virt_v2v_utils module

It's a common virt-v2v test assistant module, which provides some
necessary class/functions with virt-v2v testing.

v2:
 - Fix typos, s/fucntion/function/, s/TARGERT/Target/.
 - Fix some platform relevant codes issues.
 - Rename check_vmware_tools() to has_vmware_tools() and fix return
   value issue.
 - Improve build_esx_no_verify() and add some judgements.
 - Change get_*_uri() and get_*_options() to private functions.
 - Fix session close issues in functions of the class LinuxVMCheck.
 - Improve codes docstring.

Signed-off-by: Alex Jia <ajia@redhat.com>
Signed-off-by: Wayne Sun <gsun@redhat.com>