scheduler.scheduler_models: Tidy up results format email

Make the autotest results email to be more concise and
legible. The current specification of the format follows:

Subject: Autotest <#jobid> | <job name> | success: <x%>

<job name>
<job URL>
Tests run: <n>; pass: <n>; skip: <n>; fail: <n>; sucess rate: <x%>

FAIL (n):
  <shortened test name>
      <failure description, restricted to 76 collumns, no
      trailling whitespaces, idented and aligned>
  <shortened test name>
      <failure description, restricted to 76 collumns, no
      trailling whitespaces, idented and aligned>

SKIPPED (n):
  <shortened test name>
      <reason>
  <shortened test name>
      <reason>
  <shortened test name>
      <reason>
  <shortened test name>
      <reason>
  <shortened test name>
      <reason>

PASS (n):
  <shortened test name>
  <shortened test name>

This patch implements this new formatting. Some adjustment
is required before we get it to a more final version.

Also, make it possible to print on the results email
arbitrary keyvals recorded by tests. It works by providing
a comma or space separated value list on global_config.ini
with the name of the keyvals, so it's possible to display
useful information.

Example: On the kvm tests, it's useful to know the exact
git version used to build qemu-kvm and the unittests, so
we can just specify them on global_config.ini and then
you'd have things like:

software_version_qemu_kvm: git://github.com/avikivity/qemu.git:master:233c709c4c6384d50004f8413d0a465ac1d29419

software_version_kvm_unit_test: git://github.com/avikivity/kvm-unit-tests.git:master:d423ca3642579c76f3f6784ae2b7827f36d940a0

On the results e-mail.

Signed-off-by: Ademar Reis <areis@redhat.com>
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
libvirt: hvm_or_pv='hvm' when not specified

Signed-off-by: Chris Evich <cevich@redhat.com>
utils: Make patchwork server configurable

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: Add virsh_domname() function

This patch adds domname function to libvirt_vm.py.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virt-libvirt: Add test for virsh domname.

This patch adds test for virsh domname.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virt: Add configuration for domname test

This patch adds configuration for domname test.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
contrib.virt.site_job: Display timestamp in ISO format

The timestamp generated for each job is not in ISO format,
let's fix that.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Virt: Fix mac check bug str <-> unicode

Signed-off-by: Chris Evich <cevich@redhat.com>
result listing: add a header to auto generated results dir page

So that it looks a bit better and it's more obvious that it is
an autotest page.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
client.shared.test: Fix a package related change

In change f14edd33ee04f6f33620ac8c6e8db210a399fd4e,
a new way of computing self.srcdir introduces a bug:
The autotestdir env variable is not set on a server
side job. So we resort to get the value of
autotest_top_path instead.

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