virttest.libvirt_vm: Add function to get libvirt job's type.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
shared.scripts: Add a tool for setting 0 to memory.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virt.virttest.utils_test.update_boot_option: Check kernel option at the end of function.

Signed-off-by: Feng Yang <fyang@redhat.com>
vm_xml: convert 'current' vcpu value to int

The definition type of 'current' vcpu is string, so need convert it
before compare it with an int value.

Signed-off-by: Yanbing Du <ydu@redhat.com>
Add methods to get host/VM cpu topolopy

1. Add accessors for cpu_topolopy in capability xml.
2. Add three func for libvirt VM to get domian cpu topolopy from
different ways.

Signed-off-by: Yanbing Du <ydu@redhat.com>
utils_test: Support disk format for creating image of RemoteDiskManager.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virttest.utils_test.libvirt: Add export_options in pre_pool params

Add support setup netfs with export options like 'root_squash' other
than default 'no_root_squash'.

Signed-off-by: Wayne Sun <gsun@redhat.com>
utils_test.libvirt: Fix exportfs cleanup problem with netfs pool

The nfs exportfs did not clean up after run, it caused by export_dir
not specified when use cleanup_pool.

Signed-off-by: Wayne Sun <gsun@redhat.com>
libvirt_xml: update CPUXML and capabilityXML

Commit 393d19fa update class CPUXML without update related methods
of it, so fix it. And create a new func to do feature number check.

Signed-off-by: Yanbing Du <ydu@redhat.com>
virttest: Update the method to get test case name in write_subtests_files

We have some subtest name include "-". And the original method will use
the last word in the test case name as the whole case name in the subtest.cfg.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest: Update the code to get the command status

The original code can not handle negative number.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virt: Support image_raw_device parameter in gluster.get_image_filename()

Signed-off-by: Feng Yang <fyang@redhat.com>
vm_xml: Add hypervisor features xml support

Signed-off-by: Yanbing Du <ydu@redhat.com>
Merge pull request #1820 from FengYang/get_image_filename

virt: Support image_raw_device parameter in gluster.get_image_filename()
virt.qemu_storage: Always check the image by qemu-img info, if glusterfs or iscsi used.

As os.path.exists() do not support gluster://IP:port/volume/image.qcow2 and
iscsi://IP:port/iqn.*:target0/$lun

Signed-off-by: Feng Yang <fyang@redhat.com>
Merge pull request #1813 from will-Do/vm_feature_xml

vm_xml: Add hypervisor features xml support
virt: Add funcs to get all volumes' path

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virt: Set 'vcpu' value if 'current_vcpu' is None

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
qemu_storage: Fix qemu-img help text.

Newer version of qemu-img won't return help text without "-h" option.

Signed-off-by: Hao Liu <hliu@redhat.com>
shared.control.fio: Do not handle --args parameter in control file.

Now we support update args by directly update the control file.
So no need handle the --args in control file now.

Signed-off-by: Feng Yang <fyang@redhat.com>