Configure tempest for multitenancy/flat network

Configure some tempest settings depending on if running multitenant vs
flat-network.

Add setting of [compute]/fixed_network_name for the flat-network case,
as this is required to run tempest "smoke" test.

Starting with the Newton release, multitenancy is available with
Ironic. This patch sets tempest auth.create_isolated_networks=False and
network.shared_physical_network=True only when Ironic is deployed for
a flat-network.

Partial-Bug: #1646640
Change-Id: I9807014b739b7364502d403e7ce72763f5ea698a
(cherry picked from commit 88171fcebd)
This commit is contained in:
John L. Villalovos 2016-12-02 14:11:46 -08:00
parent 6bf63a06ef
commit 083753d0f5
1 changed files with 12 additions and 6 deletions

View File

@ -1506,20 +1506,26 @@ function ironic_configure_tempest {
iniset $TEMPEST_CONFIG compute flavor_ref $bm_flavor_id
iniset $TEMPEST_CONFIG compute flavor_ref_alt $bm_flavor_id
iniset $TEMPEST_CONFIG compute-feature-enabled disk_config False
# NOTE(jlvillal): If IRONIC_PROVISION_NETWORK_NAME is set it means that
# nodes are using the neutron network driver / multi-tenant networking.
# Otherwise we are using a flat-network.
if [[ -n "${IRONIC_PROVISION_NETWORK_NAME}" ]]; then
# multi-tenant networking
iniset $TEMPEST_CONFIG baremetal use_provision_network True
else
# flat-network
iniset $TEMPEST_CONFIG compute fixed_network_name $PRIVATE_NETWORK_NAME
# NOTE(jroll) this disables multitenant network tests from tempest's
# tree, but not from our tree. This is a bit inconsistent, we should
# fix it.
iniset $TEMPEST_CONFIG auth create_isolated_networks False
iniset $TEMPEST_CONFIG network shared_physical_network True
fi
local image_uuid
image_uuid=$(openstack image show $IRONIC_IMAGE_NAME -f value -c id)
iniset $TEMPEST_CONFIG compute image_ref $image_uuid
iniset $TEMPEST_CONFIG compute image_ref_alt $image_uuid
iniset $TEMPEST_CONFIG auth create_isolated_networks False
# NOTE(jroll) this disables multitenant network tests from tempest's
# tree, but not from our tree. This is a bit inconsistent, we should
# fix it.
iniset $TEMPEST_CONFIG network shared_physical_network True
}
# Restore xtrace + pipefail