virttest: Init old_redirs as a empty dict

Make the type of old_redirs and self.redirs the same. Otherwise
it will always failed in the check step and set up the self.devices
to None.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest: Update nic command line in create when devices already exist

As we will skip the command update if vm object already have self.devices
in qemu_vm. We need manually update the fds and vhostfds for it when we
get them from host.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest: Remove the special strings from sysfs of numa possible node

In some system the possible node information read from sysfs include some
special string as \x00 for end of the string. Need remove it as it will
failed the translate of string to int.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest.qemu_vm: Support ctrl_mac_addr parameter in qemu command.

Signed-off-by: Feng Yang <fyang@redhat.com>
virt.share.cfg: Update macvtap_mac_change configure.

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest.utils_conn: support more features

Signed-off-by: Alex Jia <chuanchang.jia@gmail.com>
Small enhancements for libguestfs.

1.Default timeout for virt-inspect may be not enough.
2.Include hda type driver for finding disk.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virttest.utils_misc: Add some code for strip_console_codes

Add some ESC code in the default value of console_codes to cover
more console escape and control sequences from console output.
Also add custom_codes to this function to cover more ESC code
if the test cases needed.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
staging.service: Set ignore_status for other runner such as RemoteRunner.

When I introduced the result-parser into service module, I think we will pass
a session.cmd() as a runner to service. So we should only set ignore_status
when runner is utils.run.

But later, we assume the runner passed to service should be utils.run-like, and it
should support ignore_status, such as remote.RemoteRunner. We need to set
ignore_status of all runner to True here now.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
staging.service: introduce a command for service module of reset_failed.

When we start a service too frequently in systemd style system, we will
get an error. In this case, we can run a reset-failed command to solve
this problem.

This patch make service be able to run reset_failed command.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
utils_libvirtd: call reset_failed() before starting libvirtd.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
standalone_test: Enable only filter when listing tests

Currently when running with option `--list-tests`, we can use `--no`
to remove some tests, but we can't apply an `only` filter.

With this modification, we can apply an `only` filter by running
```
./run -t libvirt --list-tests --tests virsh.domuuid
```
to list only the tests you needed.

Signed-off-by: Hao Liu <hliu@redhat.com>
Add more disk type support to create_local_disk; add create_scsi_disk function.
Use files in root directory to create iso disk.
virttest.remote: Add return value for handle_prompts

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest.remote: Add connection timeout to handle_prompts

Raise LoginError when get the connection timeout output from session.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
utils_config: Remove sync() function

It's not wise to add a sync() function to restart libvirtd in
the config file class. For example, if many config file being
edited at the same time, redundant restart of libvirtd will be
introduced.

This patch remove the sync() function and the restarting activity
when calling restore(), leaving these actions to the testing
layer and concentrate on config file only in this module.

Signed-off-by: Hao Liu <hliu@redhat.com>
utils_test.libguestfs: Fix path connection failure.

For guestmount path, we need to connect mountpoint with
provided path. Using abspath() to remove redundant '/'.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
Add RHEL.7 guest installation config

1. Add RHEL.7 guest installation config,
include RHEL.7.0.cfg and RHEL.7.ks.

2. Enlarge the installation timeout from 3000 to 4800,
as RHEL.7 graphical installtion and boot needs more packages.

Signed-off-by: Cong Li <coli@redhat.com>
Merge pull request #1789 from CongSmile/RHEL7-guest

Add RHEL.7 guest installation config