Pass correct auth_url to openstack::network class

auth_url should point to the public keystone port.
Use identity_uri for parameters which require admin endpoint

Closes-bug: #1503725
Change-Id: I2018f30f8a909d19bc1e8c87fbb061bcb599f8d3
This commit is contained in:
Sergey Kolekonov 2015-11-05 13:56:58 +03:00
parent 0aa61fe09a
commit f8732f140a
5 changed files with 27 additions and 7 deletions

View File

@ -74,8 +74,8 @@ class openstack::network (
$admin_password = 'asdf123',
$admin_tenant_name = 'services',
$admin_username = 'neutron',
$auth_url = 'http://127.0.0.1:5000/v2.0',
$identity_uri = 'http://127.0.0.1:35357',
$auth_url = 'http://127.0.0.1:5000',
$region = 'RegionOne',
$neutron_url = 'http://127.0.0.1:9696',
@ -196,7 +196,7 @@ class openstack::network (
neutron_admin_tenant_name => $admin_tenant_name,
neutron_region_name => $region,
neutron_admin_username => $admin_username,
neutron_admin_auth_url => $auth_url,
neutron_admin_auth_url => "${identity_uri}/v2.0",
neutron_url => $neutron_url,
neutron_ovs_bridge => $integration_bridge
}
@ -243,7 +243,7 @@ class openstack::network (
class { 'neutron::server::notifications':
nova_url => $nova_url,
nova_admin_auth_url => $auth_url,
nova_admin_auth_url => "${identity_uri}/v2.0",
nova_admin_username => $nova_admin_username,
nova_admin_tenant_name => $nova_admin_tenant_name,
nova_admin_password => $nova_admin_password,
@ -256,7 +256,7 @@ class openstack::network (
"OS_TENANT_NAME=${admin_tenant_name}",
"OS_USERNAME=${admin_username}",
"OS_PASSWORD=${admin_password}",
"OS_AUTH_URL=${auth_url}",
"OS_AUTH_URL=${identity_uri}/v2.0",
"OS_REGION_NAME=${region}",
'OS_ENDPOINT_TYPE=internalURL',
],
@ -299,7 +299,7 @@ class openstack::network (
admin_password => $admin_password,
admin_tenant_name => $admin_tenant_name,
admin_username => $admin_username,
auth_url => $auth_url,
auth_url => "${identity_uri}/v2.0",
auth_region => $region,
#ovs

View File

@ -398,7 +398,8 @@ class { 'openstack::network':
# keystone
admin_password => $neutron_user_password,
auth_url => "http://${service_endpoint}:35357/v2.0",
auth_url => "http://${service_endpoint}:5000",
identity_uri => "http://${service_endpoint}:35357",
neutron_url => "http://${neutron_endpoint}:9696",
admin_tenant_name => $keystone_tenant,
admin_username => $keystone_user,

View File

@ -276,7 +276,7 @@ class { 'openstack::network':
# keystone
admin_password => $neutron_user_password,
auth_url => "http://${service_endpoint}:35357/v2.0",
auth_url => "http://${service_endpoint}:5000",
identity_uri => "http://${service_endpoint}:35357",
neutron_url => "http://${neutron_endpoint}:9696",
admin_tenant_name => $keystone_tenant,

View File

@ -9,6 +9,7 @@ describe manifest do
metadata_host = Noop.node_hash['internal_address'] # TODO: smakar change AFTER https://bugs.launchpad.net/fuel/+bug/1486048
use_neutron = Noop.hiera 'use_neutron'
service_endpoint = Noop.hiera 'service_endpoint'
it 'should declare openstack::network with use_stderr disabled' do
should contain_class('openstack::network').with(
@ -36,6 +37,18 @@ describe manifest do
)
end
it 'should configure identity uri for neutron' do
should contain_class('openstack::network').with(
'identity_uri' => "http://#{service_endpoint}:35357",
)
end
it 'should configure auth url for neutron' do
should contain_class('openstack::network').with(
'auth_url' => "http://#{service_endpoint}:5000",
)
end
it 'should configure report_interval for neutron' do
should contain_class('neutron').with(
'report_interval' => '10',

View File

@ -109,6 +109,12 @@ describe manifest do
)
end
it 'should configure auth url for neutron' do
should contain_class('openstack::network').with(
'auth_url' => "http://#{service_endpoint}:5000",
)
end
neutron_config = Noop.hiera_structure 'quantum_settings'
neutron_advanced_config = Noop.hiera_structure 'neutron_advanced_configuration'