default swift_url to SERVICE_DEFAULT

If swift_url is unset, Trove will set it using the Keystone catalog.
Therefore we will default the swift_url setting to use SERVICE_DEFAULT,
so that out of the box configs will use the Keystone catalog.

Change-Id: I7a3fe361ca41fbee9f353be6e2306c1a5c7f7097
This commit is contained in:
Matt Fischer 2016-05-09 15:45:43 -06:00
parent f3519c4825
commit ed529e5a5a
4 changed files with 12 additions and 3 deletions

View File

@ -47,8 +47,9 @@
# Defaults to 'http://localhost:5000/v2.0'. # Defaults to 'http://localhost:5000/v2.0'.
# #
# [*swift_url*] # [*swift_url*]
# (optional) Swift URL. # (optional) Swift URL. If this is unset in the class, Trove will
# Defaults to 'http://localhost:8080/v1/AUTH_'. # lookup the URL using the Keystone catalog.
# Defaults to $::os_service_default.
# #
# [*control_exchange*] # [*control_exchange*]
# (optional) Control exchange. # (optional) Control exchange.
@ -86,7 +87,7 @@ class trove::guestagent(
$use_syslog = false, $use_syslog = false,
$log_facility = 'LOG_USER', $log_facility = 'LOG_USER',
$auth_url = 'http://localhost:5000/v2.0', $auth_url = 'http://localhost:5000/v2.0',
$swift_url = 'http://localhost:8080/v1/AUTH_', $swift_url = $::os_service_default,
$control_exchange = 'trove', $control_exchange = 'trove',
$rabbit_hosts = $::trove::rabbit_hosts, $rabbit_hosts = $::trove::rabbit_hosts,
$rabbit_host = $::trove::rabbit_host, $rabbit_host = $::trove::rabbit_host,

View File

@ -0,0 +1,5 @@
---
other:
- Change the default for swift_url in guestagent to
be SERVICE_DEFAULT so that by default, installs
will read the Swift URL from the Keystone catalog.

View File

@ -40,6 +40,7 @@ describe 'trove::guestagent' do
is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value('<SERVICE DEFAULT>') is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('<SERVICE DEFAULT>') is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('<SERVICE DEFAULT>') is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_guestagent_config('DEFAULT/swift_url').with_value('<SERVICE DEFAULT>')
end end
context 'when using a single RabbitMQ server' do context 'when using a single RabbitMQ server' do

View File

@ -36,7 +36,9 @@ api_extensions_path = trove/extensions/routes
# It proxies the token received from the user to send to nova via this admin users creds, # It proxies the token received from the user to send to nova via this admin users creds,
# basically acting like the client via that proxy token. # basically acting like the client via that proxy token.
trove_auth_url = <%= @auth_url %> trove_auth_url = <%= @auth_url %>
<%- if @swift_url and @swift_url != "<SERVICE DEFAULT>" -%>
swift_url = <%= @swift_url %> swift_url = <%= @swift_url %>
<%- end -%>
# Datastore management implementations. Format datastore:manager.impl # Datastore management implementations. Format datastore:manager.impl
# datastore_registry_ext = mysql:trove.guestagent.datastore.mysql.manager.Manager, percona:trove.guestagent.datastore.mysql.manager.Manager # datastore_registry_ext = mysql:trove.guestagent.datastore.mysql.manager.Manager, percona:trove.guestagent.datastore.mysql.manager.Manager