Merge "Fix incorrect comparisions"
This commit is contained in:
commit
72f32d3b97
@ -15,7 +15,7 @@ function neutron_plugin_configure_common {
|
||||
}
|
||||
|
||||
function neutron_plugin_configure_service {
|
||||
if [[ "$ENABLE_TENANT_VLANS" = "True" ]]; then
|
||||
if [[ "$ENABLE_TENANT_VLANS" == "True" ]]; then
|
||||
iniset /$Q_PLUGIN_CONF_FILE vlans tenant_network_type vlan
|
||||
else
|
||||
echo "WARNING - The linuxbridge plugin is using local tenant networks, with no connectivity between hosts."
|
||||
@ -23,7 +23,7 @@ function neutron_plugin_configure_service {
|
||||
|
||||
# Override ``LB_VLAN_RANGES`` and ``LB_INTERFACE_MAPPINGS`` in ``localrc``
|
||||
# for more complex physical network configurations.
|
||||
if [[ "$LB_VLAN_RANGES" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]]; then
|
||||
if [[ "$LB_VLAN_RANGES" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]]; then
|
||||
LB_VLAN_RANGES=$PHYSICAL_NETWORK
|
||||
if [[ "$TENANT_VLAN_RANGE" != "" ]]; then
|
||||
LB_VLAN_RANGES=$LB_VLAN_RANGES:$TENANT_VLAN_RANGE
|
||||
|
@ -35,7 +35,7 @@ function neutron_plugin_configure_plugin_agent {
|
||||
# Setup physical network interface mappings. Override
|
||||
# ``LB_VLAN_RANGES`` and ``LB_INTERFACE_MAPPINGS`` in ``localrc`` for more
|
||||
# complex physical network configurations.
|
||||
if [[ "$LB_INTERFACE_MAPPINGS" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$LB_PHYSICAL_INTERFACE" != "" ]]; then
|
||||
if [[ "$LB_INTERFACE_MAPPINGS" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$LB_PHYSICAL_INTERFACE" != "" ]]; then
|
||||
LB_INTERFACE_MAPPINGS=$PHYSICAL_NETWORK:$LB_PHYSICAL_INTERFACE
|
||||
fi
|
||||
if [[ "$LB_INTERFACE_MAPPINGS" != "" ]]; then
|
||||
|
@ -11,7 +11,7 @@ Q_ML2_TENANT_NETWORK_TYPE=${Q_ML2_TENANT_NETWORK_TYPE:-}
|
||||
# This has to be set here since the agent will set this in the config file
|
||||
if [[ "$Q_ML2_TENANT_NETWORK_TYPE" != "" ]]; then
|
||||
Q_AGENT_EXTRA_AGENT_OPTS+=(tunnel_types=$Q_ML2_TENANT_NETWORK_TYPE)
|
||||
elif [[ "$ENABLE_TENANT_TUNNELS" = "True" ]]; then
|
||||
elif [[ "$ENABLE_TENANT_TUNNELS" == "True" ]]; then
|
||||
Q_AGENT_EXTRA_AGENT_OPTS+=(tunnel_types=gre)
|
||||
fi
|
||||
|
||||
@ -60,12 +60,12 @@ function neutron_plugin_configure_common {
|
||||
function neutron_plugin_configure_service {
|
||||
if [[ "$Q_ML2_TENANT_NETWORK_TYPE" != "" ]]; then
|
||||
Q_SRV_EXTRA_OPTS+=(tenant_network_types=$Q_ML2_TENANT_NETWORK_TYPE)
|
||||
elif [[ "$ENABLE_TENANT_TUNNELS" = "True" ]]; then
|
||||
elif [[ "$ENABLE_TENANT_TUNNELS" == "True" ]]; then
|
||||
# This assumes you want a simple configuration, and will overwrite
|
||||
# Q_SRV_EXTRA_OPTS if set in addition to ENABLE_TENANT_TUNNELS.
|
||||
Q_SRV_EXTRA_OPTS+=(tenant_network_types=gre)
|
||||
Q_ML2_PLUGIN_GRE_TYPE_OPTIONS=(tunnel_id_ranges=$TENANT_TUNNEL_RANGES)
|
||||
elif [[ "$ENABLE_TENANT_VLANS" = "True" ]]; then
|
||||
elif [[ "$ENABLE_TENANT_VLANS" == "True" ]]; then
|
||||
Q_SRV_EXTRA_OPTS+=(tenant_network_types=vlan)
|
||||
else
|
||||
echo "WARNING - The ml2 plugin is using local tenant networks, with no connectivity between hosts."
|
||||
@ -74,7 +74,7 @@ function neutron_plugin_configure_service {
|
||||
# Allow for overrding VLAN configuration (for example, to configure provider
|
||||
# VLANs) by first checking if Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS is set.
|
||||
if [ "$Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS" == "" ]; then
|
||||
if [[ "$ML2_VLAN_RANGES" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]]; then
|
||||
if [[ "$ML2_VLAN_RANGES" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]]; then
|
||||
ML2_VLAN_RANGES=$PHYSICAL_NETWORK
|
||||
if [[ "$TENANT_VLAN_RANGE" != "" ]]; then
|
||||
ML2_VLAN_RANGES=$ML2_VLAN_RANGES:$TENANT_VLAN_RANGE
|
||||
|
@ -46,7 +46,7 @@ function neutron_plugin_configure_plugin_agent {
|
||||
fi
|
||||
|
||||
# Enable tunnel networks if selected
|
||||
if [[ "$OVS_ENABLE_TUNNELING" = "True" ]]; then
|
||||
if [[ "$OVS_ENABLE_TUNNELING" == "True" ]]; then
|
||||
# Verify tunnels are supported
|
||||
# REVISIT - also check kernel module support for GRE and patch ports
|
||||
OVS_VERSION=`ovs-vsctl --version | head -n 1 | grep -E -o "[0-9]+\.[0-9]+"`
|
||||
@ -60,7 +60,7 @@ function neutron_plugin_configure_plugin_agent {
|
||||
# Setup physical network bridge mappings. Override
|
||||
# ``OVS_VLAN_RANGES`` and ``OVS_BRIDGE_MAPPINGS`` in ``localrc`` for more
|
||||
# complex physical network configurations.
|
||||
if [[ "$OVS_BRIDGE_MAPPINGS" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$OVS_PHYSICAL_BRIDGE" != "" ]]; then
|
||||
if [[ "$OVS_BRIDGE_MAPPINGS" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$OVS_PHYSICAL_BRIDGE" != "" ]]; then
|
||||
OVS_BRIDGE_MAPPINGS=$PHYSICAL_NETWORK:$OVS_PHYSICAL_BRIDGE
|
||||
|
||||
# Configure bridge manually with physical interface as port for multi-node
|
||||
|
@ -15,10 +15,10 @@ function neutron_plugin_configure_common {
|
||||
}
|
||||
|
||||
function neutron_plugin_configure_service {
|
||||
if [[ "$ENABLE_TENANT_TUNNELS" = "True" ]]; then
|
||||
if [[ "$ENABLE_TENANT_TUNNELS" == "True" ]]; then
|
||||
iniset /$Q_PLUGIN_CONF_FILE ovs tenant_network_type gre
|
||||
iniset /$Q_PLUGIN_CONF_FILE ovs tunnel_id_ranges $TENANT_TUNNEL_RANGES
|
||||
elif [[ "$ENABLE_TENANT_VLANS" = "True" ]]; then
|
||||
elif [[ "$ENABLE_TENANT_VLANS" == "True" ]]; then
|
||||
iniset /$Q_PLUGIN_CONF_FILE ovs tenant_network_type vlan
|
||||
else
|
||||
echo "WARNING - The openvswitch plugin is using local tenant networks, with no connectivity between hosts."
|
||||
@ -26,7 +26,7 @@ function neutron_plugin_configure_service {
|
||||
|
||||
# Override ``OVS_VLAN_RANGES`` and ``OVS_BRIDGE_MAPPINGS`` in ``localrc``
|
||||
# for more complex physical network configurations.
|
||||
if [[ "$OVS_VLAN_RANGES" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]]; then
|
||||
if [[ "$OVS_VLAN_RANGES" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]]; then
|
||||
OVS_VLAN_RANGES=$PHYSICAL_NETWORK
|
||||
if [[ "$TENANT_VLAN_RANGE" != "" ]]; then
|
||||
OVS_VLAN_RANGES=$OVS_VLAN_RANGES:$TENANT_VLAN_RANGE
|
||||
@ -37,7 +37,7 @@ function neutron_plugin_configure_service {
|
||||
fi
|
||||
|
||||
# Enable tunnel networks if selected
|
||||
if [[ $OVS_ENABLE_TUNNELING = "True" ]]; then
|
||||
if [[ $OVS_ENABLE_TUNNELING == "True" ]]; then
|
||||
iniset /$Q_PLUGIN_CONF_FILE ovs enable_tunneling True
|
||||
fi
|
||||
|
||||
|
@ -9,7 +9,7 @@ source $TOP_DIR/lib/neutron_plugins/ovs_base
|
||||
|
||||
function neutron_plugin_create_nova_conf {
|
||||
_neutron_ovs_base_configure_nova_vif_driver
|
||||
if [ "$VIRT_DRIVER" = 'xenserver' ]; then
|
||||
if [ "$VIRT_DRIVER" == 'xenserver' ]; then
|
||||
iniset $NOVA_CONF xenserver vif_driver nova.virt.xenapi.vif.XenAPIOpenVswitchDriver
|
||||
iniset $NOVA_CONF xenserver ovs_integration_bridge $XEN_INTEGRATION_BRIDGE
|
||||
# Disable nova's firewall so that it does not conflict with neutron
|
||||
@ -40,7 +40,7 @@ function neutron_plugin_configure_plugin_agent {
|
||||
_neutron_ovs_base_configure_firewall_driver
|
||||
|
||||
# Setup agent for tunneling
|
||||
if [[ "$OVS_ENABLE_TUNNELING" = "True" ]]; then
|
||||
if [[ "$OVS_ENABLE_TUNNELING" == "True" ]]; then
|
||||
# Verify tunnels are supported
|
||||
# REVISIT - also check kernel module support for GRE and patch ports
|
||||
OVS_VERSION=`ovs-vsctl --version | head -n 1 | grep -E -o "[0-9]+\.[0-9]+"`
|
||||
@ -54,7 +54,7 @@ function neutron_plugin_configure_plugin_agent {
|
||||
# Setup physical network bridge mappings. Override
|
||||
# ``OVS_VLAN_RANGES`` and ``OVS_BRIDGE_MAPPINGS`` in ``localrc`` for more
|
||||
# complex physical network configurations.
|
||||
if [[ "$OVS_BRIDGE_MAPPINGS" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$OVS_PHYSICAL_BRIDGE" != "" ]]; then
|
||||
if [[ "$OVS_BRIDGE_MAPPINGS" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$OVS_PHYSICAL_BRIDGE" != "" ]]; then
|
||||
OVS_BRIDGE_MAPPINGS=$PHYSICAL_NETWORK:$OVS_PHYSICAL_BRIDGE
|
||||
|
||||
# Configure bridge manually with physical interface as port for multi-node
|
||||
@ -65,7 +65,7 @@ function neutron_plugin_configure_plugin_agent {
|
||||
fi
|
||||
AGENT_BINARY="$NEUTRON_BIN_DIR/neutron-openvswitch-agent"
|
||||
|
||||
if [ "$VIRT_DRIVER" = 'xenserver' ]; then
|
||||
if [ "$VIRT_DRIVER" == 'xenserver' ]; then
|
||||
# Make a copy of our config for domU
|
||||
sudo cp /$Q_PLUGIN_CONF_FILE "/$Q_PLUGIN_CONF_FILE.domu"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user