diff --git a/README.md b/README.md index 4ad7855d3..13fbe718b 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ class { 'keystone::roles::admin': # Installs the service user endpoint. class { 'keystone::endpoint': public_url => 'http://10.16.0.101:5000/v2.0', - admin_url => 'http://10.16.1.101:35357/v2.0', + admin_url => 'http://10.16.1.101:5000/v2.0', internal_url => 'http://10.16.2.101:5000/v2.0', region => 'example-1', } diff --git a/examples/apache_dropin.pp b/examples/apache_dropin.pp index f06809dc2..8fbc072c4 100644 --- a/examples/apache_dropin.pp +++ b/examples/apache_dropin.pp @@ -37,7 +37,7 @@ class { '::keystone::roles::admin': } class { '::keystone::endpoint': public_url => "https://${::fqdn}:5000/", - admin_url => "https://${::fqdn}:35357/", + admin_url => "https://${::fqdn}:5000/", } keystone_config { 'ssl/enable': value => true } diff --git a/examples/k2k_sp_shib.pp b/examples/k2k_sp_shib.pp index 990753056..a3affd65c 100644 --- a/examples/k2k_sp_shib.pp +++ b/examples/k2k_sp_shib.pp @@ -56,7 +56,7 @@ class { '::keystone::roles::admin': class { '::keystone::endpoint': public_url => "https://${::fqdn}:5000/", - admin_url => "https://${::fqdn}:35357/", + admin_url => "https://${::fqdn}:5000/", } keystone_config { 'ssl/enable': value => true } diff --git a/examples/v3_basic.pp b/examples/v3_basic.pp index 3ca57b8fc..84005687c 100644 --- a/examples/v3_basic.pp +++ b/examples/v3_basic.pp @@ -15,7 +15,7 @@ # $ export OS_PASSWORD=ChangeMe # $ export OS_PROJECT_NAME=admin # $ export OS_PROJECT_DOMAIN_NAME=admin_domain -# $ export OS_AUTH_URL=http://keystone.local:35357/v3 +# $ export OS_AUTH_URL=http://keystone.local:5000/v3 # $ openstack user list # @@ -42,5 +42,5 @@ class { '::keystone::roles::admin': } class { '::keystone::endpoint': public_url => 'http://127.0.0.1:5000/', - admin_url => 'http://127.0.0.1:35357/', + admin_url => 'http://127.0.0.1:5000/', } diff --git a/examples/v3_domain_configuration.pp b/examples/v3_domain_configuration.pp index ae3537590..b7c478529 100644 --- a/examples/v3_domain_configuration.pp +++ b/examples/v3_domain_configuration.pp @@ -23,7 +23,7 @@ class { '::keystone::roles::admin': } class { '::keystone::endpoint': public_url => 'http://192.168.1.1:5000/', - admin_url => 'http://192.168.1.1:35357/', + admin_url => 'http://192.168.1.1:5000/', } # Creates the /etc/keystone/domains/keystone.my_domain.conf file and diff --git a/ext/keystone_test.rb b/ext/keystone_test.rb index 845ac7a14..0d9b1f0b2 100644 --- a/ext/keystone_test.rb +++ b/ext/keystone_test.rb @@ -35,7 +35,7 @@ end puts `puppet apply -e "package {curl: ensure => present }"` -get_token = %(curl -d '{"auth":{"passwordCredentials":{"username": "#{username}", "password": "#{password}"}}}' -H "Content-type: application/json" http://localhost:35357/v2.0/tokens) +get_token = %(curl -d '{"auth":{"passwordCredentials":{"username": "#{username}", "password": "#{password}"}}}' -H "Content-type: application/json" http://localhost:5000/v2.0/tokens) token = nil puts "Running auth command: #{get_token}" @@ -44,12 +44,12 @@ token = PSON.load(run_command(get_token))["access"]["token"]["id"] if token puts "We were able to retrieve a token" puts token - verify_token = "curl -H 'X-Auth-Token: #{service_token}' http://localhost:35357/v2.0/tokens/#{token}" + verify_token = "curl -H 'X-Auth-Token: #{service_token}' http://localhost:5000/v2.0/tokens/#{token}" puts 'verifying token' run_command(verify_token) ['endpoints', 'tenants', 'users'].each do |x| puts "getting #{x}" - get_keystone_data = "curl -H 'X-Auth-Token: #{service_token}' http://localhost:35357/v2.0/#{x}" + get_keystone_data = "curl -H 'X-Auth-Token: #{service_token}' http://localhost:5000/v2.0/#{x}" run_command(get_keystone_data) end end diff --git a/ext/keystone_test_v3.rb b/ext/keystone_test_v3.rb index 11a80b605..7d4e99cbc 100644 --- a/ext/keystone_test_v3.rb +++ b/ext/keystone_test_v3.rb @@ -38,7 +38,7 @@ def run_command(cmd) end puts `puppet apply -e "package {curl: ensure => present }"` -get_token = %(curl -D - -d '{"auth":{"identity":{"methods":["password"],"password":{"user":{"domain":{"name":"#{user_domain}"},"name":"#{username}","password": "#{password}"}}},"scope":{"project":{"domain":{"name":"#{project_domain}"},"name": "#{project}"}}}}' -H "Content-type: application/json" http://localhost:35357/v3/auth/tokens) +get_token = %(curl -D - -d '{"auth":{"identity":{"methods":["password"],"password":{"user":{"domain":{"name":"#{user_domain}"},"name":"#{username}","password": "#{password}"}}},"scope":{"project":{"domain":{"name":"#{project_domain}"},"name": "#{project}"}}}}' -H "Content-type: application/json" http://localhost:5000/v3/auth/tokens) token = nil puts "Running auth command: #{get_token}" @@ -53,12 +53,12 @@ end if token puts "We were able to retrieve a token" puts token - verify_token = "curl -H 'X-Auth-Token: #{service_token}' 'X-Subject-Token: #{token}' http://localhost:35357/v3/auth/tokens" + verify_token = "curl -H 'X-Auth-Token: #{service_token}' 'X-Subject-Token: #{token}' http://localhost:5000/v3/auth/tokens" puts 'verifying token' run_command(verify_token) ['endpoints', 'projects', 'users'].each do |x| puts "getting #{x}" - get_keystone_data = "curl -H 'X-Auth-Token: #{token}' http://localhost:35357/v3/#{x}" + get_keystone_data = "curl -H 'X-Auth-Token: #{token}' http://localhost:5000/v3/#{x}" pp PSON.load(run_command(get_keystone_data)) end end diff --git a/lib/puppet/provider/keystone.rb b/lib/puppet/provider/keystone.rb index 384141860..52c4c780f 100644 --- a/lib/puppet/provider/keystone.rb +++ b/lib/puppet/provider/keystone.rb @@ -175,7 +175,7 @@ class Puppet::Provider::Keystone < Puppet::Provider::Openstack if url = get_section('DEFAULT', 'admin_endpoint') endpoint = url.chomp('/') else - admin_port = get_section('DEFAULT', 'admin_port') || '35357' + admin_port = get_section('DEFAULT', 'admin_port') || '5000' host = clean_host(get_section('DEFAULT', 'admin_bind_host')) protocol = ssl? ? 'https' : 'http' endpoint = "#{protocol}://#{host}:#{admin_port}" diff --git a/manifests/endpoint.pp b/manifests/endpoint.pp index be5c65402..edb47f021 100644 --- a/manifests/endpoint.pp +++ b/manifests/endpoint.pp @@ -16,7 +16,7 @@ # # [*admin_url*] # (optional) Admin url for keystone endpoint. -# Defaults to 'http://127.0.0.1:35357' +# Defaults to 'http://127.0.0.1:5000' # This url should *not* contain any version or trailing '/'. # # [*region*] @@ -48,13 +48,13 @@ # class { 'keystone::endpoint': # public_url => 'https://154.10.10.23:5000', # internal_url => 'https://11.0.1.7:5000', -# admin_url => 'https://10.0.1.7:35357', +# admin_url => 'https://10.0.1.7:5000', # } # class keystone::endpoint ( $public_url = 'http://127.0.0.1:5000', $internal_url = undef, - $admin_url = 'http://127.0.0.1:35357', + $admin_url = 'http://127.0.0.1:5000', $region = 'RegionOne', $user_domain = undef, $project_domain = undef, diff --git a/manifests/init.pp b/manifests/init.pp index e9659141b..8192662a0 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -317,7 +317,7 @@ # advertised to clients (NOTE: this does NOT affect how keystone listens # for connections) (string value) # If set to false, no admin_endpoint will be defined in keystone.conf. -# Sample value: 'http://localhost:35357/' +# Sample value: 'http://localhost:5000/' # Defaults to $::os_service_default # # [*enable_ssl*] diff --git a/manifests/service.pp b/manifests/service.pp index baf3ca834..3e7dac7a7 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -38,7 +38,7 @@ # # [*admin_endpoint*] # (optional) The admin endpont to use for validation -# Defaults to 'http://localhost:35357/v2.0' +# Defaults to 'http://localhost:5000/v2.0' # # [*retries*] # (optional) Number of times to retry validation @@ -67,7 +67,7 @@ class keystone::service( $hasrestart = true, $validate = false, $admin_token = undef, - $admin_endpoint = 'http://localhost:35357/v2.0', + $admin_endpoint = 'http://localhost:5000/v2.0', $retries = 10, $delay = 2, $insecure = false, diff --git a/spec/classes/keystone_endpoint_spec.rb b/spec/classes/keystone_endpoint_spec.rb index 45c47f381..0931475f5 100644 --- a/spec/classes/keystone_endpoint_spec.rb +++ b/spec/classes/keystone_endpoint_spec.rb @@ -11,7 +11,7 @@ describe 'keystone::endpoint' do it { is_expected.to contain_keystone_endpoint('RegionOne/keystone::identity').with( :ensure => 'present', :public_url => 'http://127.0.0.1:5000', - :admin_url => 'http://127.0.0.1:35357', + :admin_url => 'http://127.0.0.1:5000', :internal_url => 'http://127.0.0.1:5000', :region => 'RegionOne' )} @@ -45,7 +45,7 @@ describe 'keystone::endpoint' do it { is_expected.to contain_keystone_endpoint('RegionOne/keystone::identity').with( :ensure => 'present', :public_url => 'http://127.0.0.1:5000/v2.0', - :admin_url => 'http://127.0.0.1:35357/v2.0', + :admin_url => 'http://127.0.0.1:5000/v2.0', :internal_url => 'http://127.0.0.1:5000/v2.0' )} end diff --git a/spec/classes/keystone_init_spec.rb b/spec/classes/keystone_init_spec.rb index 5534627e4..119898ef5 100644 --- a/spec/classes/keystone_init_spec.rb +++ b/spec/classes/keystone_init_spec.rb @@ -88,7 +88,7 @@ describe 'keystone' do 'revoke_driver' => 'kvs', 'revoke_by_id' => false, 'public_endpoint' => 'https://localhost:5000/v2.0/', - 'admin_endpoint' => 'https://localhost:35357/v2.0/', + 'admin_endpoint' => 'https://localhost:5000/v2.0/', 'enable_ssl' => true, 'ssl_certfile' => '/etc/keystone/ssl/certs/keystone.pem', 'ssl_keyfile' => '/etc/keystone/ssl/private/keystonekey.pem', @@ -710,7 +710,7 @@ describe 'keystone' do 'admin_token' => 'service_token', 'enable_ssl' => true, 'public_endpoint' => 'https://localhost:5000/v2.0/', - 'admin_endpoint' => 'https://localhost:35357/v2.0/', + 'admin_endpoint' => 'https://localhost:5000/v2.0/', } end it {is_expected.to contain_keystone_config('ssl/enable').with_value(true)} @@ -720,7 +720,7 @@ describe 'keystone' do it {is_expected.to contain_keystone_config('ssl/ca_key').with_value('/etc/keystone/ssl/private/cakey.pem')} it {is_expected.to contain_keystone_config('ssl/cert_subject').with_value('/C=US/ST=Unset/L=Unset/O=Unset/CN=localhost')} it {is_expected.to contain_keystone_config('DEFAULT/public_endpoint').with_value('https://localhost:5000/v2.0/')} - it {is_expected.to contain_keystone_config('DEFAULT/admin_endpoint').with_value('https://localhost:35357/v2.0/')} + it {is_expected.to contain_keystone_config('DEFAULT/admin_endpoint').with_value('https://localhost:5000/v2.0/')} end describe 'when disabling SSL' do let :params do @@ -868,15 +868,15 @@ describe 'keystone' do { :admin_token => 'service_token', :validate_service => true, - :validate_auth_url => 'http://some.host:35357/v2.0', - :admin_endpoint => 'http://some.host:35357' + :validate_auth_url => 'http://some.host:5000/v2.0', + :admin_endpoint => 'http://some.host:5000' } end - it { is_expected.to contain_keystone_config('DEFAULT/admin_endpoint').with_value('http://some.host:35357') } + it { is_expected.to contain_keystone_config('DEFAULT/admin_endpoint').with_value('http://some.host:5000') } it { is_expected.to contain_class('keystone::service').with( 'validate' => true, - 'admin_endpoint' => 'http://some.host:35357/v2.0' + 'admin_endpoint' => 'http://some.host:5000/v2.0' )} end @@ -885,13 +885,13 @@ describe 'keystone' do { :admin_token => 'service_token', :validate_service => true, - :admin_endpoint => 'http://some.host:35357' + :admin_endpoint => 'http://some.host:5000' } end it { is_expected.to contain_class('keystone::service').with( 'validate' => true, - 'admin_endpoint' => 'http://some.host:35357' + 'admin_endpoint' => 'http://some.host:5000' )} end diff --git a/spec/defines/keystone_resource_authtoken_spec.rb b/spec/defines/keystone_resource_authtoken_spec.rb index d217a7c17..9fea20ddb 100644 --- a/spec/defines/keystone_resource_authtoken_spec.rb +++ b/spec/defines/keystone_resource_authtoken_spec.rb @@ -7,7 +7,7 @@ describe 'keystone::resource::authtoken' do let :params do { :username => 'keystone', :password => 'secret', - :auth_url => 'http://127.0.0.1:35357', + :auth_url => 'http://127.0.0.1:5000', :project_name => 'services' } end @@ -57,7 +57,7 @@ describe 'keystone::resource::authtoken' do params.merge! ({ :username => 'username', :password => 'hardpassword', - :auth_url => 'http://127.1.1.127:35357/', + :auth_url => 'http://127.1.1.127:5000/', :project_name => 'NoProject', :user_domain_name => 'MyDomain', :project_domain_name => 'OurDomain', diff --git a/spec/unit/provider/keystone_domain/openstack_spec.rb b/spec/unit/provider/keystone_domain/openstack_spec.rb index a344d2603..6ce9da681 100644 --- a/spec/unit/provider/keystone_domain/openstack_spec.rb +++ b/spec/unit/provider/keystone_domain/openstack_spec.rb @@ -10,7 +10,7 @@ describe Puppet::Type.type(:keystone_domain).provider(:openstack) do ENV['OS_USERNAME'] = 'test' ENV['OS_PASSWORD'] = 'abc123' ENV['OS_PROJECT_NAME'] = 'test' - ENV['OS_AUTH_URL'] = 'http://127.0.0.1:35357/v2.0' + ENV['OS_AUTH_URL'] = 'http://127.0.0.1:5000/v2.0' end describe 'when managing a domain' do diff --git a/spec/unit/provider/keystone_spec.rb b/spec/unit/provider/keystone_spec.rb index c9d8d99a7..6eb95c445 100644 --- a/spec/unit/provider/keystone_spec.rb +++ b/spec/unit/provider/keystone_spec.rb @@ -16,7 +16,7 @@ describe Puppet::Provider::Keystone do ENV['OS_USERNAME'] = 'test' ENV['OS_PASSWORD'] = 'abc123' ENV['OS_PROJECT_NAME'] = 'test' - ENV['OS_AUTH_URL'] = 'http://127.0.0.1:35357/v3' + ENV['OS_AUTH_URL'] = 'http://127.0.0.1:5000/v3' end let(:another_class) do @@ -98,7 +98,7 @@ id="newid" ENV['OS_USERNAME'] = 'test' ENV['OS_PASSWORD'] = 'abc123' ENV['OS_PROJECT_NAME'] = 'test' - ENV['OS_AUTH_URL'] = 'http://127.0.0.1:35357/v3' + ENV['OS_AUTH_URL'] = 'http://127.0.0.1:5000/v3' end before(:each) do @@ -130,7 +130,7 @@ id="the_project_id" ENV['OS_USERNAME'] = 'test' ENV['OS_PASSWORD'] = 'abc123' ENV['OS_PROJECT_NAME'] = 'test' - ENV['OS_AUTH_URL'] = 'http://127.0.0.1:35357/v3' + ENV['OS_AUTH_URL'] = 'http://127.0.0.1:5000/v3' end before(:each) do diff --git a/spec/unit/provider/keystone_tenant/openstack_spec.rb b/spec/unit/provider/keystone_tenant/openstack_spec.rb index ce2532342..b12f86e92 100644 --- a/spec/unit/provider/keystone_tenant/openstack_spec.rb +++ b/spec/unit/provider/keystone_tenant/openstack_spec.rb @@ -55,7 +55,7 @@ describe provider_class do ENV['OS_USERNAME'] = 'test' ENV['OS_PASSWORD'] = 'abc123' ENV['OS_PROJECT_NAME'] = 'test' - ENV['OS_AUTH_URL'] = 'http://127.0.0.1:35357/v3' + ENV['OS_AUTH_URL'] = 'http://127.0.0.1:5000/v3' end before(:each) do diff --git a/tests/site.pp b/tests/site.pp index 695ed5b75..fffeebac4 100644 --- a/tests/site.pp +++ b/tests/site.pp @@ -17,7 +17,7 @@ node 'keystone_sqlite' { } class { '::keystone::endpoint': public_url => "http://${::fqdn}:5000/", - admin_url => "http://${::fqdn}:35357/", + admin_url => "http://${::fqdn}:5000/", } } @@ -56,7 +56,7 @@ node 'keystone' { } class { '::keystone::endpoint': public_url => "http://${::fqdn}:5000/", - admin_url => "http://${::fqdn}:35357/", + admin_url => "http://${::fqdn}:5000/", } }