utils.run_pylint: Remove import warnings

Since there are *way* too many false positives with
the system wide install work.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
tko: Add new keyword arguments for the plot() call

During a code change, the authors forgot to update
the interface for the method plot() of the gnuplot
class, causing an error when calling that method.

So, let's update the code to include the missing
parameters referenced by the callers of that method.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.bin.harness_standalone: Fix indentation

That was off from commit 37d94e95bc1e315839f782328523c93aea9baecc.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virt.save_restore: Fix py 2.4 non compliances

Also, fixed a typo.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
libvirt: Fix virsh_cmd to raise exceptions on error

Most calls to virsh_cmd() were not able to detect any errors
or examine the command's stdout content.  This patch changes
the behavior or virsh_cmd() to raise a CmdError exception if
the command resulted in a non-zero exit.  The CmdResult
instance is passed through the exception for later
examination or printing where useful.

Signed-off-by: Chris Evich <cevich@redhat.com>
libvirt: Fix/Enhance virsh_cmd() calls exception handling

Signed-off-by: Chris Evich <cevich@redhat.com>
virt.libvirt: Add migration function and test

This patch adds a migrate() function for libvirt, which is a
encapsulation for "virsh migrate" command.

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
virt.libvirt: Add migration test configuration

This adds configuration for "virsh migrate" test.

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
virt.libvirt: Add virsh migrate test

This patch tests the "virsh migrate" command with --live parameter.

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
virt.libvirt: Simplify vm.migrate() and virsh_migrate()

Rather than lock the code into the implementation details of particular
virsh options, just code for the minimum necessary.  However, expose
a set of free-form variables tests can use to exercize more specific
options.

Signed-off-by: Chris Evich <cevich@redhat.com>
virsh_migrate test: Match test code with vm.migrate() changes

Signed-off-by: Chris Evich <cevich@redhat.com>
libvirt migration: Updated/Commented virsh migration test config

Signed-off-by: Chris Evich <cevich@redhat.com>
libvirt migrate: Add delay, config update, fix typo

Signed-off-by: Chris Evich <cevich@redhat.com>
virt.libvirt_vm: Warn user when screenshots are not supported

Apparently some versions of virsh shipped around miss the
'screenshot' command, in that case, print an error message
and suggest the user to turn off regular screenshot taking
on tests.cfg rather than let this relatively minor problem
stop the tests.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client: Cleaning up namespace for system wide install

When using a system wide install, the default namespace is 'autotest'.
Using 'from autotest.client.bin' should look under the system path
to get the right files (ie /usr/lib/python2.6/site-packages).

However, when importing from a local file, in the case of autoserv.py,
the autotest module used is the local one from inside directory where
the system wide autoserv.py is used (ie /usr/lib/python2.6/site-packages/
autotest/server/autotest.py). We don't want that one because their is
no client module below it.

Instead we want autotest to recognized as the system wide library (ie
/usr/lib/python2.6/site-packages/autotest).

This is the client part of the cleanup, server part follows up.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
server: clean up the namespace for system wide install

IMPORTANT: Very disruptive change ahead!

In order to avoid namespace collision,
autotest_lib.server.autotest was moved to
autotest_lib.server.autotest_remote. This has
serious implications for all parties maintaining
server side control files, as they will have to
rename their calls to autotest with new calls to
autotest_remote.

With this patchset, execution of server control
files through autoserv is working ok, considering
the limited testing I've made.

So, please, if you are one of the interested parties,
review this patchset and let us know your opinion.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Autotest namespace setup: Allow searching on sys.path

In order to support users wanting to install the autotest
modules as system wide libraries, modify all common.py files
to try importing the setup_modules module as a normal
system wide python module, and fail back to the traditional
method of loading the same module (figure out by relative
positioning of the file).

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Convert entry points to use system-wide autotest libs v3

If it fails, fallback to the approach used for single
directory layout (just import common).

Changes from v2:
 * Fixed patch to take into account the namespace cleanup
   patches

Changes from v1:
 * dzickus found a typo in client/setup_modules.py and fixed it
 * mkrizek found that in some points we should import
   autotest.common as common, and for safety, converted
   all import calls to look like that.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: James Laska <jlaska@redhat.com>
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Signed-off-by: Martin Krizek <mkrizek@redhat.com>
Global config: Make autotest look for the global config files in /etc v2

So we make autotest comply to FHS, making packaging easier.

Changes from v1:
  * Fixed symbol redefinition captured by pylint

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Make it possible to specify a server log dir on global_config.ini

So we account for the case where we can't figure out the
server log dir by relative positioning.

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