Merge "Fix designate driver not being fully region aware"

This commit is contained in:
Zuul 2019-10-03 23:51:35 +00:00 committed by Gerrit Code Review
commit 4c41e65415
2 changed files with 10 additions and 2 deletions

View File

@ -3,7 +3,14 @@ function configure_dns_extension {
} }
function configure_dns_integration { function configure_dns_integration {
iniset $NEUTRON_CONF DEFAULT external_dns_driver designate iniset $NEUTRON_CONF DEFAULT external_dns_driver designate
iniset $NEUTRON_CONF designate url "$DESIGNATE_SERVICE_PROTOCOL://$DESIGNATE_SERVICE_HOST:$DESIGNATE_SERVICE_PORT/v2"
# Use new /dns based uri by default if no port is set.
if [[ -z "$DESIGNATE_SERVICE_PORT" ]]; then
iniset $NEUTRON_CONF designate url "$DESIGNATE_SERVICE_PROTOCOL://$DESIGNATE_SERVICE_HOST/dns/v2"
else
iniset $NEUTRON_CONF designate url "$DESIGNATE_SERVICE_PROTOCOL://$DESIGNATE_SERVICE_HOST:$DESIGNATE_SERVICE_PORT/v2"
fi
configure_keystone_authtoken_middleware $NEUTRON_CONF designate designate configure_keystone_authtoken_middleware $NEUTRON_CONF designate designate
} }
function post_config_dns_extension { function post_config_dns_extension {

View File

@ -57,7 +57,8 @@ def get_clients(context):
password=CONF.designate.admin_password, password=CONF.designate.admin_password,
tenant_name=CONF.designate.admin_tenant_name, tenant_name=CONF.designate.admin_tenant_name,
tenant_id=CONF.designate.admin_tenant_id) tenant_id=CONF.designate.admin_tenant_id)
admin_client = d_client.Client(session=_SESSION, auth=admin_auth) admin_client = d_client.Client(session=_SESSION, auth=admin_auth,
endpoint_override=CONF.designate.url)
return client, admin_client return client, admin_client