Merge "Fix trunk subport scenario test"
diff --git a/neutron/tests/tempest/scenario/test_trunk.py b/neutron/tests/tempest/scenario/test_trunk.py
index fb3e947..54399aa 100644
--- a/neutron/tests/tempest/scenario/test_trunk.py
+++ b/neutron/tests/tempest/scenario/test_trunk.py
@@ -13,8 +13,8 @@
 #    under the License.
 
 import netaddr
-from tempest.common.utils.linux import remote_client
 from tempest.common import waiters
+from tempest.lib.common import ssh
 from tempest.lib.common.utils import data_utils
 from tempest.lib import decorators
 from tempest import test
@@ -121,11 +121,10 @@
         server, fip = self._create_server_with_fip(parent_port['id'])
         self.addCleanup(self._detach_and_delete_trunk, server, trunk)
 
-        server_ssh_client = remote_client.RemoteClient(
+        server_ssh_client = ssh.Client(
             fip['floating_ip_address'],
             CONF.validation.image_ssh_user,
-            pkey=self.keypair['private_key'],
-            server=server)
+            pkey=self.keypair['private_key'])
 
         return {
             'server': server,
@@ -238,6 +237,20 @@
             command = CONFIGURE_VLAN_INTERFACE_COMMANDS % {'tag': vlan_tag}
             server['ssh_client'].exec_command(command)
 
-        # Ping from server1 to server2 via VLAN interface
-        servers[0]['ssh_client'].ping_host(
-            servers[1]['subport']['fixed_ips'][0]['ip_address'])
+        # Ping from server1 to server2 via VLAN interface should fail because
+        # we haven't allowed ICMP
+        self.check_remote_connectivity(
+            servers[0]['ssh_client'],
+            servers[1]['subport']['fixed_ips'][0]['ip_address'],
+            should_succeed=False
+        )
+        # allow intra-securitygroup traffic
+        self.client.create_security_group_rule(
+            security_group_id=self.secgroup['security_group']['id'],
+            direction='ingress', ethertype='IPv4', protocol='icmp',
+            remote_group_id=self.secgroup['security_group']['id'])
+        self.check_remote_connectivity(
+            servers[0]['ssh_client'],
+            servers[1]['subport']['fixed_ips'][0]['ip_address'],
+            should_succeed=True
+        )