Replace deprecated get_secret

Use get_password 'token' instead.

Partial-Bug: #1467662

Change-Id: I8c9ff7cb17fa1d945e794ee386d24c393ef97a10
This commit is contained in:
Mark Vanderwiel 2015-06-22 15:36:39 -05:00 committed by Ma Wen Cheng
parent 4024cbc13e
commit abc47a3bb5
5 changed files with 9 additions and 9 deletions

View File

@ -15,6 +15,6 @@ recipe 'openstack-image::image_upload', 'Upload image using glance image-create
supports os
end
depends 'openstack-common', '>= 11.4.0'
depends 'openstack-common', '>= 11.5.0'
depends 'openstack-identity', '>= 11.0.0'
depends 'ceph', '~> 0.8.0'

View File

@ -156,7 +156,7 @@ elsif glance['api']['caching']
end
unless node['openstack']['image']['api']['vmware']['vmware_server_host'].empty?
vmware_server_password = get_secret node['openstack']['image']['api']['vmware']['secret_name']
vmware_server_password = get_password 'token', node['openstack']['image']['api']['vmware']['secret_name']
end
template '/etc/glance/glance-api.conf' do

View File

@ -28,7 +28,7 @@ end
identity_admin_endpoint = admin_endpoint 'identity-admin'
token = get_secret 'openstack_identity_bootstrap_token'
token = get_password 'token', 'openstack_identity_bootstrap_token'
auth_url = ::URI.decode identity_admin_endpoint.to_s
api_internal_endpoint = internal_endpoint 'image-api'

View File

@ -5,8 +5,8 @@ shared_context 'vmware settings configurator' do
before do
node.set['openstack']['image']['api']['vmware']['vmware_server_host'] = 'vmware_server_host_value'
node.set['openstack']['image']['api']['vmware']['secret_name'] = 'vmware_secret_name'
allow_any_instance_of(Chef::Recipe).to receive(:get_secret)
.with('vmware_secret_name')
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
.with('token', 'vmware_secret_name')
.and_return('vmware_server_password_value')
end

View File

@ -50,11 +50,11 @@ shared_context 'image-stubs' do
allow_any_instance_of(Chef::Recipe).to receive(:rabbit_servers)
.and_return '1.1.1.1:5672,2.2.2.2:5672'
allow_any_instance_of(Chef::Recipe).to receive(:get_secret)
.with('openstack_identity_bootstrap_token')
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
.with('token', 'openstack_identity_bootstrap_token')
.and_return('bootstrap-token')
allow_any_instance_of(Chef::Recipe).to receive(:get_secret)
.with('openstack_vmware_secret_name')
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
.with('token', 'openstack_vmware_secret_name')
.and_return 'vmware_secret_name'
allow_any_instance_of(Chef::Recipe).to receive(:get_password)