shared.cfg: Disable S3/S4 test on all ppc64 guests

According to https://github.com/autotest/virt-test/pull/558
All S3/S4 tests should be disabled on ppc64 guests.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Add a class named RemoteFile in virttest-remote module.

A class to handle remote file.
Currently, we support three operations on remote file.
add: append lines in to file.
sub: replace string which match pattern to repl.
remove: delete lines that match pattern.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
Add some unittest for RemoteFile.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
Fix for RemoteFile and unittest.

(1).Change uuid to tempfile to build a unique filename.
(2).Add a __del__ method for unittest class to remove remote_file.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>

Fix indenting error in remote.py.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
qemu.tests.cpu_hotplug: Make cpu hotplug command configurable.

cpu_set command will be removed in new qemu. So make cpu hotplug
 command configurable.

'cpu_set 1 online' will always sent out as human monitor command no matter
 qmp support cpu_set or not.

Update it to 'cpu_set cpu=1,state=online'. send_args_cmd() will transfer
it to correct human monitor command 'cpu_set 1 online'. Or correct qmp
monitor command if qmp support it.

Signed-off-by: Feng Yang <fyang@redhat.com>
qemu: RDMA migration test support

Signed-off-by: Michael R. Hines <mrhines@us.ibm.com>
qemu_vm: If QEMU doesn't know a given migration protocol, skip the test

When starting QEMU with an incoming migration protocol
it doesn't know about, a VMCreateError will be thrown.
We can do better in this case. Create a new exception
class that inherits from error.TestNAError, so the test
is skipped rather than errored or failed.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
run: Make the default QEMU set stricter

The default QEMU set, migrate, can usually be run with
a variety of QEMU shipped by current distros.

With the new migration protocols, people running the
default set will frequently have SKIPPED tests, which
is not good. So, restrict the default set to
protocols that are widely available. Once the new
formats are widespread (could take over a year for
that to happen), we can revert this change.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
small fix for nodedev_xml

(1).__schema_name__ = "nodedev"
(2).change get_key2syspath_dict and get_key2value_dict
    from @staticmethod to method of NodedevXML.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
Add test for nodedev-dumpxml

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
libvirt.tests: Fix pylint complaint for virsh nodedev-dumpxml.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
Add virsh domif-setlink domif-getlink test

Introduce virsh domif-setlink domif-getlink  testing:

    1. Positive testing
        1.1 Running domain and shutting off domain testing
        1.2 Setlink domain interface up and down then check
        1.3 Options "--config" testing
        1.4 Interface name and MAC address testing

    2. Negative testing
        2.1 Invalid options testing
        2.2 Shutting off domain with interface name

Signed-off-by: whuang <whuang@redhat.com>
virt: add virsh functions for virsh domif-setlink and domif-getlink

Signed-off-by: whuang <whuang@redhat.com>
virt: add functions get net devices of domain from guest xml

Signed-off-by: whuang <whuang@redhat.com>
modify some issue according to cevich's suggestion

Signed-off-by: whuang <whuang@redhat.com>
virt-libvirt: moved virsh_domif_setlink_getlink

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: make test-specific 'options' unambiguous

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: restart specific interface in virsh_domif_setlink_getlink

Signed-off-by: Chris Evich <cevich@redhat.com>
shared.unattended: Do not use python script in RHELs' kickstart

We just run some bash command in python. So directly run these
command in post script.

Signed-off-by: Feng Yang <fyang@redhat.com>
Acked-by: Xiaoqing Wei <xwei@redhat.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
shared.unattended: Do not use python script in Fedoras' kickstart

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>