Merge "Simplify identity endpoint"
This commit is contained in:
commit
2727d676ff
|
@ -35,9 +35,8 @@ platform_options['tempest_packages'].each do |pkg|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
identity_admin_endpoint = admin_endpoint 'identity'
|
identity_endpoint = public_endpoint 'identity'
|
||||||
identity_public_endpoint = public_endpoint 'identity'
|
auth_url = auth_uri_transform identity_endpoint.to_s, node['openstack']['api']['auth']['version']
|
||||||
auth_url = ::URI.decode identity_admin_endpoint.to_s
|
|
||||||
|
|
||||||
admin_user = node['openstack']['identity']['admin_user']
|
admin_user = node['openstack']['identity']['admin_user']
|
||||||
admin_pass = get_password 'user', admin_user
|
admin_pass = get_password 'user', admin_user
|
||||||
|
@ -133,9 +132,9 @@ ruby_block 'Create nano flavor 99' do
|
||||||
block do
|
block do
|
||||||
begin
|
begin
|
||||||
env = openstack_command_env(admin_user, admin_project, 'Default', 'Default')
|
env = openstack_command_env(admin_user, admin_project, 'Default', 'Default')
|
||||||
output = openstack_command('nova', 'flavor-list', env)
|
output = openstack_command('openstack', 'flavor list', env)
|
||||||
unless output.include? 'm1.nano'
|
unless output.include? 'm1.nano'
|
||||||
openstack_command('nova', 'flavor-create m1.nano 99 64 0 1', env)
|
openstack_command('openstack', 'flavor create --id 99 --vcpus 1 --ram 64 --disk 1 m1.nano', env)
|
||||||
end
|
end
|
||||||
rescue RuntimeError => e
|
rescue RuntimeError => e
|
||||||
Chef::Log.error("Could not create flavor m1.nano. Error was #{e.message}")
|
Chef::Log.error("Could not create flavor m1.nano. Error was #{e.message}")
|
||||||
|
@ -146,8 +145,8 @@ end
|
||||||
node.default['openstack']['integration-test']['conf'].tap do |conf|
|
node.default['openstack']['integration-test']['conf'].tap do |conf|
|
||||||
conf['compute']['image_ref'] = node['openstack']['integration-test']['image1']['id']
|
conf['compute']['image_ref'] = node['openstack']['integration-test']['image1']['id']
|
||||||
conf['compute']['image_ref_alt'] = node['openstack']['integration-test']['image2']['id']
|
conf['compute']['image_ref_alt'] = node['openstack']['integration-test']['image2']['id']
|
||||||
conf['identity']['uri'] = "#{identity_public_endpoint.scheme}://#{identity_public_endpoint.host}:#{identity_public_endpoint.port}/v2.0/"
|
conf['identity']['uri'] = "#{identity_endpoint.scheme}://#{identity_endpoint.host}:#{identity_endpoint.port}/v3/"
|
||||||
conf['identity']['uri_v3'] = "#{identity_public_endpoint.scheme}://#{identity_public_endpoint.host}:#{identity_public_endpoint.port}/v3/"
|
conf['identity']['uri_v3'] = "#{identity_endpoint.scheme}://#{identity_endpoint.host}:#{identity_endpoint.port}/v3/"
|
||||||
end
|
end
|
||||||
|
|
||||||
node.default['openstack']['integration-test']['conf_secrets'].tap do |conf_secrets|
|
node.default['openstack']['integration-test']['conf_secrets'].tap do |conf_secrets|
|
||||||
|
|
|
@ -12,7 +12,7 @@ describe 'openstack-integration-test::setup' do
|
||||||
include_context 'tempest-stubs'
|
include_context 'tempest-stubs'
|
||||||
|
|
||||||
connection_params = {
|
connection_params = {
|
||||||
openstack_auth_url: 'http://127.0.0.1:35357/v3/auth/tokens',
|
openstack_auth_url: 'http://127.0.0.1:5000/v3/auth/tokens',
|
||||||
openstack_username: 'admin',
|
openstack_username: 'admin',
|
||||||
openstack_api_key: 'admin',
|
openstack_api_key: 'admin',
|
||||||
openstack_project_name: 'admin',
|
openstack_project_name: 'admin',
|
||||||
|
@ -105,7 +105,7 @@ describe 'openstack-integration-test::setup' do
|
||||||
identity_user: 'admin',
|
identity_user: 'admin',
|
||||||
identity_pass: 'admin',
|
identity_pass: 'admin',
|
||||||
identity_tenant: 'admin',
|
identity_tenant: 'admin',
|
||||||
identity_uri: 'http://127.0.0.1:35357/v3',
|
identity_uri: 'http://127.0.0.1:5000/v3',
|
||||||
identity_user_domain_name: 'default',
|
identity_user_domain_name: 'default',
|
||||||
identity_project_domain_name: 'default',
|
identity_project_domain_name: 'default',
|
||||||
image_name: 'cirros-test1',
|
image_name: 'cirros-test1',
|
||||||
|
@ -119,7 +119,7 @@ describe 'openstack-integration-test::setup' do
|
||||||
identity_user: 'admin',
|
identity_user: 'admin',
|
||||||
identity_pass: 'admin',
|
identity_pass: 'admin',
|
||||||
identity_tenant: 'admin',
|
identity_tenant: 'admin',
|
||||||
identity_uri: 'http://127.0.0.1:35357/v3',
|
identity_uri: 'http://127.0.0.1:5000/v3',
|
||||||
identity_user_domain_name: 'default',
|
identity_user_domain_name: 'default',
|
||||||
identity_project_domain_name: 'default',
|
identity_project_domain_name: 'default',
|
||||||
image_name: 'cirros-test2',
|
image_name: 'cirros-test2',
|
||||||
|
@ -151,9 +151,9 @@ describe 'openstack-integration-test::setup' do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'has a v2 auth URI with the default scheme' do
|
it 'has an auth URI with the default scheme' do
|
||||||
expect(chef_run).to render_file(file.name).with_content(
|
expect(chef_run).to render_file(file.name).with_content(
|
||||||
'uri = http://127.0.0.1:5000/v2.0'
|
'uri = http://127.0.0.1:5000/v3'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -178,9 +178,9 @@ describe 'openstack-integration-test::setup' do
|
||||||
end
|
end
|
||||||
let(:file) { chef_run.template('/opt/tempest/etc/tempest.conf') }
|
let(:file) { chef_run.template('/opt/tempest/etc/tempest.conf') }
|
||||||
|
|
||||||
it 'has a v2 auth URI with the secure scheme' do
|
it 'has an auth URI with the secure scheme' do
|
||||||
expect(chef_run).to render_file(file.name).with_content(
|
expect(chef_run).to render_file(file.name).with_content(
|
||||||
'uri = https://127.0.0.1:5000/v2.0'
|
'uri = https://127.0.0.1:5000/v3'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -6,16 +6,19 @@ ChefSpec::Coverage.start! { add_filter 'openstack-integration-test' }
|
||||||
|
|
||||||
require 'chef/application'
|
require 'chef/application'
|
||||||
|
|
||||||
LOG_LEVEL = :fatal
|
RSpec.configure do |config|
|
||||||
|
config.color = true
|
||||||
|
config.formatter = :documentation
|
||||||
|
config.log_level = :fatal
|
||||||
|
end
|
||||||
|
|
||||||
REDHAT_OPTS = {
|
REDHAT_OPTS = {
|
||||||
platform: 'redhat',
|
platform: 'redhat',
|
||||||
version: '7.3',
|
version: '7.4',
|
||||||
log_level: LOG_LEVEL,
|
|
||||||
}.freeze
|
}.freeze
|
||||||
UBUNTU_OPTS = {
|
UBUNTU_OPTS = {
|
||||||
platform: 'ubuntu',
|
platform: 'ubuntu',
|
||||||
version: '16.04',
|
version: '16.04',
|
||||||
log_level: LOG_LEVEL,
|
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
shared_context 'tempest-stubs' do
|
shared_context 'tempest-stubs' do
|
||||||
|
@ -25,7 +28,7 @@ shared_context 'tempest-stubs' do
|
||||||
'OS_USERNAME' => 'admin',
|
'OS_USERNAME' => 'admin',
|
||||||
'OS_PASSWORD' => 'admin',
|
'OS_PASSWORD' => 'admin',
|
||||||
'OS_PROJECT_NAME' => 'admin',
|
'OS_PROJECT_NAME' => 'admin',
|
||||||
'OS_AUTH_URL' => 'http://127.0.0.1:35357/v3',
|
'OS_AUTH_URL' => 'http://127.0.0.1:5000/v3',
|
||||||
'OS_USER_DOMAIN_NAME' => 'default',
|
'OS_USER_DOMAIN_NAME' => 'default',
|
||||||
'OS_PROJECT_DOMAIN_NAME' => 'default',
|
'OS_PROJECT_DOMAIN_NAME' => 'default',
|
||||||
'OS_IDENTITY_API_VERSION' => 3,
|
'OS_IDENTITY_API_VERSION' => 3,
|
||||||
|
|
Loading…
Reference in New Issue