Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic update #143

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ mod 'ipa',
:git => 'https://github.com/xbezdick/puppet-ipa.git'

mod 'keystone',
:commit => '38518cbcb3ef8ad3bb068730a21d790b27a29b74',
:commit => 'a0e8e9a393aef8b61c0452a7d917d5af22c5271d',
:git => 'https://github.com/stackforge/puppet-keystone.git'

mod 'memcached',
Expand Down
15 changes: 3 additions & 12 deletions keystone/manifests/endpoint.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,22 @@
#
# [*public_url*]
# (optional) Public url for keystone endpoint. (Defaults to 'http://127.0.0.1:5000')
# This url should *not* contain any version or trailing '/'.
#
# [*internal_url*]
# (optional) Internal url for keystone endpoint. (Defaults to $public_url)
# This url should *not* contain any version or trailing '/'.
#
# [*admin_url*]
# (optional) Admin url for keystone endpoint. (Defaults to 'http://127.0.0.1:35357')
# This url should *not* contain any version or trailing '/'.
#
# [*region*]
# (optional) Region for endpoint. (Defaults to 'RegionOne')
#
# [*version*]
# (optional) API version for endpoint. Appended to all endpoint urls. (Defaults to 'v2.0')
#
# [*public_url*]
# (optional) The endpoint's public url. (Defaults to 'http://127.0.0.1:5000')
# This url should *not* contain any version or trailing '/'.
#
# [*admin_url*]
# (optional) The endpoint's admin url. (Defaults to 'http://127.0.0.1:5000')
# This url should *not* contain any version or trailing '/'.
#
# [*internal_url*]
# (optional) The endpoint's internal url. (Defaults to 'http://127.0.0.1:35357')
# This url should *not* contain any version or trailing '/'.
#
# [*public_protocol*]
# (optional) DEPRECATED: Use public_url instead.
# Protocol for public access to keystone endpoint. (Defaults to 'http')
Expand Down
43 changes: 1 addition & 42 deletions keystone/spec/classes/keystone_wsgi_apache_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,6 @@
]
end

# concat::fragment { "${name}-wsgi":
# $filename = regsubst($name, ' ', '_', 'G')
# target => "${priority_real}-${filename}.conf",
# $safe_name = regsubst($name, '[/:\n]', '_', 'GM')
# $safe_target_name = regsubst($target, '[/:\n]', '_', 'GM')
# $concatdir = $concat::setup::concatdir
# $fragdir = "${concatdir}/${safe_target_name}"
# file { "${fragdir}/fragments/${order}_${safe_name}":
def get_concat_name(base_name)
# pp subject.resources
priority = 10
order = 250
base_dir = facts[:concat_basedir]
safe_name = base_name.gsub(/[\/:\n]/m, '_') + '-wsgi'
target = "#{priority}-#{base_name}.conf"
safe_target_name = target.gsub(/[\/:\n]/m, '_')
frag_dir = "#{base_dir}/#{safe_target_name}"
full_name = "#{frag_dir}/fragments/#{order}_#{safe_name}"
return full_name
end

shared_examples_for 'apache serving keystone with mod_wsgi' do
it { should contain_service('httpd').with_name(platform_parameters[:httpd_service_name]) }
it { should contain_class('keystone::params') }
Expand Down Expand Up @@ -100,12 +79,6 @@ def get_concat_name(base_name)
'wsgi_script_aliases' => { '/' => "#{platform_parameters[:wsgi_script_path]}/main" },
'require' => 'File[keystone_wsgi_main]'
)}
it { should contain_file(get_concat_name('keystone_wsgi_main')).with_content(
/^ WSGIDaemonProcess keystone_main group=keystone processes=1 threads=#{facts[:processorcount]} user=keystone$/
)}
it { should contain_file(get_concat_name('keystone_wsgi_admin')).with_content(
/^ WSGIDaemonProcess keystone_admin group=keystone processes=1 threads=#{facts[:processorcount]} user=keystone$/
)}
it { should contain_file("#{platform_parameters[:httpd_ports_file]}") }
end

Expand Down Expand Up @@ -148,12 +121,7 @@ def get_concat_name(base_name)
'wsgi_script_aliases' => { '/' => "#{platform_parameters[:wsgi_script_path]}/main" },
'require' => 'File[keystone_wsgi_main]'
)}
it { should contain_file(get_concat_name('keystone_wsgi_main')).with_content(
/^ WSGIDaemonProcess keystone_main group=keystone processes=#{params[:workers]} threads=#{facts[:processorcount]} user=keystone$/
)}
it { should contain_file(get_concat_name('keystone_wsgi_admin')).with_content(
/^ WSGIDaemonProcess keystone_admin group=keystone processes=#{params[:workers]} threads=#{facts[:processorcount]} user=keystone$/
)}

it { should contain_file("#{platform_parameters[:httpd_ports_file]}") }
end

Expand Down Expand Up @@ -188,15 +156,6 @@ def get_concat_name(base_name)
},
'require' => 'File[keystone_wsgi_main]'
)}
it { should contain_file(get_concat_name('keystone_wsgi_main')).with_content(
/^ WSGIDaemonProcess keystone_main group=keystone processes=#{params[:workers]} threads=#{facts[:processorcount]} user=keystone$/
)}
it do
expect_file = get_concat_name('keystone_wsgi_admin')
expect {
should contain_file(expect_file)
}.to raise_error(RSpec::Expectations::ExpectationNotMetError, /expected that the catalogue would contain File\[#{expect_file}\]/)
end
end

describe 'when overriding parameters using same port and same path' do
Expand Down