Browse Source

Inherit pyvers from openstacklib::defaults

Depends-On: I84b767921d151a61429b2c89e6372c4b447f0d7d
Depends-On: I6769ae262cbe112c63c14b43acbbcdff13ea5e16
Change-Id: I65bd5fe3660afb218ffdab9837f42ea322307e61
changes/14/630214/5
Lee Yarwood 3 years ago committed by Tobias Urdin
parent
commit
abbef3e120
  1. 8
      manifests/params.pp
  2. 8
      spec/classes/aodh_client_spec.rb
  3. 4
      spec/classes/aodh_evaluator_spec.rb

8
manifests/params.pp

@ -2,13 +2,7 @@
#
class aodh::params {
include ::openstacklib::defaults
if ($::os_package_type == 'debian') or ($::os['name'] == 'Fedora') or
($::os['family'] == 'RedHat' and Integer.new($::os['release']['major']) > 7) {
$pyvers = '3'
} else {
$pyvers = ''
}
$pyvers = $::openstacklib::defaults::pyvers
$client_package_name = "python${pyvers}-aodhclient"
$group = 'aodh'

8
spec/classes/aodh_client_spec.rb

@ -10,7 +10,7 @@ describe 'aodh::client' do
it 'installs aodh client package' do
is_expected.to contain_package('python-aodhclient').with(
:ensure => 'present',
:name => 'python-aodhclient',
:name => platform_params[:client_package_name],
:tag => 'openstack',
)
end
@ -27,11 +27,7 @@ describe 'aodh::client' do
let(:platform_params) do
case facts[:osfamily]
when 'Debian'
if facts[:os_package_type] == 'debian'
{ :client_package_name => 'python3-aodhclient' }
else
{ :client_package_name => 'python-aodhclient' }
end
{ :client_package_name => 'python3-aodhclient' }
when 'RedHat'
{ :client_package_name => 'python-aodhclient' }
end

4
spec/classes/aodh_evaluator_spec.rb

@ -22,7 +22,7 @@ describe 'aodh::evaluator' do
end
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],
:tag => 'openstack'
)
@ -116,7 +116,7 @@ describe 'aodh::evaluator' do
when 'Debian'
{ :evaluator_package_name => 'aodh-evaluator',
:evaluator_service_name => 'aodh-evaluator',
:redis_package_name => 'python-redis' }
:redis_package_name => 'python3-redis' }
when 'RedHat'
{ :evaluator_package_name => 'openstack-aodh-evaluator',
:evaluator_service_name => 'openstack-aodh-evaluator',

Loading…
Cancel
Save