... | ... |
@@ -433,15 +433,17 @@ function start_neutron_new { |
433 | 433 |
if is_service_enabled neutron-l3; then |
434 | 434 |
run_process neutron-l3 "$NEUTRON_BIN_DIR/$NEUTRON_L3_BINARY $NEUTRON_CONFIG_ARG" |
435 | 435 |
fi |
436 |
- # XXX(sc68cal) - Here's where plugins can wire up their own networks instead |
|
437 |
- # of the code in lib/neutron_plugins/services/l3 |
|
438 |
- if type -p neutron_plugin_create_initial_networks > /dev/null; then |
|
439 |
- neutron_plugin_create_initial_networks |
|
440 |
- else |
|
441 |
- # XXX(sc68cal) Load up the built in Neutron networking code and build a topology |
|
442 |
- source $TOP_DIR/lib/neutron_plugins/services/l3 |
|
443 |
- # Create the networks using servic |
|
444 |
- create_neutron_initial_network |
|
436 |
+ if is_service_enabled neutron-api; then |
|
437 |
+ # XXX(sc68cal) - Here's where plugins can wire up their own networks instead |
|
438 |
+ # of the code in lib/neutron_plugins/services/l3 |
|
439 |
+ if type -p neutron_plugin_create_initial_networks > /dev/null; then |
|
440 |
+ neutron_plugin_create_initial_networks |
|
441 |
+ else |
|
442 |
+ # XXX(sc68cal) Load up the built in Neutron networking code and build a topology |
|
443 |
+ source $TOP_DIR/lib/neutron_plugins/services/l3 |
|
444 |
+ # Create the networks using servic |
|
445 |
+ create_neutron_initial_network |
|
446 |
+ fi |
|
445 | 447 |
fi |
446 | 448 |
if is_service_enabled neutron-metadata-agent; then |
447 | 449 |
run_process neutron-metadata-agent "$NEUTRON_BIN_DIR/$NEUTRON_META_BINARY $NEUTRON_CONFIG_ARG" |
... | ... |
@@ -157,14 +157,6 @@ function _neutron_get_ext_gw_interface { |
157 | 157 |
} |
158 | 158 |
|
159 | 159 |
function create_neutron_initial_network { |
160 |
- if ! is_service_enabled q-svc && ! is_service_enabled neutron-api; then |
|
161 |
- echo "Controller services not enabled. No networks configured!" |
|
162 |
- return |
|
163 |
- fi |
|
164 |
- if [[ "$NEUTRON_CREATE_INITIAL_NETWORKS" == "False" ]]; then |
|
165 |
- echo "Network creation disabled!" |
|
166 |
- return |
|
167 |
- fi |
|
168 | 160 |
local project_id |
169 | 161 |
project_id=$(openstack project list | grep " demo " | get_field 1) |
170 | 162 |
die_if_not_set $LINENO project_id "Failure retrieving project_id for demo" |
... | ... |
@@ -1269,7 +1269,10 @@ if is_service_enabled neutron; then |
1269 | 1269 |
start_neutron |
1270 | 1270 |
fi |
1271 | 1271 |
# Once neutron agents are started setup initial network elements |
1272 |
-create_neutron_initial_network |
|
1272 |
+if is_service_enabled q-svc && [[ "$NEUTRON_CREATE_INITIAL_NETWORKS" == "True" ]]; then |
|
1273 |
+ echo_summary "Creating initial neutron network elements" |
|
1274 |
+ create_neutron_initial_network |
|
1275 |
+fi |
|
1273 | 1276 |
|
1274 | 1277 |
if is_service_enabled nova; then |
1275 | 1278 |
echo_summary "Starting Nova" |