Merge "Get nc client's command based on the nc on correct host"
diff --git a/neutron_tempest_plugin/scenario/base.py b/neutron_tempest_plugin/scenario/base.py
index c8eddd1..d972953 100644
--- a/neutron_tempest_plugin/scenario/base.py
+++ b/neutron_tempest_plugin/scenario/base.py
@@ -74,12 +74,12 @@
     return cmd
 
 
-def get_ncat_client_cmd(ip_address, port, protocol):
+def get_ncat_client_cmd(ip_address, port, protocol, ssh_client=None):
     udp = ''
     if protocol.lower() == neutron_lib_constants.PROTO_NAME_UDP:
         udp = '-u'
     cmd = 'echo "knock knock" | nc '
-    ncat_version = get_ncat_version()
+    ncat_version = get_ncat_version(ssh_client=ssh_client)
     if ncat_version > packaging_version.Version('7.60'):
         cmd += '-z '
     cmd += '-w 1 %(udp)s %(host)s %(port)s' % {
@@ -636,7 +636,8 @@
         If ssh_client is not given, it is executed locally on host where tests
         are executed. Otherwise ssh_client object is used to execute it.
         """
-        cmd = get_ncat_client_cmd(ip_address, port, protocol)
+        cmd = get_ncat_client_cmd(ip_address, port, protocol,
+                                  ssh_client=ssh_client)
         result = shell.execute(cmd, ssh_client=ssh_client)
         self.assertEqual(0, result.exit_status)
         return result.stdout