Update client tests to the latest master

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.test:to check whether the self.debugdir_tmp_file exist

Sometimes this will lead an error, So before unlink the file
check if it really exists.

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
Acked-by: Feng Yang <fyang@redhat.com>
base_sysinfo: add dmidecode to sysinfo, use lspci -vvnn to get both name and PCI device ID in output

We use dmidecode to get BIOS and HW platform information.  Use lspci
-vvnn to get both marketing name and PCI device ID, since we detect hardware based
on PCI device ID only.

Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
logging_manager: Implement LoggingFile.isatty() for completeness, return False

yum-cli uses sys.stdout.isatty() in various places, so it will fail when
called from autotest since LoggingFile.isatty() does not exist.
Return False since LoggingFile is not emulating a tty.

Changes from v1:
   * Fixed spacing

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
logging_manager: Implement LoggingFile.writelines()

Existing code calls sys.stdout.writelines() because this method is
expected as part of the file object protocol.  When run in autotest
sys.stdout is actually a LoggingFile.  Implement writelines()
in LoggingFile to be more compliant with the File Object protocol.

Changes from v1:
 * Fixed docstring and removed unrelated comment

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
base_utils: use platform.machine() instead of uname -m

Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
base_utils: Use os.uname()[2] to return the release name, instead of calling uname -r

Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
base_utils: Remove semicolons and unecessary \.

Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
base_utils: Remove unused param _stats.

Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
job: Convert optional_fields to dict literal.

Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
base_packages: host will not be defined in the else clause. This should have been hostline

Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
base_packages: s/insall/install

Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
ConfigParser.write() requires a file object instead of a path

Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
profilers: add inotify profiler

A profiler that monitors filesystem activity during a test.

The included control file serves as a simple example that proves
that the sleeptest test doesn't do anything with the filesystem
(at least on default watched paths).

Signed-off-by: Cleber Rosa <crosa@redhat.com>
frontend/afe/models.py: improvements to check_for_acl_violation_hosts()

This introduces the following improvements:

 * Allow to check acl access violations for a user other than the
   current user (which is the default)
 * Print error message for all violations

Changes from v1:
 * Added documentation for username parameter
 * Identation fix to exception string

Signed-off-by: Julius Gawlas <julius.gawlas@hp.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
frontend/afe/reservations.py: utilities for reserve/release

Simple utilities for managing reservations. The implementation is
based on setting and removing ACLs, that will prevent other users
from having access to machines that are reserved by others.

Changes from v1:
 * docstrings content and format
 * general style changes
 * created method to get default user

Signed-off-by: Julius Gawlas <julius.gawlas@hp.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
frontend/afe/rpc_interface.py: add host reserve/release functions

This hooks the functionality in frontend/afe/reservations.py into
the RPC interface.

Changes from v1:
 * docstrings and style fixes

Signed-off-by: Julius Gawlas <julius.gawlas@hp.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
host reservations: add a java utility wrapper for reserving/releasing hosts

Changes from v1:
 * Style fixes

Signed-off-by: Julius Gawlas <julius.gawlas@hp.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
host reservations: UI changes for static reservations

added items to menu on host list page and wired to reservation calls
added buttons on host detail page and wired them to reservation calls
changed main html page to make it easier to dynamically add buttons on
view host page

Changes from v1:
  * whitespace cleanups

Signed-off-by: Julius Gawlas <julius.gawlas@hp.com>
host reservations: added "Reserve Hosts" checkbox to create job page

Added checkbox and neccessary call parameters to pass it on to create job
rpc calls. Actual reservation is implemented on next patches.

Changes from v1:
 * bug fix for GUI clone
 * docstrings to sphinx format
 * whitespace cleanups

Signed-off-by: Julius Gawlas <julius.gawlas@hp.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>