Drop remainders of identity API v2.0 references

keystone has dropped the v2.0 API in queens, time to drop all special
casing for it.

Change-Id: If628c4627f7c8b8c2ee9bca16ea6db693cf8526a
This commit is contained in:
Dr. Jens Harbott 2024-07-08 18:02:25 +02:00
parent c707dd3fc2
commit eb0ac1d217
4 changed files with 3 additions and 34 deletions

View File

@ -68,7 +68,6 @@ try:
env = {} env = {}
passenv = ["CINDER_VERSION", passenv = ["CINDER_VERSION",
"OS_AUTH_URL", "OS_AUTH_URL",
"OS_IDENTITY_API_VERSION",
"OS_NO_CACHE", "OS_NO_CACHE",
"OS_PASSWORD", "OS_PASSWORD",
"OS_PROJECT_NAME", "OS_PROJECT_NAME",

View File

@ -18,7 +18,7 @@
# - ``PUBLIC_NETWORK_NAME`` # - ``PUBLIC_NETWORK_NAME``
# - ``VIRT_DRIVER`` # - ``VIRT_DRIVER``
# - ``LIBVIRT_TYPE`` # - ``LIBVIRT_TYPE``
# - ``KEYSTONE_SERVICE_URI``, ``KEYSTONE_SERVICE_URI_V3`` from lib/keystone # - ``KEYSTONE_SERVICE_URI_V3`` from lib/keystone
# #
# Optional Dependencies: # Optional Dependencies:
# #
@ -381,7 +381,6 @@ function configure_tempest {
iniset $TEMPEST_CONFIG volume build_timeout $BUILD_TIMEOUT iniset $TEMPEST_CONFIG volume build_timeout $BUILD_TIMEOUT
# Identity # Identity
iniset $TEMPEST_CONFIG identity uri "$KEYSTONE_SERVICE_URI/v2.0/"
iniset $TEMPEST_CONFIG identity uri_v3 "$KEYSTONE_SERVICE_URI_V3" iniset $TEMPEST_CONFIG identity uri_v3 "$KEYSTONE_SERVICE_URI_V3"
iniset $TEMPEST_CONFIG identity user_lockout_failure_attempts $KEYSTONE_LOCKOUT_FAILURE_ATTEMPTS iniset $TEMPEST_CONFIG identity user_lockout_failure_attempts $KEYSTONE_LOCKOUT_FAILURE_ATTEMPTS
iniset $TEMPEST_CONFIG identity user_lockout_duration $KEYSTONE_LOCKOUT_DURATION iniset $TEMPEST_CONFIG identity user_lockout_duration $KEYSTONE_LOCKOUT_DURATION
@ -392,19 +391,7 @@ function configure_tempest {
iniset $TEMPEST_CONFIG auth admin_project_name $admin_project_name iniset $TEMPEST_CONFIG auth admin_project_name $admin_project_name
iniset $TEMPEST_CONFIG auth admin_domain_name $admin_domain_name iniset $TEMPEST_CONFIG auth admin_domain_name $admin_domain_name
fi fi
if [ "$ENABLE_IDENTITY_V2" == "True" ]; then
# Run Identity API v2 tests ONLY if needed
iniset $TEMPEST_CONFIG identity-feature-enabled api_v2 True
else
# Skip Identity API v2 tests by default
iniset $TEMPEST_CONFIG identity-feature-enabled api_v2 False
fi
iniset $TEMPEST_CONFIG identity auth_version ${TEMPEST_AUTH_VERSION:-v3} iniset $TEMPEST_CONFIG identity auth_version ${TEMPEST_AUTH_VERSION:-v3}
if [[ "$TEMPEST_AUTH_VERSION" != "v2" ]]; then
# we're going to disable v2 admin unless we're using v2 by default.
iniset $TEMPEST_CONFIG identity-feature-enabled api_v2_admin False
fi
if is_service_enabled tls-proxy; then if is_service_enabled tls-proxy; then
iniset $TEMPEST_CONFIG identity ca_certificates_file $SSL_BUNDLE_FILE iniset $TEMPEST_CONFIG identity ca_certificates_file $SSL_BUNDLE_FILE
fi fi

17
openrc
View File

@ -55,27 +55,14 @@ else
GLANCE_HOST=${GLANCE_HOST:-$HOST_IP} GLANCE_HOST=${GLANCE_HOST:-$HOST_IP}
fi fi
# Identity API version
export OS_IDENTITY_API_VERSION=3
# Authenticating against an OpenStack cloud using Keystone returns a **Token**
# and **Service Catalog**. The catalog contains the endpoints for all services
# the user/project has access to - including nova, glance, keystone, swift, ...
# We currently recommend using the version 3 *identity api*.
#
# If you don't have a working .stackenv, this is the backup position # If you don't have a working .stackenv, this is the backup position
KEYSTONE_BACKUP=$SERVICE_PROTOCOL://$SERVICE_HOST:5000 KEYSTONE_BACKUP=$SERVICE_PROTOCOL://$SERVICE_HOST:5000
KEYSTONE_SERVICE_URI=${KEYSTONE_SERVICE_URI:-$KEYSTONE_BACKUP} KEYSTONE_SERVICE_URI=${KEYSTONE_SERVICE_URI:-$KEYSTONE_BACKUP}
export OS_AUTH_URL=${OS_AUTH_URL:-$KEYSTONE_SERVICE_URI} export OS_AUTH_URL=${OS_AUTH_URL:-$KEYSTONE_SERVICE_URI}
# Currently, in order to use openstackclient with Identity API v3, export OS_USER_DOMAIN_ID=${OS_USER_DOMAIN_ID:-"default"}
# we need to set the domain which the user and project belong to. export OS_PROJECT_DOMAIN_ID=${OS_PROJECT_DOMAIN_ID:-"default"}
if [ "$OS_IDENTITY_API_VERSION" = "3" ]; then
export OS_USER_DOMAIN_ID=${OS_USER_DOMAIN_ID:-"default"}
export OS_PROJECT_DOMAIN_ID=${OS_PROJECT_DOMAIN_ID:-"default"}
fi
# Set OS_CACERT to a default CA certificate chain if it exists. # Set OS_CACERT to a default CA certificate chain if it exists.
if [[ ! -v OS_CACERT ]] ; then if [[ ! -v OS_CACERT ]] ; then

View File

@ -162,10 +162,6 @@ else
export PS4='+ $(short_source): ' export PS4='+ $(short_source): '
fi fi
# Configure Identity API version
# TODO(frickler): Drop this when plugins no longer need it
IDENTITY_API_VERSION=3
# Global option for enforcing scope. If enabled, ENFORCE_SCOPE overrides # Global option for enforcing scope. If enabled, ENFORCE_SCOPE overrides
# each services ${SERVICE}_ENFORCE_SCOPE variables # each services ${SERVICE}_ENFORCE_SCOPE variables
ENFORCE_SCOPE=$(trueorfalse False ENFORCE_SCOPE) ENFORCE_SCOPE=$(trueorfalse False ENFORCE_SCOPE)