Replace deprecated get_secret

Use get_password 'token' instead.

Change-Id: I93e9f43fa296bbdfe37e5fe9e72feaf6a3fea6f6
Partial-Bug: #1467662
This commit is contained in:
Mark Vanderwiel 2015-06-22 15:32:17 -05:00
parent 0a59088d43
commit 2efe3277a1
4 changed files with 12 additions and 12 deletions

View File

@ -28,7 +28,7 @@ end
depends 'ceph', '~> 0.8.0'
depends 'openstack-bare-metal', '>= 11.0.0'
depends 'openstack-common', '>= 11.4.0'
depends 'openstack-common', '>= 11.5.0'
depends 'openstack-identity', '>= 11.0.0'
depends 'openstack-image', '>= 11.0.0'
depends 'openstack-network', '>= 11.0.0'

View File

@ -26,7 +26,7 @@ class ::Chef::Recipe # rubocop:disable Documentation
end
identity_admin_endpoint = admin_endpoint 'identity-admin'
bootstrap_token = get_secret 'openstack_identity_bootstrap_token'
bootstrap_token = get_password 'token', 'openstack_identity_bootstrap_token'
auth_uri = ::URI.decode identity_admin_endpoint.to_s
service_pass = get_password 'service', 'openstack-compute'
service_user = node['openstack']['compute']['service_user']

View File

@ -121,11 +121,11 @@ Chef::Log.debug("openstack-compute::nova-common:ironic_endpoint|#{ironic_endpoin
if node['openstack']['compute']['network']['service_type'] == 'neutron'
neutron_admin_password = get_password 'service', 'openstack-network'
neutron_metadata_proxy_shared_secret = get_secret 'neutron_metadata_secret'
neutron_metadata_proxy_shared_secret = get_password 'token', 'neutron_metadata_secret'
end
if node['openstack']['compute']['driver'].split('.').first == 'vmwareapi'
vmware_host_pass = get_secret node['openstack']['compute']['vmware']['secret_name']
vmware_host_pass = get_password 'token', node['openstack']['compute']['vmware']['secret_name']
end
identity_admin_endpoint = admin_endpoint 'identity-admin'

View File

@ -44,17 +44,17 @@ shared_context 'compute_stubs' do
}
}]
)
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('neutron_metadata_secret')
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
.with('token', 'neutron_metadata_secret')
.and_return('metadata-secret')
allow_any_instance_of(Chef::Recipe).to receive(:get_secret) # this is the rbd_uuid default name
.with('rbd_secret_uuid')
allow_any_instance_of(Chef::Recipe).to receive(:get_password) # this is the rbd_uuid default name
.with('token', 'rbd_secret_uuid')
.and_return '00000000-0000-0000-0000-000000000000'
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)
.with('db', anything)