Currently devstack assumes that the network used for ssh
validation is the private network. This patch adds a hook that
sets the network used for ssh validation based on whether or not
provider networking is being used. It also moves the function
'is_provider_network' into functions-common as it will now be
used by both tempest and neutron.
Change-Id: I265c9e26c9bfb18b7e201f27d8912b8bec235872
... | ... |
@@ -2260,6 +2260,14 @@ function maskip { |
2260 | 2260 |
echo $subnet |
2261 | 2261 |
} |
2262 | 2262 |
|
2263 |
+function is_provider_network { |
|
2264 |
+ if [ "$Q_USE_PROVIDER_NETWORKING" == "True" ]; then |
|
2265 |
+ return 0 |
|
2266 |
+ fi |
|
2267 |
+ return 1 |
|
2268 |
+} |
|
2269 |
+ |
|
2270 |
+ |
|
2263 | 2271 |
# Return the current python as "python<major>.<minor>" |
2264 | 2272 |
function python_version { |
2265 | 2273 |
local python_version |
... | ... |
@@ -434,13 +434,6 @@ function _neutron_configure_router_v6 { |
434 | 434 |
fi |
435 | 435 |
} |
436 | 436 |
|
437 |
-function is_provider_network { |
|
438 |
- if [ "$Q_USE_PROVIDER_NETWORKING" == "True" ]; then |
|
439 |
- return 0 |
|
440 |
- fi |
|
441 |
- return 1 |
|
442 |
-} |
|
443 |
- |
|
444 | 437 |
function is_networking_extension_supported { |
445 | 438 |
local extension=$1 |
446 | 439 |
# TODO(sc68cal) cache this instead of calling every time |
... | ... |
@@ -414,12 +414,17 @@ function configure_tempest { |
414 | 414 |
iniset $TEMPEST_CONFIG scenario aki_img_file "cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-vmlinuz" |
415 | 415 |
iniset $TEMPEST_CONFIG scenario img_file "cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk.img" |
416 | 416 |
|
417 |
+ # If using provider networking, use the physical network for validation rather than private |
|
418 |
+ TEMPEST_SSH_NETWORK_NAME=$PRIVATE_NETWORK_NAME |
|
419 |
+ if is_provider_network; then |
|
420 |
+ TEMPEST_SSH_NETWORK_NAME=$PHYSICAL_NETWORK |
|
421 |
+ fi |
|
417 | 422 |
# Validation |
418 | 423 |
iniset $TEMPEST_CONFIG validation run_validation ${TEMPEST_RUN_VALIDATION:-False} |
419 | 424 |
iniset $TEMPEST_CONFIG validation ip_version_for_ssh 4 |
420 | 425 |
iniset $TEMPEST_CONFIG validation ssh_timeout $BUILD_TIMEOUT |
421 | 426 |
iniset $TEMPEST_CONFIG validation image_ssh_user ${DEFAULT_INSTANCE_USER:-cirros} |
422 |
- iniset $TEMPEST_CONFIG validation network_for_ssh $PRIVATE_NETWORK_NAME |
|
427 |
+ iniset $TEMPEST_CONFIG validation network_for_ssh $TEMPEST_SSH_NETWORK_NAME |
|
423 | 428 |
|
424 | 429 |
# Volume |
425 | 430 |
# TODO(obutenko): Remove snapshot_backup when liberty-eol happens. |