[Fullstack] SG test use not too many fake hosts
In fullstack security groups test number of used fake hosts depends on scenario. For example for ovs-hybrid scenario only one such host is enough because all ports are placed on first host always. So there is no need to spawn another L2 and DHCP agents for such test. Change-Id: Icfcf54bf9d7cc954aaa20b22d1f1746afc61179c
This commit is contained in:
parent
a12630ee85
commit
2c1178c1ce
@ -47,7 +47,7 @@ class BaseSecurityGroupsSameNetworkTest(base.BaseFullStackTestCase):
|
||||
of_interface=self.of_interface,
|
||||
l2_agent_type=self.l2_agent_type,
|
||||
firewall_driver=self.firewall_driver,
|
||||
dhcp_agent=True) for _ in range(2)]
|
||||
dhcp_agent=True) for _ in range(self.num_hosts)]
|
||||
env = environment.Environment(
|
||||
environment.EnvironmentDescription(
|
||||
network_type=self.network_type),
|
||||
@ -78,21 +78,27 @@ class TestSecurityGroupsSameNetwork(BaseSecurityGroupsSameNetworkTest):
|
||||
|
||||
network_type = 'vxlan'
|
||||
scenarios = [
|
||||
# The iptables_hybrid driver lacks isolation between agents and
|
||||
# because of that using only one host is enough
|
||||
('ovs-hybrid', {
|
||||
'firewall_driver': 'iptables_hybrid',
|
||||
'of_interface': 'native',
|
||||
'l2_agent_type': constants.AGENT_TYPE_OVS}),
|
||||
'l2_agent_type': constants.AGENT_TYPE_OVS,
|
||||
'num_hosts': 1}),
|
||||
('ovs-openflow-cli', {
|
||||
'firewall_driver': 'openvswitch',
|
||||
'of_interface': 'ovs-ofctl',
|
||||
'l2_agent_type': constants.AGENT_TYPE_OVS}),
|
||||
'l2_agent_type': constants.AGENT_TYPE_OVS,
|
||||
'num_hosts': 2}),
|
||||
('ovs-openflow-native', {
|
||||
'firewall_driver': 'openvswitch',
|
||||
'of_interface': 'native',
|
||||
'l2_agent_type': constants.AGENT_TYPE_OVS}),
|
||||
'l2_agent_type': constants.AGENT_TYPE_OVS,
|
||||
'num_hosts': 2}),
|
||||
('linuxbridge-iptables', {
|
||||
'firewall_driver': 'iptables',
|
||||
'l2_agent_type': constants.AGENT_TYPE_LINUXBRIDGE})]
|
||||
'l2_agent_type': constants.AGENT_TYPE_LINUXBRIDGE,
|
||||
'num_hosts': 2})]
|
||||
|
||||
# NOTE(toshii): As a firewall_driver can interfere with others,
|
||||
# the recommended way to add test is to expand this method, not
|
||||
|
Loading…
Reference in New Issue
Block a user