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-02 08:29:31 -07:00
parent 3472363c75
commit 575f440d45
3 changed files with 6 additions and 6 deletions

View File

@ -30,7 +30,7 @@ end
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
api_endpoint = endpoint 'network-api'

View File

@ -26,7 +26,7 @@ platform_options = node['openstack']['network']['platform']
identity_endpoint = endpoint 'identity-api'
service_pass = get_password 'service', 'openstack-network'
metadata_secret = secret 'secrets', node['openstack']['network']['metadata']['secret_name']
metadata_secret = get_secret node['openstack']['network']['metadata']['secret_name']
template '/etc/neutron/metadata_agent.ini' do
source 'metadata_agent.ini.erb'

View File

@ -58,11 +58,11 @@ def neutron_stubs # rubocop:disable MethodLength
)
::Chef::Recipe.any_instance.stub(:config_by_role)
.with('glance-api', 'glance').and_return []
::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', 'neutron_metadata_secret')
::Chef::Recipe.any_instance.stub(:get_secret)
.with('neutron_metadata_secret')
.and_return('metadata-secret')
::Chef::Recipe.any_instance.stub(:get_password)
.with('db', anything)