Replace deprecated get_secret

Use get_password 'token' instead.

Change-Id: Iab395042c34bceb1ce30e01d264276ef4cc8d251
Partial-Bug: #1467662
This commit is contained in:
Mark Vanderwiel 2015-06-22 15:45:44 -05:00
parent df5bec0b0a
commit 7b4eed9eb5
4 changed files with 10 additions and 10 deletions

View File

@ -21,6 +21,6 @@ recipe 'openstack-telemetry::identity_registration', 'Registers the endpoints, t
supports os
end
depends 'openstack-common', '>= 11.4.0'
depends 'openstack-common', '>= 11.5.0'
depends 'openstack-identity', '>= 11.0.0'
depends 'openstack-compute', '>= 11.0.0'

View File

@ -73,7 +73,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}")
metering_secret = get_secret 'openstack_metering_secret'
metering_secret = get_password 'token', 'openstack_metering_secret'
directory node['openstack']['telemetry']['conf_dir'] do
owner node['openstack']['telemetry']['user']
@ -84,7 +84,7 @@ directory node['openstack']['telemetry']['conf_dir'] do
end
if node['openstack']['telemetry']['hypervisor_inspector'] == 'vsphere'
vmware_host_pass = get_secret node['openstack']['compute']['vmware']['secret_name']
vmware_host_pass = get_password 'token', node['openstack']['compute']['vmware']['secret_name']
end
template node['openstack']['telemetry']['conf'] do

View File

@ -28,7 +28,7 @@ admin_api_endpoint = admin_endpoint 'telemetry-api'
internal_api_endpoint = internal_endpoint 'telemetry-api'
public_api_endpoint = public_endpoint 'telemetry-api'
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-ceilometer'
service_user = node['openstack']['telemetry']['service_user']

View File

@ -37,14 +37,14 @@ shared_context 'telemetry-stubs' do
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
.with('user', 'guest')
.and_return('mq-pass')
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_metering_secret')
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
.with('token', 'openstack_metering_secret')
.and_return('metering_secret')
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(Chef::Application).to receive(:fatal!)
end