diff --git a/metadata.rb b/metadata.rb index 0a083f5..9daeb0a 100644 --- a/metadata.rb +++ b/metadata.rb @@ -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' diff --git a/recipes/common.rb b/recipes/common.rb index 94743d1..cac00c1 100644 --- a/recipes/common.rb +++ b/recipes/common.rb @@ -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 diff --git a/recipes/identity_registration.rb b/recipes/identity_registration.rb index 20a6146..30bc7c9 100644 --- a/recipes/identity_registration.rb +++ b/recipes/identity_registration.rb @@ -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'] diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index c5b0e68..9e2a527 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -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