virt: Add clone_volume func to PoolVolume class

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virt: Add create func to VolXML class

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virt: Add functions to get/set cpu status

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
libvirt: Declare LIBVIRT_DEFAULT_URI in preprocess().

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
env_process: Recreate vm in env if vm.connect_uri is not params.get('connect_uri').

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt_vm: Override __setattr__ of libvirt_vm.VM.

For VMs in different uri, we need some different params for them.
This patch introduce a way we can set these params in base.cfg only
for VM in a special uri. What we need to do is adding the special
param with a prefix of 'libvirt_URI_' into base.cfg. That's all.
libvirt_vm.VM will check the connect_uri and use the param you want.

Example:
	isa_serial = "serial0" is not usable for lxc VM. lxc does
not support serial device yet. In this case, we need not to change
the default value of isa_serial. We can add a new param in base.cfg.
	libvirt_lxc_isa_serial = "console0"
Then if your VM is a lxc guest, it will use "console0".

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
run: Introduce an option --connect-uri to assign uri for test.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
virt: Fix a bug in preprocess_vm func

If VM is running before test, and param.get('start_vm') == 'yes',
the variable 'start_vm' will be False, at this situation
params.get("kill_vm_before_test") will work, if it's 'yes',
the VM will be shutdown, and make the test fail.

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
libvirt: adapt the default_tests.cfg to new framework of test-provider.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
virt: Add a func to make filesystem on partition

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
Merge pull request #1727 from liyangfnst/env

virt: Fix a bug in preprocess_vm func
Merge pull request #1730 from yangdongsheng/default_tests

libvirt: adapt the default_tests.cfg to new framework of test-provider.
virt: Fix a bug in Iscsidev init func

Set 'self.emulated_image' to be a true file, if not
cleanup cannot find the emulated_image file.

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
Merge pull request #1734 from liyangfnst/iscsi_fix

virt: Fix a bug in Iscsidev init func
Fix a bug in Iscsi.export_target func

If emulated_image already exists, but size is different with
you want, we must rebuild this file, if not, test will fail.

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
Merge pull request #1692 from yangdongsheng/lxc_2

[Part 2] Declare  LIBVIRT_DEFAULT_URI in preprocess()
Merge pull request #1735 from liyangfnst/emulate

Fix a bug in Iscsi.export_target func
Merge pull request #1712 from liyangfnst/cpu_enable

virt: Add a func to enable/disable cpu
Merge pull request #1709 from liyangfnst/clone_vol

virt: Add clone_volume func to PoolVolume class
Merge pull request #1711 from liyangfnst/vol_create

virt: Add create func to VolXML class