Merge "Inherit pyvers from openstacklib::defaults"
This commit is contained in:
commit
e2cad3594b
@ -2,13 +2,7 @@
|
|||||||
#
|
#
|
||||||
class aodh::params {
|
class aodh::params {
|
||||||
include ::openstacklib::defaults
|
include ::openstacklib::defaults
|
||||||
|
$pyvers = $::openstacklib::defaults::pyvers
|
||||||
if ($::os_package_type == 'debian') or ($::os['name'] == 'Fedora') or
|
|
||||||
($::os['family'] == 'RedHat' and Integer.new($::os['release']['major']) > 7) {
|
|
||||||
$pyvers = '3'
|
|
||||||
} else {
|
|
||||||
$pyvers = ''
|
|
||||||
}
|
|
||||||
|
|
||||||
$client_package_name = "python${pyvers}-aodhclient"
|
$client_package_name = "python${pyvers}-aodhclient"
|
||||||
$group = 'aodh'
|
$group = 'aodh'
|
||||||
|
@ -10,7 +10,7 @@ describe 'aodh::client' do
|
|||||||
it 'installs aodh client package' do
|
it 'installs aodh client package' do
|
||||||
is_expected.to contain_package('python-aodhclient').with(
|
is_expected.to contain_package('python-aodhclient').with(
|
||||||
:ensure => 'present',
|
:ensure => 'present',
|
||||||
:name => 'python-aodhclient',
|
:name => platform_params[:client_package_name],
|
||||||
:tag => 'openstack',
|
:tag => 'openstack',
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
@ -27,11 +27,7 @@ describe 'aodh::client' do
|
|||||||
let(:platform_params) do
|
let(:platform_params) do
|
||||||
case facts[:osfamily]
|
case facts[:osfamily]
|
||||||
when 'Debian'
|
when 'Debian'
|
||||||
if facts[:os_package_type] == 'debian'
|
{ :client_package_name => 'python3-aodhclient' }
|
||||||
{ :client_package_name => 'python3-aodhclient' }
|
|
||||||
else
|
|
||||||
{ :client_package_name => 'python-aodhclient' }
|
|
||||||
end
|
|
||||||
when 'RedHat'
|
when 'RedHat'
|
||||||
{ :client_package_name => 'python-aodhclient' }
|
{ :client_package_name => 'python-aodhclient' }
|
||||||
end
|
end
|
||||||
|
@ -22,7 +22,7 @@ describe 'aodh::evaluator' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'installs python-redis package' do
|
it 'installs python-redis package' do
|
||||||
is_expected.to contain_package(platform_params[:redis_package_name]).with(
|
is_expected.to contain_package('python-redis').with(
|
||||||
:name => platform_params[:redis_package_name],
|
:name => platform_params[:redis_package_name],
|
||||||
:tag => 'openstack'
|
:tag => 'openstack'
|
||||||
)
|
)
|
||||||
@ -116,7 +116,7 @@ describe 'aodh::evaluator' do
|
|||||||
when 'Debian'
|
when 'Debian'
|
||||||
{ :evaluator_package_name => 'aodh-evaluator',
|
{ :evaluator_package_name => 'aodh-evaluator',
|
||||||
:evaluator_service_name => 'aodh-evaluator',
|
:evaluator_service_name => 'aodh-evaluator',
|
||||||
:redis_package_name => 'python-redis' }
|
:redis_package_name => 'python3-redis' }
|
||||||
when 'RedHat'
|
when 'RedHat'
|
||||||
{ :evaluator_package_name => 'openstack-aodh-evaluator',
|
{ :evaluator_package_name => 'openstack-aodh-evaluator',
|
||||||
:evaluator_service_name => 'openstack-aodh-evaluator',
|
:evaluator_service_name => 'openstack-aodh-evaluator',
|
||||||
|
Loading…
Reference in New Issue
Block a user