virttest: Add parameter to control log level.

Initial effort to add the parameter "--log-level" when running tests,
to control the log level. For example:

./run -t qemu --log-level=error

Will only log ERROR messages.

Note that The default value remains DEBUG level.
Currently it only applies to log/debug.log.

Signed-off-by: Ruda Moura <rmoura@redhat.com>
virttest: Test option '--log-level' through a list of fixed values.

Test possible values for option '--log-level' based on a list of fixed
log level names (stored in SUPPORTED_LOG_LEVELS).

Signed-off-by: Ruda Moura <rmoura@redhat.com>
qemu.tests: Use qemu-kvm -M ? to get machine type for physical resource check

The old method to get expect machine type can not fit machine type check for
q35 and pc. So update it by get the machine type string from the output
of qemu-kvm -M ?.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest: Update khugepaged test timeout

As the khugepaged process will quit slowly in some OS, enlarge the
timeout for khugepaged test from 5s to 50s. And also use the method that
check process status in a while loop which will break when the khugepaged
process status is changed as expect instead of time.sleep(timeout).

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Add snapshot-edit command in virsh.py

1. Add snapshot-edit, snapshot-parent command
2. Modify snapshot-current to output xml/name or command output

Signed-off-by: Kyla Zhang <weizhan@redhat.com>
Change the function place for common use and add options for sync

1. change the function place and improve implementation
2. Add option for sync

Signed-off-by: Kyla Zhang <weizhan@redhat.com>
Add config file for snapshot-edit test

Signed-off-by: Kyla Zhang <weizhan@redhat.com>
add snapshot-edit test

Signed-off-by: Kyla Zhang <weizhan@redhat.com>
virttest: Record the output from QMP monitor when failed to get the greeting message

Record the json output from QMP monitor when we raise the MonitorProtocolError. It
may help us to analyse what failed this step.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest.libvirt_xml.pool_xml: Fix py 2.4 incompatible construct

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Modifying spice cfg file to use nettype = bridge
Merge pull request #1068 from ypu/thp

virttest: Update khugepaged test timeout
Merge pull request #1078 from ypu/qmp

virttest: Record the output from QMP monitor when failed to get the gree...
virttest.libvirt_vm: Raise stderr of virsh.start after starting failed.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
Merge pull request #1085 from swapnakrishnan2k/add_nettype_bridge

Modifying spice cfg file to use nettype = bridge
virttest.libvirt_xml.pool_xml: Fix py 2.4 incompatible construct

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virt-libguestfs: Add sparsify case for virt-sysprep test

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virt: variable-rename fix for pylint

Signed-off-by: Chris Evich <cevich@redhat.com>
virt: Remove custom string conversion

Since PropcanBase is now fully pickle-able, there is no need
for custom string-conversion (which was used for pickling in virtnet).
Removed these special methods to just let normal python dict string
conversion take over.

Signed-off-by: Chris Evich <cevich@redhat.com>
virt-libvirt: libvirt_xml interface xml driver

Added ability to get/set/del '<model type=>' element + attribute.

Signed-off-by: Chris Evich <cevich@redhat.com>