From 7386afb7c063cefdbd455b6dea9844516932a667 Mon Sep 17 00:00:00 2001 From: Mark Vanderwiel Date: Mon, 22 Jun 2015 15:26:39 -0500 Subject: [PATCH] Replace deprecated get_secret Use get_password 'token' instead. Change-Id: If7b01ecaed9b51798acc53c9ea4833cb74250f62 Partial-Bug: #1467662 --- metadata.rb | 2 +- recipes/cinder-common.rb | 2 +- recipes/identity_registration.rb | 2 +- spec/spec_helper.rb | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/metadata.rb b/metadata.rb index 3c9699b..d6d7bf2 100644 --- a/metadata.rb +++ b/metadata.rb @@ -20,7 +20,7 @@ recipe 'openstack-block-storage::backup', 'Installs the cinder-backup service' end depends 'apt', '~> 2.6.1' -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 'selinux', '~> 0.9.0' diff --git a/recipes/cinder-common.rb b/recipes/cinder-common.rb index 7e9f6d7..125c613 100644 --- a/recipes/cinder-common.rb +++ b/recipes/cinder-common.rb @@ -57,7 +57,7 @@ when 'cinder.volume.drivers.ibm.flashsystem.FlashSystemDriver' when 'cinder.volume.drivers.ibm.ibmnas.IBMNAS_NFSDriver' ibmnas_pass = get_password 'user', node['openstack']['block-storage']['ibmnas']['nas_login'] when 'cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver' - vmware_host_pass = get_secret node['openstack']['block-storage']['vmware']['secret_name'] + vmware_host_pass = get_password 'token', node['openstack']['block-storage']['vmware']['secret_name'] end glance_api_endpoint = internal_endpoint 'image-api' diff --git a/recipes/identity_registration.rb b/recipes/identity_registration.rb index 6aab05e..1b676c9 100644 --- a/recipes/identity_registration.rb +++ b/recipes/identity_registration.rb @@ -27,7 +27,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 admin_cinder_api_endpoint = admin_endpoint 'block-storage-api' internal_cinder_api_endpoint = internal_endpoint 'block-storage-api' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 836e780..ba21c6c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -36,14 +36,14 @@ shared_context 'block-storage-stubs' do allow_any_instance_of(Chef::Recipe).to receive(:get_password) .with('db', anything) .and_return('') - 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('rbd_secret_uuid') + allow_any_instance_of(Chef::Recipe).to receive(:get_password) + .with('token', 'rbd_secret_uuid') .and_return('b0ff3bba-e07b-49b1-beed-09a45552b1ad') - 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('user', 'guest')