Exemplo n.º 1
0
 def assert_is_unreachable(self):
     self.stack.assert_is_unreachable()
     ping.assert_unreachable_hosts(self.stack.list_fixed_ips(),
                                   timeout=300.,
                                   ssh_client=self.peer_stack.ssh_client)
     if self.stack.has_vlan:
         self.stack.assert_vlan_is_unreachable()
Exemplo n.º 2
0
def assert_unreachable_nodes(
        nodes: typing.Iterable[_topology.OpenStackTopologyNode],
        **ping_params):
    node_ips = {node.name: str(node.public_ip) for node in nodes}
    LOG.debug(f"Test nodes are unreachable: "
              f"{json.dumps(node_ips, sort_keys=True, indent=4)}")
    ping.assert_unreachable_hosts(node_ips.values(), **ping_params)
Exemplo n.º 3
0
    def test_ping(self):
        """Test connectivity to floating IP address"""
        # Wait for server instance to get ready by logging in
        self.stack.ssh_client.connect()

        # Expect port security to throw away ICMP packages
        ping.assert_unreachable_hosts([self.stack.floating_ip_address],
                                      count=5, check=False)
Exemplo n.º 4
0
 def assert_vlan_is_unreachable(self,
                                ip_version: int = None,
                                timeout: tobiko.Seconds = None,
                                ssh_client: ssh.SSHClientType = None):
     fixed_ips = self.list_vlan_fixed_ips(ip_version=ip_version)
     if fixed_ips:
         if ssh_client is None:
             ssh_client = self.vlan_ssh_proxy_client
         ping.assert_unreachable_hosts(fixed_ips,
                                       ssh_client=ssh_client,
                                       timeout=timeout)
     else:
         tobiko.fail(f'Server {self.stack_name} has any IP on VLAN port')
Exemplo n.º 5
0
 def test_shutoff_server(self, initial_status='ACTIVE'):
     self.stack.ensure_server_status(initial_status)
     server = nova.shutoff_server(self.stack.server_id)
     self.assertEqual('SHUTOFF', server.status)
     ping.assert_unreachable_hosts([self.stack.ip_address])
Exemplo n.º 6
0
 def test_assert_unreachable_hosts(self):
     ping.assert_unreachable_hosts(['0.1.2.3'],
                                   count=3,
                                   **self.execute_params)