CI: Create admin endpoint for keystone
A recent devstack change [1] has switched off the creation of an admin endpoint for keystone, which we need. Create it again until we update Tacker to stop using it. And devstack patch [2] has stopped creating userrc_early and If we do not use OS_CLOUD, we must override the --os-cloud option of the openstack command. So, this patch fixes to set default OS_CLOUD setting overridden. And for UUID formatting checks in db/types.py, fix to use first element for List, since value may be passed as a List. [1] https://review.opendev.org/c/openstack/devstack/+/735472 [2] https://review.opendev.org/c/openstack/devstack/+/780417 Change-Id: I39be7c48aca4be9a4e0bcec6dc6fa45b11c623b3
This commit is contained in:
parent
6cab16be36
commit
975cce621e
@ -13,6 +13,7 @@
|
||||
# - install_tacker
|
||||
# - configure_tacker
|
||||
# - create_tacker_accounts
|
||||
# - create_keystone_endpoint
|
||||
# - init_tacker
|
||||
# - start_tacker
|
||||
# - tacker_horizon_install
|
||||
@ -143,6 +144,17 @@ function create_tacker_accounts {
|
||||
fi
|
||||
}
|
||||
|
||||
# create_keystone_endpoint() - create admin endpoint for keystone
|
||||
function create_keystone_endpoint {
|
||||
KEYSTONE_SERVICE=$(get_or_create_service "keystone" \
|
||||
"identity" "Keystone Identity Service")
|
||||
get_or_create_endpoint $KEYSTONE_SERVICE \
|
||||
"$REGION_NAME" \
|
||||
"${KEYSTONE_SERVICE_PROTOCOL}://${KEYSTONE_SERVICE_HOST}/identity" \
|
||||
"${KEYSTONE_SERVICE_PROTOCOL}://${KEYSTONE_SERVICE_HOST}/identity" \
|
||||
"${KEYSTONE_SERVICE_PROTOCOL}://${KEYSTONE_SERVICE_HOST}/identity"
|
||||
}
|
||||
|
||||
# stack.sh entry points
|
||||
# ---------------------
|
||||
|
||||
@ -468,25 +480,25 @@ function tacker_setup_default_vim_resources {
|
||||
openstack --os-region-name $REGION_NAME --os-project-name $DEFAULT_VIM_PROJECT_NAME \
|
||||
--os-user-domain-id default --os-username $DEFAULT_VIM_USER \
|
||||
--os-project-domain-id default --os-auth-url $KEYSTONE_SERVICE_URI \
|
||||
--os-password $DEFAULT_VIM_PASSWORD keypair create userKey
|
||||
--os-password $DEFAULT_VIM_PASSWORD --os-cloud "" keypair create userKey
|
||||
|
||||
openstack --os-region-name $REGION_NAME --os-project-name $DEFAULT_VIM_PROJECT_NAME \
|
||||
--os-user-domain-id default --os-username $DEFAULT_VIM_USER \
|
||||
--os-project-domain-id default --os-auth-url $KEYSTONE_SERVICE_URI \
|
||||
--os-password $DEFAULT_VIM_PASSWORD \
|
||||
--os-password $DEFAULT_VIM_PASSWORD --os-cloud "" \
|
||||
security group create \
|
||||
--description "tacker functest security group" test_secgrp
|
||||
|
||||
openstack --os-region-name $REGION_NAME --os-project-name $DEFAULT_VIM_PROJECT_NAME \
|
||||
--os-user-domain-id default --os-username $DEFAULT_VIM_USER \
|
||||
--os-project-domain-id default --os-auth-url $KEYSTONE_SERVICE_URI \
|
||||
--os-password $DEFAULT_VIM_PASSWORD \
|
||||
--os-password $DEFAULT_VIM_PASSWORD --os-cloud "" \
|
||||
security group rule create \
|
||||
--ingress --protocol icmp test_secgrp
|
||||
openstack --os-region-name $REGION_NAME --os-project-name $DEFAULT_VIM_PROJECT_NAME \
|
||||
--os-user-domain-id default --os-username $DEFAULT_VIM_USER \
|
||||
--os-project-domain-id default --os-auth-url $KEYSTONE_SERVICE_URI \
|
||||
--os-password $DEFAULT_VIM_PASSWORD \
|
||||
--os-password $DEFAULT_VIM_PASSWORD --os-cloud "" \
|
||||
security group rule create \
|
||||
--ingress --protocol tcp --dst-port 22 test_secgrp
|
||||
|
||||
|
@ -29,6 +29,7 @@ if is_service_enabled tacker; then
|
||||
echo_summary "Configuring Tacker"
|
||||
configure_tacker
|
||||
create_tacker_accounts
|
||||
create_keystone_endpoint
|
||||
|
||||
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
|
||||
# Initialize and start the tacker service
|
||||
|
@ -24,6 +24,9 @@ class Uuid(TypeDecorator):
|
||||
|
||||
def process_bind_param(self, value, dialect):
|
||||
if value is not None:
|
||||
# If value is typed as List, only use first element.
|
||||
if isinstance(value, list):
|
||||
value = value[0]
|
||||
try:
|
||||
uuid.UUID(value, version=4)
|
||||
except ValueError:
|
||||
|
Loading…
x
Reference in New Issue
Block a user