Browse code

Merge "Fix incorrect comparisions"

Jenkins authored on 2014/05/10 07:12:40
Showing 6 changed files
... ...
@@ -15,7 +15,7 @@ function neutron_plugin_configure_common {
15 15
 }
16 16
 
17 17
 function neutron_plugin_configure_service {
18
-    if [[ "$ENABLE_TENANT_VLANS" = "True" ]]; then
18
+    if [[ "$ENABLE_TENANT_VLANS" == "True" ]]; then
19 19
         iniset /$Q_PLUGIN_CONF_FILE vlans tenant_network_type vlan
20 20
     else
21 21
         echo "WARNING - The linuxbridge plugin is using local tenant networks, with no connectivity between hosts."
... ...
@@ -23,7 +23,7 @@ function neutron_plugin_configure_service {
23 23
 
24 24
     # Override ``LB_VLAN_RANGES`` and ``LB_INTERFACE_MAPPINGS`` in ``localrc``
25 25
     # for more complex physical network configurations.
26
-    if [[ "$LB_VLAN_RANGES" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]]; then
26
+    if [[ "$LB_VLAN_RANGES" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]]; then
27 27
         LB_VLAN_RANGES=$PHYSICAL_NETWORK
28 28
         if [[ "$TENANT_VLAN_RANGE" != "" ]]; then
29 29
             LB_VLAN_RANGES=$LB_VLAN_RANGES:$TENANT_VLAN_RANGE
... ...
@@ -35,7 +35,7 @@ function neutron_plugin_configure_plugin_agent {
35 35
     # Setup physical network interface mappings.  Override
36 36
     # ``LB_VLAN_RANGES`` and ``LB_INTERFACE_MAPPINGS`` in ``localrc`` for more
37 37
     # complex physical network configurations.
38
-    if [[ "$LB_INTERFACE_MAPPINGS" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$LB_PHYSICAL_INTERFACE" != "" ]]; then
38
+    if [[ "$LB_INTERFACE_MAPPINGS" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$LB_PHYSICAL_INTERFACE" != "" ]]; then
39 39
         LB_INTERFACE_MAPPINGS=$PHYSICAL_NETWORK:$LB_PHYSICAL_INTERFACE
40 40
     fi
41 41
     if [[ "$LB_INTERFACE_MAPPINGS" != "" ]]; then
... ...
@@ -11,7 +11,7 @@ Q_ML2_TENANT_NETWORK_TYPE=${Q_ML2_TENANT_NETWORK_TYPE:-}
11 11
 # This has to be set here since the agent will set this in the config file
12 12
 if [[ "$Q_ML2_TENANT_NETWORK_TYPE" != "" ]]; then
13 13
     Q_AGENT_EXTRA_AGENT_OPTS+=(tunnel_types=$Q_ML2_TENANT_NETWORK_TYPE)
14
-elif [[ "$ENABLE_TENANT_TUNNELS" = "True" ]]; then
14
+elif [[ "$ENABLE_TENANT_TUNNELS" == "True" ]]; then
15 15
     Q_AGENT_EXTRA_AGENT_OPTS+=(tunnel_types=gre)
16 16
 fi
17 17
 
... ...
@@ -60,12 +60,12 @@ function neutron_plugin_configure_common {
60 60
 function neutron_plugin_configure_service {
61 61
     if [[ "$Q_ML2_TENANT_NETWORK_TYPE" != "" ]]; then
62 62
         Q_SRV_EXTRA_OPTS+=(tenant_network_types=$Q_ML2_TENANT_NETWORK_TYPE)
63
-    elif [[ "$ENABLE_TENANT_TUNNELS" = "True" ]]; then
63
+    elif [[ "$ENABLE_TENANT_TUNNELS" == "True" ]]; then
64 64
         # This assumes you want a simple configuration, and will overwrite
65 65
         # Q_SRV_EXTRA_OPTS if set in addition to ENABLE_TENANT_TUNNELS.
66 66
         Q_SRV_EXTRA_OPTS+=(tenant_network_types=gre)
67 67
         Q_ML2_PLUGIN_GRE_TYPE_OPTIONS=(tunnel_id_ranges=$TENANT_TUNNEL_RANGES)
68
-    elif [[ "$ENABLE_TENANT_VLANS" = "True" ]]; then
68
+    elif [[ "$ENABLE_TENANT_VLANS" == "True" ]]; then
69 69
         Q_SRV_EXTRA_OPTS+=(tenant_network_types=vlan)
70 70
     else
71 71
         echo "WARNING - The ml2 plugin is using local tenant networks, with no connectivity between hosts."
... ...
@@ -74,7 +74,7 @@ function neutron_plugin_configure_service {
74 74
     # Allow for overrding VLAN configuration (for example, to configure provider
75 75
     # VLANs) by first checking if Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS is set.
76 76
     if [ "$Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS" == "" ]; then
77
-        if [[ "$ML2_VLAN_RANGES" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]]; then
77
+        if [[ "$ML2_VLAN_RANGES" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]]; then
78 78
             ML2_VLAN_RANGES=$PHYSICAL_NETWORK
79 79
             if [[ "$TENANT_VLAN_RANGE" != "" ]]; then
80 80
                 ML2_VLAN_RANGES=$ML2_VLAN_RANGES:$TENANT_VLAN_RANGE
... ...
@@ -46,7 +46,7 @@ function neutron_plugin_configure_plugin_agent {
46 46
     fi
47 47
 
48 48
     # Enable tunnel networks if selected
49
-    if [[ "$OVS_ENABLE_TUNNELING" = "True" ]]; then
49
+    if [[ "$OVS_ENABLE_TUNNELING" == "True" ]]; then
50 50
         # Verify tunnels are supported
51 51
         # REVISIT - also check kernel module support for GRE and patch ports
52 52
         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 {
60 60
     # Setup physical network bridge mappings.  Override
61 61
     # ``OVS_VLAN_RANGES`` and ``OVS_BRIDGE_MAPPINGS`` in ``localrc`` for more
62 62
     # complex physical network configurations.
63
-    if [[ "$OVS_BRIDGE_MAPPINGS" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$OVS_PHYSICAL_BRIDGE" != "" ]]; then
63
+    if [[ "$OVS_BRIDGE_MAPPINGS" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$OVS_PHYSICAL_BRIDGE" != "" ]]; then
64 64
         OVS_BRIDGE_MAPPINGS=$PHYSICAL_NETWORK:$OVS_PHYSICAL_BRIDGE
65 65
 
66 66
         # Configure bridge manually with physical interface as port for multi-node
... ...
@@ -15,10 +15,10 @@ function neutron_plugin_configure_common {
15 15
 }
16 16
 
17 17
 function neutron_plugin_configure_service {
18
-    if [[ "$ENABLE_TENANT_TUNNELS" = "True" ]]; then
18
+    if [[ "$ENABLE_TENANT_TUNNELS" == "True" ]]; then
19 19
         iniset /$Q_PLUGIN_CONF_FILE ovs tenant_network_type gre
20 20
         iniset /$Q_PLUGIN_CONF_FILE ovs tunnel_id_ranges $TENANT_TUNNEL_RANGES
21
-    elif [[ "$ENABLE_TENANT_VLANS" = "True" ]]; then
21
+    elif [[ "$ENABLE_TENANT_VLANS" == "True" ]]; then
22 22
         iniset /$Q_PLUGIN_CONF_FILE ovs tenant_network_type vlan
23 23
     else
24 24
         echo "WARNING - The openvswitch plugin is using local tenant networks, with no connectivity between hosts."
... ...
@@ -26,7 +26,7 @@ function neutron_plugin_configure_service {
26 26
 
27 27
     # Override ``OVS_VLAN_RANGES`` and ``OVS_BRIDGE_MAPPINGS`` in ``localrc``
28 28
     # for more complex physical network configurations.
29
-    if [[ "$OVS_VLAN_RANGES" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]]; then
29
+    if [[ "$OVS_VLAN_RANGES" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]]; then
30 30
         OVS_VLAN_RANGES=$PHYSICAL_NETWORK
31 31
         if [[ "$TENANT_VLAN_RANGE" != "" ]]; then
32 32
             OVS_VLAN_RANGES=$OVS_VLAN_RANGES:$TENANT_VLAN_RANGE
... ...
@@ -37,7 +37,7 @@ function neutron_plugin_configure_service {
37 37
     fi
38 38
 
39 39
     # Enable tunnel networks if selected
40
-    if [[ $OVS_ENABLE_TUNNELING = "True" ]]; then
40
+    if [[ $OVS_ENABLE_TUNNELING == "True" ]]; then
41 41
         iniset /$Q_PLUGIN_CONF_FILE ovs enable_tunneling True
42 42
     fi
43 43
 
... ...
@@ -9,7 +9,7 @@ source $TOP_DIR/lib/neutron_plugins/ovs_base
9 9
 
10 10
 function neutron_plugin_create_nova_conf {
11 11
     _neutron_ovs_base_configure_nova_vif_driver
12
-    if [ "$VIRT_DRIVER" = 'xenserver' ]; then
12
+    if [ "$VIRT_DRIVER" == 'xenserver' ]; then
13 13
         iniset $NOVA_CONF xenserver vif_driver nova.virt.xenapi.vif.XenAPIOpenVswitchDriver
14 14
         iniset $NOVA_CONF xenserver ovs_integration_bridge $XEN_INTEGRATION_BRIDGE
15 15
         # Disable nova's firewall so that it does not conflict with neutron
... ...
@@ -40,7 +40,7 @@ function neutron_plugin_configure_plugin_agent {
40 40
     _neutron_ovs_base_configure_firewall_driver
41 41
 
42 42
     # Setup agent for tunneling
43
-    if [[ "$OVS_ENABLE_TUNNELING" = "True" ]]; then
43
+    if [[ "$OVS_ENABLE_TUNNELING" == "True" ]]; then
44 44
         # Verify tunnels are supported
45 45
         # REVISIT - also check kernel module support for GRE and patch ports
46 46
         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 {
54 54
     # Setup physical network bridge mappings.  Override
55 55
     # ``OVS_VLAN_RANGES`` and ``OVS_BRIDGE_MAPPINGS`` in ``localrc`` for more
56 56
     # complex physical network configurations.
57
-    if [[ "$OVS_BRIDGE_MAPPINGS" = "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$OVS_PHYSICAL_BRIDGE" != "" ]]; then
57
+    if [[ "$OVS_BRIDGE_MAPPINGS" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$OVS_PHYSICAL_BRIDGE" != "" ]]; then
58 58
         OVS_BRIDGE_MAPPINGS=$PHYSICAL_NETWORK:$OVS_PHYSICAL_BRIDGE
59 59
 
60 60
         # Configure bridge manually with physical interface as port for multi-node
... ...
@@ -65,7 +65,7 @@ function neutron_plugin_configure_plugin_agent {
65 65
     fi
66 66
     AGENT_BINARY="$NEUTRON_BIN_DIR/neutron-openvswitch-agent"
67 67
 
68
-    if [ "$VIRT_DRIVER" = 'xenserver' ]; then
68
+    if [ "$VIRT_DRIVER" == 'xenserver' ]; then
69 69
         # Make a copy of our config for domU
70 70
         sudo cp /$Q_PLUGIN_CONF_FILE "/$Q_PLUGIN_CONF_FILE.domu"
71 71