Use get_secret instead of secret

The new get_secret method allows the 'secrets' databag to be renamed,
just like all other databags.

Change-Id: Ic8be5d19a112d78e22716c0cd571efc7186ac9ce
Related-Bug: #1288784
This commit is contained in:
Luis A. Garcia 2014-04-01 15:43:44 -07:00
parent f0cec188f9
commit 42df38891b
3 changed files with 6 additions and 6 deletions

View File

@ -59,7 +59,7 @@ Chef::Log.debug("openstack-telemetry::common:service_user|#{service_user}")
Chef::Log.debug("openstack-telemetry::common:service_tenant|#{service_tenant}")
Chef::Log.debug("openstack-telemetry::common:identity_endpoint|#{identity_endpoint.to_s}")
metering_secret = secret 'secrets', 'openstack_metering_secret'
metering_secret = get_secret 'openstack_metering_secret'
directory node['openstack']['telemetry']['conf_dir'] do
owner node['openstack']['telemetry']['user']

View File

@ -26,7 +26,7 @@ end
api_endpoint = endpoint 'telemetry-api'
identity_admin_endpoint = endpoint 'identity-admin'
bootstrap_token = secret 'secrets', 'openstack_identity_bootstrap_token'
bootstrap_token = get_secret 'openstack_identity_bootstrap_token'
auth_uri = ::URI.decode identity_admin_endpoint.to_s
service_pass = get_password 'service', 'openstack-ceilometer'
service_user = node['openstack']['telemetry']['service_user']

View File

@ -35,11 +35,11 @@ shared_context 'telemetry-stubs' do
Chef::Recipe.any_instance.stub(:get_password)
.with('user', 'guest')
.and_return('mq-pass')
Chef::Recipe.any_instance.stub(:secret)
.with('secrets', 'openstack_identity_bootstrap_token')
Chef::Recipe.any_instance.stub(:get_secret)
.with('openstack_identity_bootstrap_token')
.and_return('bootstrap-token')
Chef::Recipe.any_instance.stub(:secret)
.with('secrets', 'openstack_metering_secret')
Chef::Recipe.any_instance.stub(:get_secret)
.with('openstack_metering_secret')
.and_return('metering_secret')
Chef::Application.stub(:fatal!)
end