'Test connectivity between VMs on different networks
For a freshly-booted VM with an IP address ("port") on a given
network:
- the Tempest host can ping the IP address.
- the Tempest host can ssh into the VM via the IP address and
successfully execute the following:
- ping an external IP address, implying external connectivity.
- ping an external hostname, implying that dns is correctly
configured.
- ping an internal IP address, implying connectivity to another
VM on the same network.
- Create another network on the same tenant with subnet, create
an VM on the new network.
- Ping the new VM from previous VM failed since the new network
was not attached to router yet.
- Attach the new network to the router, Ping the new VM from
previous VM succeed.'

@decorators.idempotent_id('1546850e-fbaa-42f5-8b5f-03d8a6a95f15')
@testtools.skipIf(CONF.network.shared_physical_network, 'Connectivity    can    only    be    tested    when    in    a    multitenant    network    environment')
@decorators.skip_because(bug='1610994')
@decorators.attr(type='slow')
@test.services('compute', 'network')
def test_connectivity_between_vms_on_different_networks(self):

    self._setup_network_and_servers()
    self.check_public_network_connectivity(should_connect=True)
    self._check_network_internal_connectivity(network=self.network)
    self._check_network_external_connectivity()
    self._create_new_network(create_gateway=True)
    self._create_server(self.new_net)
    self._check_network_internal_connectivity(network=self.new_net, should_connect=False)
    router_id = self.router['id']
    self.routers_client.add_router_interface(router_id, subnet_id=self.new_subnet['id'])
    self.addCleanup(test_utils.call_and_ignore_notfound_exc, self.routers_client.remove_router_interface, router_id, subnet_id=self.new_subnet['id'])
    self._check_network_internal_connectivity(network=self.new_net, should_connect=True)
