remote_build: Simpler interface

Update the remote_build interface to make it figure out the default
values of lots of input parameters without being explicitly told. This
change would mean that this:

    username = params.get("username", "")
    password = params.get("password", "")
    address = vm.get_address(0)
    source_dir = data_dir.get_deps_dir("clock_getres")
    build_dir = params.get("build_dir", "/tmp")
    shell_client = params.get("shell_client", "ssh")
    file_transfer_client = params.get("file_transfer_client", "scp")
    shell_prompt = params.get("shell_prompt")
    shell_linesep = params.get("shell_linesep")
    builder = remote_build.Builder(address, source_dir, client=shell_client,
                                   file_transfer_client=file_transfer_client,
                                   username=username,
                                   password=password,
                                   build_dir=build_dir,
                                   prompt=shell_prompt,
                                   linesep=shell_linesep)

..can now be done like this, given that params is set:

    address = vm.get_address(0)
    source_dir = data_dir.get_deps_dir("clock_getres")
    builder = remote_build.Builder(params, address, source_dir)

The idea is to reduce the boiler plate needed by test case designer to
fetch all the parameters from the cartesian configuration. It also fixes
the lack of a separate file_transfer_port, which is needed by the rss
file transfer client.

Signed-off-by: Jonas Eriksson <jonas.eriksson@enea.com>
virt: Add option to shutdown func

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virttest: Init export_flag in __init__ function of iscsi

As export_flag will be used in cleanup() so init it no matter we are
using emulate or real iscsi device.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest: Import iscsi from virttest first

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest: Update iscsi_unittest to fit the update in iscsi

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
shared.control: Add a new control file for scsi_testsuite

Add a new control file for scsi_testsuite to fit new version
of RHEL.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Merge pull request #1619 from ypu/iscsi-small-fix

Iscsi small fix
Merge pull request #1618 from liyangfnst/shutdown

virt: Add option to shutdown func
Merge pull request #1620 from ypu/scsi_testsuite

shared.control: Add a new control file for scsi_testsuite
PoolVolumeTest: cleanup_pool: Clean up directory tree for more types

When cleaning up the pool, we need to be sure to remove the pool_target
tree created during pre_pool setup for more than just the "dir" pool.
The "fs" and "netfs" pools also will 'mkdir' on the 'target_pool'. If not
cleaned up - other tests which use the same name space will have failures.

I found this during a run of "all" tests where 'virsh.vol_create' failed,
but would succeed when running alone.  I narrowed this down to the running
of 'virsh.vol_download_upload' which would create and use the directory
"fs-pool", but would not clean up after itself. This was not a problem until
"vol_create" ran later using the same "fs-pool" name and thus would fail to
create the pool because a directory already existed.

If interested run the following prior to this change to see the issue:

./run -t libvirt --tests \
 virsh.vol_download_upload.download_upload.fs_pool.upload.no_options, \
 virsh.vol_create.positive_test.fs_like_pool.vol_format.v_raw.src_pool_type.fs

The first will PASS and the second will ERROR
virt: Fix code style in remote_commander.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
virt: Fix transfer data over console bug in remote_commander.

There was problem with raw mode of console which wasn't so raw
as it looks like. This patch should fix this problem.
The patch using base64 coding for transferring data over console.
It could be quite easy implement new encoding in messenger when
it will needed.

data -> pickle -> encode base64 -> len,base64 ->
           -> console transfer ->
-> len,base64 -> unpickle -> data

Signed-off-by: Jiří Župka <jzupka@redhat.com>
Merge pull request #1625 from jzupka/fix_command_master

virt: Fix transfer data over console bug in remote_commander.
Merge pull request #1623 from jferlan/fix_pool_cleanup

PoolVolumeTest: cleanup_pool: Clean up directory tree for more types
virttest: Small invalid syntax fix

except..as syntax not support before python 2.6

Signed-off-by: Shuping Cui <scui@redhat.com>
Merge pull request #1627 from spcui/small_syntax_fix

virttest: Make nwfilter_xml.py compatible before python 2.6
virt.cfg: Add Ubuntu.14.04-server guest support

Signed-off-by: Xu Tian <xutian@redhat.com>
Merge pull request #1628 from xutian/ubuntu14.04

virt.cfg: Add Ubuntu.14.04-server guest support
Merge pull request #1612 from zqad/remote_build_suggestion

remote_build: Simpler interface
remote_build doc: Change from utils_build

Two residual utils_build was left in the documentation.

Signed-off-by: Jonas Eriksson <jonas.eriksson@enea.com>