Use CONFIG_QUANTUM_OVS_BRIDGE_MAPPINGS parameter
The CONFIG_QUANTUM_OVS_BRIDGE_MAPPINGS parameter contains a comma-separated list of bridge mappings. Since the puppet modules expects this parameter to be an array, this parameter must be properly formatted by packstack, then consumed by the puppet module. Change-Id: Ia09a7185f4a6fc8f5e61ca585e35486fe1520687
This commit is contained in:
@@ -4,6 +4,7 @@ Installs and configures quantum
|
||||
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import uuid
|
||||
|
||||
from packstack.installer import utils
|
||||
@@ -348,6 +349,16 @@ def createL2AgentManifests(config):
|
||||
if controller.CONF["CONFIG_QUANTUM_L2_PLUGIN"] == "openvswitch":
|
||||
host_var = 'CONFIG_QUANTUM_OVS_HOST'
|
||||
template_name = 'quantum_ovs_agent.pp'
|
||||
|
||||
# The CONFIG_QUANTUM_OVS_BRIDGE_MAPPINGS parameter contains a
|
||||
# comma-separated list of bridge mappings. Since the puppet module
|
||||
# expects this parameter to be an array, this parameter must be properly
|
||||
# formatted by packstack, then consumed by the puppet module.
|
||||
# For example, the input string 'A, B, C' should formatted as '['A','B','C']'.
|
||||
r = re.compile("[\s,]+")
|
||||
controller.CONF["CONFIG_QUANTUM_OVS_BRIDGE_MAPPINGS"] = \
|
||||
str(filter(None, r.split(controller.CONF["CONFIG_QUANTUM_OVS_BRIDGE_MAPPINGS"])))
|
||||
|
||||
elif controller.CONF["CONFIG_QUANTUM_L2_PLUGIN"] == "linuxbridge":
|
||||
host_var = 'CONFIG_QUANTUM_LB_HOST'
|
||||
template_name = 'quantum_lb_agent.pp'
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
class { 'quantum::agents::ovs':
|
||||
bridge_mappings => %(CONFIG_QUANTUM_OVS_BRIDGE_MAPPINGS)s,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user