blob: 71832f14277f08ec8aab19374ed2aded0cc5540c [file] [log] [blame]
Isaku Yamahata0dd34df2012-12-28 13:15:31 +09001# Quantum Linux Bridge plugin
2# ---------------------------
3
4# Save trace setting
Dean Troyer8d55be32013-02-07 17:16:35 -06005MY_XTRACE=$(set +o | grep xtrace)
Isaku Yamahata0dd34df2012-12-28 13:15:31 +09006set +o xtrace
7
Isaku Yamahata0dd34df2012-12-28 13:15:31 +09008function quantum_plugin_configure_common() {
9 Q_PLUGIN_CONF_PATH=etc/quantum/plugins/linuxbridge
10 Q_PLUGIN_CONF_FILENAME=linuxbridge_conf.ini
11 Q_DB_NAME="quantum_linux_bridge"
12 Q_PLUGIN_CLASS="quantum.plugins.linuxbridge.lb_quantum_plugin.LinuxBridgePluginV2"
13}
14
Isaku Yamahata0dd34df2012-12-28 13:15:31 +090015function quantum_plugin_configure_service() {
16 if [[ "$ENABLE_TENANT_VLANS" = "True" ]]; then
17 iniset /$Q_PLUGIN_CONF_FILE VLANS tenant_network_type vlan
18 else
19 echo "WARNING - The linuxbridge plugin is using local tenant networks, with no connectivity between hosts."
20 fi
21
22 # Override ``LB_VLAN_RANGES`` and ``LB_INTERFACE_MAPPINGS`` in ``localrc``
23 # for more complex physical network configurations.
24 if [[ "$LB_VLAN_RANGES" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]]; then
25 LB_VLAN_RANGES=$PHYSICAL_NETWORK
26 if [[ "$TENANT_VLAN_RANGE" != "" ]]; then
27 LB_VLAN_RANGES=$LB_VLAN_RANGES:$TENANT_VLAN_RANGE
28 fi
29 fi
30 if [[ "$LB_VLAN_RANGES" != "" ]]; then
31 iniset /$Q_PLUGIN_CONF_FILE VLANS network_vlan_ranges $LB_VLAN_RANGES
32 fi
Jiajun Liue6f2ee52013-05-14 09:48:15 +000033 if [[ "$Q_USE_SECGROUP" == "True" ]]; then
34 iniset /$Q_PLUGIN_CONF_FILE SECURITYGROUP firewall_driver quantum.agent.linux.iptables_firewall.IptablesFirewallDriver
35 else
36 iniset /$Q_PLUGIN_CONF_FILE SECURITYGROUP firewall_driver quantum.agent.firewall.NoopFirewallDriver
37 fi
Isaku Yamahata0dd34df2012-12-28 13:15:31 +090038}
39
Akihiro MOTOKI3452f8e2013-03-21 14:11:27 +090040function has_quantum_plugin_security_group() {
41 # 0 means True here
42 return 0
43}
44
Isaku Yamahata0dd34df2012-12-28 13:15:31 +090045# Restore xtrace
Dean Troyer8d55be32013-02-07 17:16:35 -060046$MY_XTRACE