Browse code

Merge "Add support for setting extra networking configuration options."

Jenkins authored on 2013/06/13 13:14:47
Showing 6 changed files
... ...
@@ -122,6 +122,19 @@ In order to enable Quantum a single node setup, you'll need the following settin
122 122
 
123 123
 Then run `stack.sh` as normal.
124 124
 
125
+devstack supports adding specific Quantum configuration flags to both the Open vSwitch and LinuxBridge plugin configuration files. To make use of this feature, the following variables are defined and can be configured in your `localrc` file:
126
+
127
+    Variable Name             Plugin Config File Section Modified
128
+    -------------------------------------------------------------------------------------
129
+    Q_SRV_EXTRA_OPTS          `OVS` (for Open Vswitch) or `LINUX_BRIDGE` (for LinuxBridge)
130
+    Q_AGENT_EXTRA_AGENT_OPTS  AGENT
131
+    Q_AGENT_EXTRA_SRV_OPTS    `OVS` (for Open Vswitch) or `LINUX_BRIDGE` (for LinuxBridge)
132
+
133
+An example of using the variables in your `localrc` is below:
134
+
135
+    Q_AGENT_EXTRA_AGENT_OPTS=(tunnel_type=vxlan vxlan_udp_port=8472)
136
+    Q_SRV_EXTRA_OPTS=(tenant_network_type=vxlan)
137
+
125 138
 # Tempest
126 139
 
127 140
 If tempest has been successfully configured, a basic set of smoke tests can be run as follows:
... ...
@@ -52,6 +52,10 @@
52 52
 # Quantum.
53 53
 #
54 54
 # With Quantum networking the NETWORK_MANAGER variable is ignored.
55
+#
56
+# To enable specific configuration options for either the Open vSwitch or
57
+# LinuxBridge plugin, please see the top level README file under the
58
+# Quantum section.
55 59
 
56 60
 # Save trace setting
57 61
 XTRACE=$(set +o | grep xtrace)
... ...
@@ -35,6 +35,14 @@ function quantum_plugin_configure_service() {
35 35
     else
36 36
         iniset /$Q_PLUGIN_CONF_FILE SECURITYGROUP firewall_driver quantum.agent.firewall.NoopFirewallDriver
37 37
     fi
38
+
39
+    # Define extra "LINUX_BRIDGE" configuration options when q-svc is configured by defining
40
+    # the array ``Q_SRV_EXTRA_OPTS``.
41
+    # For Example: ``Q_SRV_EXTRA_OPTS=(foo=true bar=2)``
42
+    for I in "${Q_SRV_EXTRA_OPTS[@]}"; do
43
+        # Replace the first '=' with ' ' for iniset syntax
44
+        iniset /$Q_PLUGIN_CONF_FILE LINUX_BRIDGE ${I/=/ }
45
+    done
38 46
 }
39 47
 
40 48
 function has_quantum_plugin_security_group() {
... ...
@@ -47,6 +47,20 @@ function quantum_plugin_configure_plugin_agent() {
47 47
         iniset /$Q_PLUGIN_CONF_FILE SECURITYGROUP firewall_driver quantum.agent.firewall.NoopFirewallDriver
48 48
     fi
49 49
     AGENT_BINARY="$QUANTUM_DIR/bin/quantum-linuxbridge-agent"
50
+    # Define extra "AGENT" configuration options when q-agt is configured by defining
51
+    # the array ``Q_AGENT_EXTRA_AGENT_OPTS``.
52
+    # For Example: ``Q_AGENT_EXTRA_AGENT_OPTS=(foo=true bar=2)``
53
+    for I in "${Q_AGENT_EXTRA_AGENT_OPTS[@]}"; do
54
+        # Replace the first '=' with ' ' for iniset syntax
55
+        iniset /$Q_PLUGIN_CONF_FILE AGENT ${I/=/ }
56
+    done
57
+    # Define extra "LINUX_BRIDGE" configuration options when q-agt is configured by defining
58
+    # the array ``Q_AGENT_EXTRA_SRV_OPTS``.
59
+    # For Example: ``Q_AGENT_EXTRA_SRV_OPTS=(foo=true bar=2)``
60
+    for I in "${Q_AGENT_EXTRA_SRV_OPTS[@]}"; do
61
+        # Replace the first '=' with ' ' for iniset syntax
62
+        iniset /$Q_PLUGIN_CONF_FILE LINUX_BRIDGE ${I/=/ }
63
+    done
50 64
 }
51 65
 
52 66
 function quantum_plugin_setup_interface_driver() {
... ...
@@ -42,6 +42,14 @@ function quantum_plugin_configure_service() {
42 42
     fi
43 43
 
44 44
     _quantum_ovs_base_configure_firewall_driver
45
+
46
+    # Define extra "OVS" configuration options when q-svc is configured by defining
47
+    # the array ``Q_SRV_EXTRA_OPTS``.
48
+    # For Example: ``Q_SRV_EXTRA_OPTS=(foo=true bar=2)``
49
+    for I in "${Q_SRV_EXTRA_OPTS[@]}"; do
50
+        # Replace the first '=' with ' ' for iniset syntax
51
+        iniset /$Q_PLUGIN_CONF_FILE OVS ${I/=/ }
52
+    done
45 53
 }
46 54
 
47 55
 function has_quantum_plugin_security_group() {
... ...
@@ -102,6 +102,20 @@ function quantum_plugin_configure_plugin_agent() {
102 102
         # Set root wrap
103 103
         iniset "/$Q_PLUGIN_CONF_FILE.domU" AGENT root_helper "$Q_RR_COMMAND"
104 104
     fi
105
+    # Define extra "AGENT" configuration options when q-agt is configured by defining
106
+    # defining the array ``Q_AGENT_EXTRA_AGENT_OPTS``.
107
+    # For Example: ``Q_AGENT_EXTRA_AGENT_OPTS=(foo=true bar=2)``
108
+    for I in "${Q_AGENT_EXTRA_AGENT_OPTS[@]}"; do
109
+        # Replace the first '=' with ' ' for iniset syntax
110
+        iniset /$Q_PLUGIN_CONF_FILE AGENT ${I/=/ }
111
+    done
112
+    # Define extra "OVS" configuration options when q-agt is configured by defining
113
+    # defining the array ``Q_AGENT_EXTRA_SRV_OPTS``.
114
+    # For Example: ``Q_AGENT_EXTRA_SRV_OPTS=(foo=true bar=2)``
115
+    for I in "${Q_AGENT_EXTRA_SRV_OPTS[@]}"; do
116
+        # Replace the first '=' with ' ' for iniset syntax
117
+        iniset /$Q_PLUGIN_CONF_FILE OVS ${I/=/ }
118
+    done
105 119
 }
106 120
 
107 121
 function quantum_plugin_setup_interface_driver() {