Ejemplo n.º 1
0
 def test_find_floating_network(self):
     floating_network = CONF.tobiko.neutron.floating_network
     if not floating_network:
         tobiko.skip('floating_network not configured')
     network = neutron.find_network(name=floating_network)
     self.assertIn(floating_network, [network['name'], network['id']])
     self.assertEqual(self.stack.gateway_network_id, network['id'])
Ejemplo n.º 2
0
 def test_get_ipv6_subnet(self):
     if not self.stack.has_ipv6:
         tobiko.skip("Stack {stack} has no IPv6 subnet",
                     stack=self.stack.stack_name)
     subnet = neutron.get_subnet(self.stack.ipv6_subnet_id)
     self.assertEqual(self.stack.ipv6_subnet_id, subnet['id'])
     self.assertEqual(self.stack.ipv6_subnet_details, subnet)
Ejemplo n.º 3
0
Archivo: _lzma.py Proyecto: 4383/tobiko
def open_file(filename, mode):
    try:
        lzma = import_lzma()
    except ImportError:
        tobiko.skip(
            "Package lzma or backports.lzma is required to decompress "
            "{filename!r} (mode={mode!r}) XZ image file "
            "({python_version!r}).",
            filename=filename,
            mode=mode,
            python_version=sys.version)

    return lzma.LZMAFile(filename=filename, mode=mode)
Ejemplo n.º 4
0
 def test_get_router(self):
     if not self.stack.has_gateway:
         tobiko.skip("Stack {stack} has no gateway router",
                     stack=self.stack.stack_name)
     router = neutron.get_router(self.stack.gateway_id)
     self.assertEqual(self.stack.gateway_id, router['id'])
Ejemplo n.º 5
0
 def test_ipv6_subnet_gateway_ip(self):
     if not self.stack.has_ipv6 or not self.stack.has_gateway:
         tobiko.skip('Stack {!s} has no IPv6 gateway',
                     self.stack.stack_name)
     self.assertIn(self.stack.ipv6_subnet_gateway_ip,
                   self.stack.ipv6_gateway_addresses)
Ejemplo n.º 6
0
 def test_gateway_network(self):
     if not self.stack.has_gateway:
         tobiko.skip('Stack {!s} has no gateway', self.stack.stack_name)
     self.assertEqual(
         self.stack.gateway_network_id,
         self.stack.gateway_details['external_gateway_info']['network_id'])
Ejemplo n.º 7
0
 def test_ipv6_subnet_cidr(self):
     if not self.stack.has_ipv6:
         tobiko.skip('Stack {!s} has no ipv6 subnet', self.stack.stack_name)
     subnet = neutron.find_subnet(cidr=str(self.stack.ipv6_subnet_cidr))
     self.assertEqual(neutron.get_subnet(self.stack.ipv6_subnet_id), subnet)
Ejemplo n.º 8
0
 def cleanup_fixture(self):
     tobiko.skip('some-reason')
Ejemplo n.º 9
0
 def setup_fixture(self):
     tobiko.skip('some-reason')
Ejemplo n.º 10
0
 def ipv6_subnet_gateway_ip(self):
     if not self.stack.network_stack.has_ipv6:
         tobiko.skip('Stack {!s} has no ipv6 subnet',
                     self.stack.network_stack.stack_name)
     return self.stack.network_stack.ipv6_subnet_gateway_ip
Ejemplo n.º 11
0
 def setUp(self):
     super(RouterTest, self).setUp()
     if not self.stack.network_stack.has_gateway:
         tobiko.skip('Stack {!s} has no gateway',
                     self.stack.network_stack.stack_name)