diff --git a/recipes/identity_registration.rb b/recipes/identity_registration.rb index 8a51761a..c8526b2a 100644 --- a/recipes/identity_registration.rb +++ b/recipes/identity_registration.rb @@ -26,7 +26,7 @@ class ::Chef::Recipe # rubocop:disable Documentation end identity_admin_endpoint = endpoint 'identity-admin' -bootstrap_token = secret 'secrets', 'openstack_identity_bootstrap_token' +bootstrap_token = get_secret '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'] diff --git a/recipes/libvirt_rbd.rb b/recipes/libvirt_rbd.rb index e74aca8c..0ea344ce 100644 --- a/recipes/libvirt_rbd.rb +++ b/recipes/libvirt_rbd.rb @@ -35,7 +35,7 @@ end # TODO(srenatus) there might be multiple secrets, cinder will tell nova-compute # which one should be used for each single volume mount request Chef::Log.info("rbd_secret_name: #{node['openstack']['compute']['libvirt']['rbd']['rbd_secret_name']}") -secret_uuid = secret 'secrets', node['openstack']['compute']['libvirt']['rbd']['rbd_secret_name'] +secret_uuid = get_secret node['openstack']['compute']['libvirt']['rbd']['rbd_secret_name'] ceph_key = get_password 'service', 'rbd_block_storage' require 'securerandom' diff --git a/recipes/nova-common.rb b/recipes/nova-common.rb index b693556c..90ee8106 100644 --- a/recipes/nova-common.rb +++ b/recipes/nova-common.rb @@ -111,14 +111,14 @@ Chef::Log.debug("openstack-compute::nova-common:image_endpoint|#{image_endpoint. if node['openstack']['compute']['network']['service_type'] == 'neutron' neutron_admin_password = get_password 'service', 'openstack-network' - neutron_metadata_proxy_shared_secret = secret 'secrets', 'neutron_metadata_secret' + neutron_metadata_proxy_shared_secret = get_secret 'neutron_metadata_secret' else neutron_admin_password = nil neutron_metadata_proxy_shared_secret = nil end if node['openstack']['compute']['libvirt']['images_type'] == 'rbd' - rbd_secret_uuid = secret 'secrets', node['openstack']['compute']['libvirt']['rbd']['rbd_secret_name'] + rbd_secret_uuid = get_secret node['openstack']['compute']['libvirt']['rbd']['rbd_secret_name'] else rbd_secret_uuid = nil end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a12bbfd6..5e04e076 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -43,14 +43,14 @@ shared_context 'compute_stubs' do } }] ) - Chef::Recipe.any_instance.stub(:secret) - .with('secrets', 'openstack_identity_bootstrap_token') + Chef::Recipe.any_instance.stub(:get_secret) + .with('openstack_identity_bootstrap_token') .and_return('bootstrap-token') - Chef::Recipe.any_instance.stub(:secret) - .with('secrets', 'neutron_metadata_secret') + Chef::Recipe.any_instance.stub(:get_secret) + .with('neutron_metadata_secret') .and_return('metadata-secret') - Chef::Recipe.any_instance.stub(:secret) # this is the rbd_uuid default name - .with('secrets', 'rbd_secret_uuid') + Chef::Recipe.any_instance.stub(:get_secret) # this is the rbd_uuid default name + .with('rbd_secret_uuid') .and_return '00000000-0000-0000-0000-000000000000' Chef::Recipe.any_instance.stub(:get_password) .with('db', anything)