Connect bridge with interface only on network hosts

Change-Id: I4dad33a12c555bab37ae8373823eac4603a57430
This commit is contained in:
Lukas Bezdicka
2014-06-25 17:04:06 +02:00
parent 6d4e5f7a82
commit e90ad8150a

View File

@@ -915,13 +915,18 @@ def create_l2_agent_manifests(config, messages):
manifestfile = "%s_neutron.pp" % (host,)
manifestdata = getManifestTemplate(template_name)
appendManifestFile(manifestfile, manifestdata + "\n")
if agent == "openvswitch" and ovs_type in ['vlan', 'vxlan', 'gre']:
bridge_key = 'CONFIG_NEUTRON_OVS_BRIDGE'
iface_key = 'CONFIG_NEUTRON_OVS_IFACE'
for if_map in iface_arr:
config[bridge_key], config[iface_key] = if_map.split(':')
manifestdata = getManifestTemplate("neutron_ovs_port.pp")
appendManifestFile(manifestfile, manifestdata + "\n")
# neutron ovs port only on network hosts
if (
agent == "openvswitch" and (
(host in network_hosts and ovs_type in ['vxlan', 'gre'])
or ovs_type == 'vlan')
):
bridge_key = 'CONFIG_NEUTRON_OVS_BRIDGE'
iface_key = 'CONFIG_NEUTRON_OVS_IFACE'
for if_map in iface_arr:
config[bridge_key], config[iface_key] = if_map.split(':')
manifestdata = getManifestTemplate("neutron_ovs_port.pp")
appendManifestFile(manifestfile, manifestdata + "\n")
# Additional configurations required for compute hosts
if host in compute_hosts:
manifestdata = getManifestTemplate('neutron_bridge_module.pp')