Fix how nc client and server are run in scenario tests
In change [1] the way how netcat server is run was changed.
But since than it was failing because
ssh_client.execute_command() method was blocking on waiting for
fd from remote host.
So this patch changes that to use ssh_client.execute_script()
method which runs fine.
It also changes how ncat command to run server and client are build.
In case of ncat server there is difference between ncat provided by
nmap, which is used e.g. in RHEL or Ubuntu and nc provided by busybox
which is used in Cirros.
In case of Cirros, we need to use "-e" parameter to provide script to
execute but in RHEL or Ubuntu we need to use "-c" option.
For ncat client, there is difference between ncat 7.60 and 7.70.
In case of this newer one, which is e.g. in RHEL 8, we need to pass
"-z" flag to run it in "Zero-I/O mode". For earlier versions (e.g.
on Ubuntu Bionic) it's not needed.
[1] https://review.opendev.org/#/c/702882/
Change-Id: I55607a521dd1829357d296c60855931ce2251295
1 file changed