Replace deprecated get_secret
Use get_password 'token' instead. Change-Id: I364d902de5943c9bbf55eca6c5f76fb7fef64162 Partial-Bug: #1467662
This commit is contained in:
parent
78f3c0ba43
commit
b49df0cb25
|
@ -17,5 +17,5 @@ recipe 'openstack-network::vpn_agent', 'Installs packages required for Network V
|
|||
supports os
|
||||
end
|
||||
|
||||
depends 'openstack-common', '>= 11.4.0'
|
||||
depends 'openstack-common', '>= 11.5.0'
|
||||
depends 'openstack-identity', '>= 11.0.0'
|
||||
|
|
|
@ -30,7 +30,7 @@ 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_api_endpoint = admin_endpoint 'network-api'
|
||||
|
|
|
@ -26,7 +26,7 @@ platform_options = node['openstack']['network']['platform']
|
|||
|
||||
identity_endpoint = internal_endpoint 'identity-internal'
|
||||
service_pass = get_password 'service', 'openstack-network'
|
||||
metadata_secret = get_secret node['openstack']['network']['metadata']['secret_name']
|
||||
metadata_secret = get_password 'token', node['openstack']['network']['metadata']['secret_name']
|
||||
compute_metadata_api = internal_endpoint 'compute-metadata-api'
|
||||
|
||||
platform_options['neutron_metadata_agent_packages'].each do |pkg|
|
||||
|
|
|
@ -79,8 +79,8 @@ describe 'openstack-network::metadata_agent' do
|
|||
|
||||
it 'sets the metadata_proxy_shared_secret attribute' do
|
||||
node.set['openstack']['network']['metadata']['secret_name'] = 'network_metadata_secret'
|
||||
allow_any_instance_of(Chef::Recipe).to receive(:get_secret)
|
||||
.with('network_metadata_secret')
|
||||
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
|
||||
.with('token', 'network_metadata_secret')
|
||||
.and_return('network_metadata_secret_value')
|
||||
expect(chef_run).to render_file(file.name).with_content(/^metadata_proxy_shared_secret = network_metadata_secret_value$/)
|
||||
end
|
||||
|
|
|
@ -80,11 +80,11 @@ shared_context 'neutron-stubs' do
|
|||
)
|
||||
allow_any_instance_of(Chef::Recipe).to receive(:config_by_role)
|
||||
.with('glance-api', 'glance').and_return []
|
||||
allow_any_instance_of(Chef::Recipe).to receive(:secret)
|
||||
.with('secrets', '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(:secret)
|
||||
.with('secrets', 'neutron_metadata_secret')
|
||||
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
|
||||
.with('token', 'neutron_metadata_secret')
|
||||
.and_return('metadata-secret')
|
||||
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
|
||||
.with('db', anything)
|
||||
|
|
Loading…
Reference in New Issue