diff --git a/devstack/lib/tacker b/devstack/lib/tacker index e0c4e166b..64c340e0c 100644 --- a/devstack/lib/tacker +++ b/devstack/lib/tacker @@ -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 diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 89a84eeda..28eb5012a 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -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 diff --git a/tacker/db/types.py b/tacker/db/types.py index 1fe199f13..ef7b62a43 100644 --- a/tacker/db/types.py +++ b/tacker/db/types.py @@ -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: