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>
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>
virt.ks: Add qemu-guest-agent package in RHEL6's kickstart file

qemu-guest-agent package exists in the cd image after RHEL6.3,
thus install it directly in guest installation stage.

For those RHEL6 guest before RHEL6.3, add a "ignoremissing"
option to let them ignore this new package.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
shared.unattended: Use fixed partition for RHEL5/6 guests

Currently we use autopart in all rhel guests, which bring
trouble when RHEL5 RHEL6 guests w/ huge(64+G) RAM. The
swap partition will be really huge and not enough space
for the root partition, thus installation fails.
(we met this problem on huge RAM host before).

With this patch, the RHEL5 RHEL6 guest will have only 2
physical partitions(/boot, PV), and the PV contains 2
 LVs(/, swap).

|     | /    |swap|
|/boot|----LVM----|
|     |    PV     |
|---------------- |
|guest hard drive |

Note:
1) we can use plain partitions here (w/o LVM) to gain the
   possible tiny performance improvement, but I prefer to
   choose the LVM scheme, a little bit complex partioning
   scheme but test more (also testing the lvm layer).
2) RHEL3, RHEL4, RHEL7 kickstart config didn't update here,
   because:
   The default kernel shipped w/ RHEL3, RHEL4 dont support
   such huge RAM, so they will not met this issue.
   The anaconda of RHEL7 looks fixed this problem, install
   w/ autopart will not create a huge swap partition.

Signed-off-by: Xiaoqing Wei <xwei@redhat.com>
Acked-by: Suqin Huang <shuang@redhat.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
shared.unattended: Add package sg3_utils

sg3_utils is requried by scsi_testsuite test,
so include it in unattended install files.

Signed-off-by: Xu Tian <xutian@redhat.com>
Acked-by: Xiaoqing Wei <xwei@redhat.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.usb: Disable xhci on old RHEL guests

These RHEL guests older than RHEL5 aren't shipped
with xhci driver. Disable xhci testing on them.

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