From f3431fcd2fa6efff73ba1b5a5ec1b5a5c2ca14c5 Mon Sep 17 00:00:00 2001 From: Mark Vanderwiel Date: Mon, 22 Jun 2015 15:22:13 -0500 Subject: [PATCH] Replace deprecated get_secret Use get_password 'token' instead. Depends-On: I9c60955fe4ed444b9cd70384fa8fb7829b1f0c47 Change-Id: Ie3f1a5317aabe8e35172237dab82a036c7b88de1 Partial-Bug: #1467662 --- metadata.rb | 2 +- recipes/identity_registration.rb | 2 +- spec/spec_helper.rb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/metadata.rb b/metadata.rb index b5b981e..033d20a 100644 --- a/metadata.rb +++ b/metadata.rb @@ -12,5 +12,5 @@ recipe 'openstack-bare-metal::default', 'Temp workaround to create ironic db wit recipe 'openstack-bare-metal::identity_registration', 'Registers ironic service/user/endpoints in keystone' recipe 'openstack-bare-metal::ironic-common', 'Defines the common pieces of repeated code from the other recipes' -depends 'openstack-common', '>= 11.4.0' +depends 'openstack-common', '>= 11.5.0' depends 'openstack-identity', '>= 11.0.0' diff --git a/recipes/identity_registration.rb b/recipes/identity_registration.rb index 3714861..764c465 100644 --- a/recipes/identity_registration.rb +++ b/recipes/identity_registration.rb @@ -25,7 +25,7 @@ class ::Chef::Recipe # rubocop:disable Documentation end identity_admin_endpoint = 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 ironic_api_endpoint = endpoint 'bare-metal-api' service_pass = get_password 'service', 'openstack-bare-metal' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 0dc4a26..e3d6056 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -32,8 +32,8 @@ shared_context 'bare-metal-stubs' do allow_any_instance_of(Chef::Recipe).to receive(:get_password) .with('user', anything) .and_return('user_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(:rabbit_servers) .and_return('1.1.1.1:5672,2.2.2.2:5672')