Skip to content

Commit

Permalink
Update horizon to b599fefac2bd840aeadf32529a7d405e34a8506a
Browse files Browse the repository at this point in the history
b599fefac2bd840aeadf32529a7d405e34a8506a Added ensure_resource for python-memcache package.

Change-Id: I2daab78501ff53aae9bba2c721e0d5d65c165acc
  • Loading branch information
jguiditta committed Apr 15, 2016
1 parent b6b8695 commit 78df1fe
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ mod 'heat',
:git => 'https://github.com/openstack/puppet-heat.git'

mod 'horizon',
:commit => '7d0cbb02a52b9c26d1a878fbb341fd293e44304d',
:commit => 'b599fefac2bd840aeadf32529a7d405e34a8506a',
:git => 'https://github.com/openstack/puppet-horizon.git'

mod 'inifile',
Expand Down
6 changes: 6 additions & 0 deletions horizon/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,12 @@
$neutron_options_real = merge($neutron_defaults,$neutron_options)
validate_hash($api_versions)

if $cache_backend =~ /MemcachedCache/ {
ensure_packages('python-memcache',
{ name => $::horizon::params::memcache_package,
tag => ['openstack', 'horizon-package']})
}

package { 'horizon':
ensure => $package_ensure,
name => $::horizon::params::package_name,
Expand Down
2 changes: 2 additions & 0 deletions horizon/manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
$apache_group = 'apache'
$wsgi_user = 'dashboard'
$wsgi_group = 'dashboard'
$memcache_package = 'python-memcached'
}
'Debian': {
$http_service = 'apache2'
Expand All @@ -29,6 +30,7 @@
$apache_group = 'www-data'
$wsgi_user = 'horizon'
$wsgi_group = 'horizon'
$memcache_package = 'python-memcache'
case $::os_package_type {
'debian': {
$package_name = 'openstack-dashboard-apache'
Expand Down
15 changes: 15 additions & 0 deletions horizon/spec/classes/horizon_init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,21 @@
it { is_expected.to contain_exec('refresh_horizon_django_cache') }
end

context 'installs python memcache library when cache_backend is set to memcache' do
before do
params.merge!({
:cache_backend => 'django.core.cache.backends.memcached.MemcachedCache'
})
end

it {
is_expected.to contain_package('python-memcache').with(
:ensure => 'present',
:tag => ['openstack', 'horizon-package']
)
}
end

context 'with tuskar-ui enabled' do
before do
params.merge!({
Expand Down

0 comments on commit 78df1fe

Please sign in to comment.