diff --git a/manifests/guestagent.pp b/manifests/guestagent.pp index a4afcd87..7178cd6b 100644 --- a/manifests/guestagent.pp +++ b/manifests/guestagent.pp @@ -47,8 +47,9 @@ # Defaults to 'http://localhost:5000/v2.0'. # # [*swift_url*] -# (optional) Swift URL. -# Defaults to 'http://localhost:8080/v1/AUTH_'. +# (optional) Swift URL. If this is unset in the class, Trove will +# lookup the URL using the Keystone catalog. +# Defaults to $::os_service_default. # # [*control_exchange*] # (optional) Control exchange. @@ -86,7 +87,7 @@ class trove::guestagent( $use_syslog = false, $log_facility = 'LOG_USER', $auth_url = 'http://localhost:5000/v2.0', - $swift_url = 'http://localhost:8080/v1/AUTH_', + $swift_url = $::os_service_default, $control_exchange = 'trove', $rabbit_hosts = $::trove::rabbit_hosts, $rabbit_host = $::trove::rabbit_host, diff --git a/releasenotes/notes/guestagent_swift_default-f14d658a976d69e2.yaml b/releasenotes/notes/guestagent_swift_default-f14d658a976d69e2.yaml new file mode 100644 index 00000000..79496ff9 --- /dev/null +++ b/releasenotes/notes/guestagent_swift_default-f14d658a976d69e2.yaml @@ -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. diff --git a/spec/classes/trove_guestagent_spec.rb b/spec/classes/trove_guestagent_spec.rb index 06cf1658..ba109a67 100644 --- a/spec/classes/trove_guestagent_spec.rb +++ b/spec/classes/trove_guestagent_spec.rb @@ -40,6 +40,7 @@ describe 'trove::guestagent' do is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value('') is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('') is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('') + is_expected.to contain_trove_guestagent_config('DEFAULT/swift_url').with_value('') end context 'when using a single RabbitMQ server' do diff --git a/templates/trove-guestagent.conf.erb b/templates/trove-guestagent.conf.erb index 456b1535..c2126d4b 100644 --- a/templates/trove-guestagent.conf.erb +++ b/templates/trove-guestagent.conf.erb @@ -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, # basically acting like the client via that proxy token. trove_auth_url = <%= @auth_url %> +<%- if @swift_url and @swift_url != "" -%> swift_url = <%= @swift_url %> +<%- end -%> # Datastore management implementations. Format datastore:manager.impl # datastore_registry_ext = mysql:trove.guestagent.datastore.mysql.manager.Manager, percona:trove.guestagent.datastore.mysql.manager.Manager