Merge "[Fullstack] Add debug_iptables=True in security groups tests"

This commit is contained in:
Zuul
2018-08-20 14:03:53 +00:00
committed by Gerrit Code Review
3 changed files with 10 additions and 2 deletions

View File

@@ -172,6 +172,7 @@ class OVSConfigFixture(ConfigFixture):
'agent': {
'l2_population': str(self.env_desc.l2_pop),
'arp_responder': str(self.env_desc.arp_responder),
'debug_iptables_rules': str(env_desc.debug_iptables)
}
})
@@ -239,6 +240,9 @@ class LinuxBridgeConfigFixture(ConfigFixture):
},
'securitygroup': {
'firewall_driver': host_desc.firewall_driver,
},
'AGENT': {
'debug_iptables_rules': str(env_desc.debug_iptables)
}
})
if env_desc.qos:

View File

@@ -38,7 +38,8 @@ class EnvironmentDescription(object):
mech_drivers='openvswitch,linuxbridge',
service_plugins='router', arp_responder=False,
agent_down_time=75, router_scheduler=None,
global_mtu=common_const.DEFAULT_NETWORK_MTU):
global_mtu=common_const.DEFAULT_NETWORK_MTU,
debug_iptables=False):
self.network_type = network_type
self.l2_pop = l2_pop
self.qos = qos
@@ -49,6 +50,7 @@ class EnvironmentDescription(object):
self.router_scheduler = router_scheduler
self.global_mtu = global_mtu
self.service_plugins = service_plugins
self.debug_iptables = debug_iptables
if self.qos:
self.service_plugins += ',qos'

View File

@@ -42,6 +42,7 @@ class BaseSecurityGroupsSameNetworkTest(base.BaseFullStackTestCase):
of_interface = None
def setUp(self):
debug_iptables = self.firewall_driver.startswith("iptables")
host_descriptions = [
environment.HostDescription(
of_interface=self.of_interface,
@@ -50,7 +51,8 @@ class BaseSecurityGroupsSameNetworkTest(base.BaseFullStackTestCase):
dhcp_agent=True) for _ in range(self.num_hosts)]
env = environment.Environment(
environment.EnvironmentDescription(
network_type=self.network_type),
network_type=self.network_type,
debug_iptables=debug_iptables),
host_descriptions)
super(BaseSecurityGroupsSameNetworkTest, self).setUp(env)