diff --git a/attributes/default.rb b/attributes/default.rb index 01a04d9..96f3eff 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -25,6 +25,7 @@ default['openstack']['integration-test'] = { 'alt_ssh_user' => 'cirros', 'ssh_user' => 'cirros', 'fixed_network' => 'local_net', + 'heat_stack_user_role' => 'heat_stack_owner', 'user1' => { 'user_name' => 'tempest_user1', 'password' => 'tempest_user1_pass', diff --git a/recipes/setup.rb b/recipes/setup.rb index 641ab7f..9e83100 100644 --- a/recipes/setup.rb +++ b/recipes/setup.rb @@ -89,6 +89,15 @@ admin_pass = get_password 'user', node['openstack']['identity']['ad end end +# Create role for heat template defined users +heat_stack_user_role = node['openstack']['integration-test']['heat_stack_user_role'] +openstack_identity_register "Create '#{heat_stack_user_role}' Role for template defined users" do + auth_uri auth_uri + bootstrap_token bootstrap_token + role_name heat_stack_user_role + action :create_role +end + git '/opt/tempest' do repository 'https://github.com/openstack/tempest' reference 'master' diff --git a/spec/setup_spec.rb b/spec/setup_spec.rb index afec0ad..d1c9363 100644 --- a/spec/setup_spec.rb +++ b/spec/setup_spec.rb @@ -116,6 +116,16 @@ describe 'openstack-integration-test::setup' do ) end + it 'creats heat stack owner role' do + expect(chef_run).to create_role_openstack_identity_register( + "Create 'heat_stack_owner' Role for template defined users" + ).with( + auth_uri: 'http://127.0.0.1:35357/v2.0', + bootstrap_token: 'bootstrap-token', + role_name: 'heat_stack_owner' + ) + end + it 'syncs /opt/tempest from github' do expect(chef_run).to sync_git( '/opt/tempest' diff --git a/templates/default/tempest.conf.erb b/templates/default/tempest.conf.erb index 45fa3de..51c27a0 100644 --- a/templates/default/tempest.conf.erb +++ b/templates/default/tempest.conf.erb @@ -162,7 +162,7 @@ savanna = False ironic = False ceilometer = False horizon = True -heat = False +heat = True swift = False neutron = False glance = True