Add a method named sub_else_add in RemoteFile class.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
Add utils_conn module in virttest.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
Add test for virsh connect.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
utils_conn: add more comments and make tmp_dir unique.

* Remove tmp_dir from param of __init__, and build tmp_dir
  using tempfile to assure it unique for each instance.
* Add more comment for the varaibles of connection class to
  make it more clear.
* Pick the CA key build method out from TLSConnection as a
  function in utils_conn.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
utils_conn: Add more unittest for utils_conn.

* Add a unittest for tmp_dir to make sure it is unique for
  each instance.
* Add three unittests for functions in utils_conn which build
  CA key.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
virttest.utils_conn: add auto_recover into __init__().

B/c the errors in __del__() will be ignored, then we want
user call conn_recover() manually our of __del__().

* rename conn_finish to conn_recover.
* add auto_recover into __init__.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
libvirt-tests: replace /var/run/libvirt/lxc with /usr/libvirtexec/libvirt_lxc.

Path /var/run/libvirt/lxc means there is a running lxc guest, but not the lxc
driver is available.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
libvirt.tests: Fix pylint complaint for virsh connect.

* Specify string format arguments for logging functions.
* Remove unused variables.
* Replace invalid name "e" to "detail".

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virttest.utils_conn_unittest: method conn_finish has been changed to conn_recover.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>