frontend: add back fixture file for AFE app

Because its removal brought regressions on unittests
that used the database and we're slowly moving towards
having the full database generated from Django.

Note: there's no need to update the migrate version
because the current version script is already safe
if the 'Everyone' ACL entry exists or not.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
autotest-firewalld-add-service: small fixes

Including:
 * Use argparse default value substitution by default
 * Print help when required options are not given
 * Return error insted of (implicit) success when zone file is not found

Signed-off-by: Cleber Rosa <crosa@redhat.com>
installation support: introduce autotest-install-package-deps

Utility that installs the packages needed to setup and run an Autotest
server. Current distro support includes Red Hat, Fedora and Ubuntu.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
client.shared.software_manager: support non-interactive installations

On Debian and Debian derived systems.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
install script: replace package installation commands for autotest-install-package-deps

Signed-off-by: Cleber Rosa <crosa@redhat.com>
installation support: move dependencies to the proper module namespace

So that the package dependency list can be used by other scripts and it
is kept closer to the relevant module.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
software manager: fix installed package detection on dpkg backend

Signed-off-by: Cleber Rosa <crosa@redhat.com>
run_pylint.py: Sync with vir-tests

And stablish names of variables that are OK to be used.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Rename global_config to settings

For a long time, we have been using a quite cumbersome
way of accessing settings in the autotest global config
file. In nearly all source code files that do this
access, people created shortcuts to avoid accessing the
full API namespace, such as:

from autotest.client.shared import global_config

c = global_config.global_config.get_config_value
c.get_value("mysection", "mykey")

This is an eyesore. Let's change this to something
more sane:

from autotest.client.shared.settings import settings

settings.get_value("mysection", "mykey")

CC: Cleber Rosa <crosa@redhat.com>
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
autoserv_parser: Re-instate option -n (no-tee)

This option is required by the autotest maintenance tasks.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
contrib/virt/site_job.py: Upgrade plugin to new library

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Added support for hostless jobs to CLI

Added --hostless option to job create + few checks for parameters
incosistency (hostless implies no hosts, synch count labels etc)
and some unit tests.

Signed-off-by: Julius Gawlas <julius.gawlas@hp.com>
in GWT debug mode remove hop headers disallowed by Python 2.7

Added "hop headers" disallowed by Python 2.7 to set of
headers removed during the call, so one can use the gwt
forwarding for debugging with 2.7.

Signed-off-by: Julius Gawlas <julius.gawlas@hp.com>
README: Add link to mailing list and IRC info

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
setup_modules: remove insane source code removal hack

I have no idea why this code is there, but... really? Silently removing
source files from the system?

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
client/setup_modules.py: simplify check for already-present module

This doesn't change the code behavior, but it just replaces a confusing
"try: sys.modules[...] except KeyError:" block with a simple
"if sys.modules.has_key(...)" check.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
setup_modules: simplify setup logic

This kill multiple hacks from the module setup:

 * We don't need _import_children_into_module() anymore. The only case
   where it would be needed and imp.load_package() wouldn't work
   is if root_module_name was "". This won't be supported anymore,
   and root_module_name now defaults to "autotest".

 * The server-package lookup done when root_module_name was
   "autotest.client" is also not necessary, because if the caller
   required the other packages to be available, the caller would already
   break if the server package was unavailable and setup_client_only was
   True.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
setup_modules: kill _monkeypatch_logging_handle_error()

* This code is a hack that mess with the logging module for every
  user of the autotest modules;
* Users interested in handling logging errors can simply register a
  log handler in the root logger, instead of using the hack.
* Logging errors are rare;
* When they happen, their location can be looked up using "git grep".

Such an unimportant use case doesn't deserve an intrusive hack like
that, so I am killing it.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
client/net/netutils_unittest.py: Fix crazy imports

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Remove client/setup_modules_unittest.py

The entire unittest is based around the logging hack,
so we don't need it anymore.

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