virttest.virsh: Add wrapper for nodesuspend

Add standard wrapper function in virsh.py for calling virsh command
`nodesuspend`.

Signed-off-by: Hao Liu <hliu@redhat.com>
add support extra_cdrom_ks installation for WinNT6.0 guest

Signed-off-by: Xu Tian <xutian@redhat.com>
update ks to execute finish.bat from root partition

Signed-off-by: Xu Tian <xutian@redhat.com>
Always keep screendumps

screendumps are important, the current
policy of saving it when case error only is
not enough, if a VM network works fine and
case pass, but VM vga malfunction, deleted
them would potential miss bugs

Signed-off-by: Xiaoqing Wei <xwei@redhat.com>
virttest.virsh: Fix API nodedev_list

This commit makes nodedev_list according with other APIs.
(Use virsh optional option name as API keyword argument name)

Signed-off-by: Hao Liu <hliu@redhat.com>
Disable strict host key checking for ssh session

Because of StrictHostKeyChecking=ask is the default setting in ssh config,
If there is no host key for the server, it will show the fingerprint and
ask to confirm, And because of we already set /dev/null as the user host
key database, the ssh connection always waits for the test scripts answers
"yes" for confirmation. So the test scripts will be blocked at this stage.
(unless the option StrictHostKeyChecking has been disabled in command-line
or /etc/ssh/ssh_config or ~/.ssh/config)

Signed-off-by: Lin Ma <lma@suse.com>
Couple of miscellaneous fixes

utils_misc: Need to add parameter for a %s directive in message
            for get_qemu_binary method

utils_test/libvirt: Use 'permissive' not 'Permissive' since the set_status
                    expects the lower case

virsh: Simple typo in comment for net_state_dict() which was copied from
       a similar pool function, but the comment change was missed
virt: Modify return value of virsh.version() function
data_dir: Add target parameter fo get_deps_dir()

With this parameter, get_deps_dir() will only deps folder
which contains target file/folder.

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest.env_process: Record qemu pid in screendump folder name.

Sometimes, Two qemu may share same vm.name. So add qemu pid to
screendump folder name.

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest.qemu_vm: Update clone VM to env in vm.migrate().

Now we do not record cloned VM to env. So we only can catch screendump
for source VM.

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest.env_process: Encode screendump image to video in postprocess()

Now we Encode screendump image to video in postprocess_vm(), but it could only
encode source VM's image to video in migration.
So move the function to postprocess()

Signed-off-by: Feng Yang <fyang@redhat.com>
Add acpiphp for hotplug tests for suse products

Signed-off-by: Lin Ma <lma@suse.com>
virt: Override update() method of PropCanBase.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt_xml: Change wrong parameter 'pathname' to 'path'.

The pathname is not defined here, then we will get an UnboundLocalError
when use it.

	# python virttest/libvirt_xml_unittest.p
	Eg:
	.........................E.....................
	======================================================================
	ERROR: test_no_module (__main__.testLibrarian)
	----------------------------------------------------------------------
	Traceback (most recent call last):
	  File "virttest/libvirt_xml_unittest.py", line 669, in test_no_module
	    badname)
	  File "/usr/lib64/python2.6/unittest.py", line 335, in failUnlessRaises
	    callableObj(*args, **kwargs)
	  File "/add_storage/yds/autotest/client/tests/virt/virttest/libvirt_xml/devices/librarian.py", line 24, in get
	    handler_cl = base.load_xml_module(mod_path, name, DEVICE_TYPES)
	  File "/add_storage/yds/autotest/client/tests/virt/virttest/libvirt_xml/base.py", line 228, in load_xml_module
	    % (name, pathname, str(detail)))
	UnboundLocalError: local variable 'pathname' referenced before assignment

	----------------------------------------------------------------------
	Ran 47 tests in 3.034s

	FAILED (errors=1)

This patch change the pathname to correct 'path';

After this patch applied:

	# python virttest/libvirt_xml_unittest.p
	...............................................
	----------------------------------------------------------------------
	Ran 47 tests in 0.409s

	OK

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
virt: Adapt the utils_misc_unittest to new utils_misc.

Commit f9ec296d (Update utils to support pin multiple threads to one node)
changed the utils_misc.NumaNode, then the unittest of it got a fail:

	# python virttest/utils_misc_unittest.py
	.F.F......WARNING:root:Git repo foo tag is not signed
	WARNING:root:This means we will not verify if the key was made by whomever claims to have made it (dangerous)
	...
	======================================================================
	FAIL: test_free_cpu (__main__.TestNumaNode)
	----------------------------------------------------------------------
	Traceback (most recent call last):
	  File "virttest/utils_misc_unittest.py", line 177, in test_free_cpu
	    self.assertEqual(self.numa_node.dict["0"], "1230")
	AssertionError: ['1230'] != '1230'

	======================================================================
	FAIL: test_pin_cpu (__main__.TestNumaNode)
	----------------------------------------------------------------------
	Traceback (most recent call last):
	  File "virttest/utils_misc_unittest.py", line 150, in test_pin_cpu
	    self.assertEqual(self.numa_node.dict["0"], "1230")
	AssertionError: ['1230'] != '1230'

	----------------------------------------------------------------------
	Ran 13 tests in 0.003s

	FAILED (failures=2)

This patch adapt the unittest to the new data type.

	# python virttest/utils_misc_unittest.py
	..........WARNING:root:Git repo foo tag is not signed
	WARNING:root:This means we will not verify if the key was made by whomever claims to have made it (dangerous)
	...
	----------------------------------------------------------------------
	Ran 13 tests in 0.002s

	OK

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Merge pull request #1504 from jferlan/misc_fix

Couple of miscellaneous fixes
Merge pull request #1514 from yangdongsheng/unittest

Unittest
Merge pull request #1497 from xiaoqing-wei/always_screendump

Always keep screendumps
Merge pull request #1491 from FengYang/screendump

save screendump per VM pid rather then name