Move to use "get_password" for heat cookbook
Rebase and resolve conficts with latest codes Move to use "get_password" instead of "{user,service,db}_password" Change-Id: Ia14344b81c75724b35bf556e42fd4297428f4631
This commit is contained in:
parent
18299e6508
commit
80c8412f32
@ -48,7 +48,7 @@ platform_options["#{db_type}_python_packages"].each do |pkg|
|
|||||||
end
|
end
|
||||||
|
|
||||||
db_user = node['openstack']['db']['orchestration']['username']
|
db_user = node['openstack']['db']['orchestration']['username']
|
||||||
db_pass = db_password 'heat'
|
db_pass = get_password 'db', 'heat'
|
||||||
sql_connection = db_uri('orchestration', db_user, db_pass)
|
sql_connection = db_uri('orchestration', db_user, db_pass)
|
||||||
|
|
||||||
identity_endpoint = endpoint 'identity-api'
|
identity_endpoint = endpoint 'identity-api'
|
||||||
@ -57,7 +57,7 @@ heat_api_endpoint = endpoint 'orchestration-api'
|
|||||||
heat_api_cfn_endpoint = endpoint 'orchestration-api-cfn'
|
heat_api_cfn_endpoint = endpoint 'orchestration-api-cfn'
|
||||||
heat_api_cloudwatch_endpoint = endpoint 'orchestration-api-cloudwatch'
|
heat_api_cloudwatch_endpoint = endpoint 'orchestration-api-cloudwatch'
|
||||||
|
|
||||||
service_pass = service_password 'openstack-orchestration'
|
service_pass = get_password 'service', 'openstack-orchestration'
|
||||||
|
|
||||||
# TODO(jaypipes): Move this logic and stuff into the openstack-common
|
# TODO(jaypipes): Move this logic and stuff into the openstack-common
|
||||||
# library cookbook.
|
# library cookbook.
|
||||||
@ -75,7 +75,7 @@ if node['openstack']['mq']['orchestration']['service_type'] == 'rabbitmq'
|
|||||||
if node['openstack']['mq']['orchestration']['rabbit']['ha']
|
if node['openstack']['mq']['orchestration']['rabbit']['ha']
|
||||||
rabbit_hosts = rabbit_servers
|
rabbit_hosts = rabbit_servers
|
||||||
end
|
end
|
||||||
rabbit_pass = user_password node['openstack']['mq']['orchestration']['rabbit']['userid']
|
rabbit_pass = get_password 'user', node['openstack']['mq']['orchestration']['rabbit']['userid']
|
||||||
end
|
end
|
||||||
|
|
||||||
directory '/etc/heat' do
|
directory '/etc/heat' do
|
||||||
|
@ -32,7 +32,7 @@ auth_url = ::URI.decode identity_admin_endpoint.to_s
|
|||||||
heat_endpoint = endpoint 'orchestration-api'
|
heat_endpoint = endpoint 'orchestration-api'
|
||||||
heat_cfn_endpoint = endpoint 'orchestration-api-cfn'
|
heat_cfn_endpoint = endpoint 'orchestration-api-cfn'
|
||||||
|
|
||||||
service_pass = service_password 'openstack-orchestration'
|
service_pass = get_password 'service', 'openstack-orchestration'
|
||||||
service_tenant_name = node['openstack']['orchestration']['service_tenant_name']
|
service_tenant_name = node['openstack']['orchestration']['service_tenant_name']
|
||||||
service_user = node['openstack']['orchestration']['service_user']
|
service_user = node['openstack']['orchestration']['service_user']
|
||||||
service_role = node['openstack']['orchestration']['service_role']
|
service_role = node['openstack']['orchestration']['service_role']
|
||||||
|
@ -20,15 +20,18 @@ def orchestration_stubs # rubocop:disable MethodLength
|
|||||||
::Chef::Recipe.any_instance.stub(:secret)
|
::Chef::Recipe.any_instance.stub(:secret)
|
||||||
.with('secrets', 'openstack_identity_bootstrap_token')
|
.with('secrets', 'openstack_identity_bootstrap_token')
|
||||||
.and_return 'bootstrap-token'
|
.and_return 'bootstrap-token'
|
||||||
::Chef::Recipe.any_instance.stub(:db_password).and_return ''
|
|
||||||
::Chef::Recipe.any_instance.stub(:user_password).and_return ''
|
::Chef::Recipe.any_instance.stub(:get_password)
|
||||||
::Chef::Recipe.any_instance.stub(:user_password)
|
.with('db', 'heat')
|
||||||
.with('guest')
|
.and_return 'heat'
|
||||||
|
::Chef::Recipe.any_instance.stub(:get_password)
|
||||||
|
.with('user', 'guest')
|
||||||
.and_return 'rabbit-pass'
|
.and_return 'rabbit-pass'
|
||||||
::Chef::Recipe.any_instance.stub(:user_password)
|
::Chef::Recipe.any_instance.stub(:get_password)
|
||||||
.with('admin-user')
|
.with('user', 'admin-user')
|
||||||
.and_return 'admin-pass'
|
.and_return 'admin-pass'
|
||||||
::Chef::Recipe.any_instance.stub(:service_password).with('openstack-orchestration')
|
::Chef::Recipe.any_instance.stub(:get_password)
|
||||||
|
.with('service', 'openstack-orchestration')
|
||||||
.and_return 'heat-pass'
|
.and_return 'heat-pass'
|
||||||
::Chef::Application.stub(:fatal!)
|
::Chef::Application.stub(:fatal!)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user