libvirt: Adapt the remote config in base.cfg to existing tests.

Since there are several tests in libvirt are using ENTER.YOUR as
the default configuration of remote, we should add this substring
into base.cfg.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt-virsh: Add remote_pwd into VirshPersistent.__slots__.

If 'remote_pwd' is not in __slots__, we can not pass a remote_pwd
into VirshConnectBack and VirshPersistent, so that we can not connect
to a remote host with password. Same reason to 'remote_user'.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt_xml.pool_xml: Fix PoolXMLBase class.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virsh: Add readonly param in __init__ of VirshSession.

As there is no param about readonly for VirshSession, then we
can not create a readonly Virsh session. This patch add a param
in __init__ of VirshSession class and pass readonly in new_session()
of VirshPersistent. Then we can create a readonly VirshSession and
a readonly VirshPersistent.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
virt: Add 'debug' paramter to print result in VirshSession.cmd_result()

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virttest.utils_test: Correct tests script dir for shared script in run_virt_sub_test()

Now we move all the shared test scripts to generic/tests/

Signed-off-by: Feng Yang <fyang@redhat.com>
virsh: Add ShellProcessTerminatedError in close_session.

When a VirshSession is already terminated when we call close_session(),
it will raise a ShellProcessTerminatedError. We should catch it and
notice that this session is already closed.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
virttest.libvirt_xml: Add attributes to Video class

Add attributes to Video class to support video device operation.

Signed-off-by: Wayne Sun <gsun@redhat.com>
virttest.virsh: Add screeshot_test function

The screenshot function is used by screendump in VM class, which
lack screen option and will raise error and fail test in negative
test.

Add the screenshot_test function which return CmdResult for test
the screenshot command in libvirt test provider.

Signed-off-by: Wayne Sun <gsun@redhat.com>
virttest: Add get_correspond_ip() to virttest.utils_net.py

This function may used by other scripts.

Signed-off-by: Feng Yang <fyang@redhat.com>
Merge pull request #1414 from FengYang/get_correspond_ip

virttest: Add get_correspond_ip() to virttest.utils_net.py
Merge pull request #1401 from yangdongsheng/VirshPersistent

virsh: Add ShellProcessTerminatedError in close_session.
Merge pull request #1361 from yangdongsheng/remote_fix

libvirt: Adapt the remote config in base.cfg to existing tests.
libvirt: Introduce console_verify

Move the function from the test virsh_console.

Signed-off-by: Kyla Zhang <weizhan@redhat.com>
virttest.virsh: Add interface for virsh create

So that virsh create tests can be implemented.

Signed-off-by: Kyla Zhang <weizhan@redhat.com>
Merge pull request #1420 from autotest/virsh-create

Virsh create - PR 1353 remake
virttest.libvirt_xml: Add properties to VMXMLBase

1. Modify VMXMLBase to adding several properities
2. Add judgement for del_devices in set_devices

Signed-off-by: Kyla Zhang <weizhan@redhat.com>
virttest.utils_misc: Add functions to get open fds

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest.standalone_test: Add open_fd param to stdout functions

So that we can print how many open file descriptors (fds)
virt-test has at the end of each step of execution.

By default, it's disabled, will be controlled by a test
runner flag in a later patch.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
run: Add debug section and --show-open-fd option

It is very useful from time to time to show the number
of open fds at the end of each virt-test directory. So
add a debug session for debug related options, and also
add the --show-open-fd option that will give you the
following nice output:

$ ./run -t qemu --show-open-fd
Running setup. Please wait...
SETUP: PASS (13.82 s) (5 fd)
DATA DIR: /home/lmr/virt_test
DEBUG LOG: /home/lmr/Code/virt-test.git/logs/run-2014-01-31-18.07.40/debug.log
TESTS: 10
(1/10) type_specific.io-github-autotest-qemu.migrate.default.tcp: PASS (42.54 s) (12 fd)
...

Making it very easy to verify if virt-test is leaking
fds or not at the end of each test.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>