Tag all Heat packages
Some users wish to override the default package provider by their own. Tag all packages with the 'openstack' to allow mass resource attributes override using resource collectors. Closes-bug: #1391209 Change-Id: I09e54700438894e22d29605fec51bb056baf4050 Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
This commit is contained in:
parent
6c2de4990c
commit
73df608936
@ -76,6 +76,7 @@ class heat::api (
|
||||
package { 'heat-api':
|
||||
ensure => installed,
|
||||
name => $::heat::params::api_package_name,
|
||||
tag => 'openstack',
|
||||
}
|
||||
|
||||
if $manage_service {
|
||||
|
@ -79,6 +79,7 @@ class heat::api_cfn (
|
||||
package { 'heat-api-cfn':
|
||||
ensure => installed,
|
||||
name => $::heat::params::api_cfn_package_name,
|
||||
tag => 'openstack',
|
||||
}
|
||||
|
||||
if $manage_service {
|
||||
|
@ -78,6 +78,7 @@ class heat::api_cloudwatch (
|
||||
package { 'heat-api-cloudwatch':
|
||||
ensure => installed,
|
||||
name => $::heat::params::api_cloudwatch_package_name,
|
||||
tag => 'openstack',
|
||||
}
|
||||
|
||||
if $manage_service {
|
||||
|
@ -16,6 +16,7 @@ class heat::client (
|
||||
package { 'python-heatclient':
|
||||
ensure => $ensure,
|
||||
name => $::heat::params::client_package_name,
|
||||
tag => 'openstack',
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -81,6 +81,7 @@ class heat::engine (
|
||||
package { 'heat-engine':
|
||||
ensure => installed,
|
||||
name => $::heat::params::engine_package_name,
|
||||
tag => 'openstack',
|
||||
notify => Exec['heat-dbsync'],
|
||||
}
|
||||
|
||||
|
@ -279,6 +279,7 @@ class heat(
|
||||
package { 'heat-common':
|
||||
ensure => $package_ensure,
|
||||
name => $::heat::params::common_package_name,
|
||||
tag => 'openstack',
|
||||
}
|
||||
|
||||
Package['heat-common'] -> Heat_config<||>
|
||||
@ -483,6 +484,7 @@ class heat(
|
||||
package {'heat-backend-package':
|
||||
ensure => present,
|
||||
name => $backend_package,
|
||||
tag => 'openstack',
|
||||
}
|
||||
}
|
||||
|
||||
|
45
spec/classes/heat_client_spec.rb
Normal file
45
spec/classes/heat_client_spec.rb
Normal file
@ -0,0 +1,45 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'heat::client' do
|
||||
|
||||
let :params do
|
||||
{}
|
||||
end
|
||||
|
||||
let :default_params do
|
||||
{ :package_ensure => 'present' }
|
||||
end
|
||||
|
||||
shared_examples_for 'heat client' do
|
||||
let :p do
|
||||
default_params.merge(params)
|
||||
end
|
||||
|
||||
it { is_expected.to contain_class('heat::params') }
|
||||
|
||||
it 'installs heat client package' do
|
||||
is_expected.to contain_package('python-heatclient').with(
|
||||
:name => 'python-heatclient',
|
||||
:ensure => p[:package_ensure],
|
||||
:tag => 'openstack'
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context 'on Debian platform' do
|
||||
let :facts do
|
||||
{ :osfamily => 'Debian' }
|
||||
end
|
||||
|
||||
it_configures 'heat client'
|
||||
end
|
||||
|
||||
context 'on RedHat platform' do
|
||||
let :facts do
|
||||
{ :osfamily => 'RedHat' }
|
||||
end
|
||||
|
||||
it_configures 'heat client'
|
||||
end
|
||||
end
|
@ -42,7 +42,12 @@ describe 'heat::engine' do
|
||||
default_params.merge(params)
|
||||
end
|
||||
|
||||
it { is_expected.to contain_package('heat-engine').with_name(os_params[:package_name]) }
|
||||
it { is_expected.to contain_package('heat-engine').with(
|
||||
:ensure => 'installed',
|
||||
:name => os_params[:package_name],
|
||||
:tag => 'openstack',
|
||||
:notify => 'Exec[heat-dbsync]'
|
||||
) }
|
||||
|
||||
it { is_expected.to contain_service('heat-engine').with(
|
||||
:ensure => (expected_params[:manage_service] && expected_params[:enabled]) ? 'running' : 'stopped',
|
||||
|
@ -116,7 +116,8 @@ describe 'heat' do
|
||||
it 'installs heat common package' do
|
||||
is_expected.to contain_package('heat-common').with(
|
||||
:ensure => 'present',
|
||||
:name => platform_params[:common_package_name]
|
||||
:name => platform_params[:common_package_name],
|
||||
:tag => 'openstack'
|
||||
)
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user