Inherit pyvers from openstacklib::defaults

Depends-On: I84b767921d151a61429b2c89e6372c4b447f0d7d
Depends-On: I6769ae262cbe112c63c14b43acbbcdff13ea5e16
Depends-On: https://review.openstack.org/#/c/633162/
Change-Id: I1a9565fa37bc8493541450c430216c8ae32c9b77
This commit is contained in:
Lee Yarwood
2019-01-11 12:56:54 +00:00
committed by Tobias Urdin
parent 7b8866ac27
commit e039c84350
2 changed files with 2 additions and 11 deletions

View File

@@ -4,12 +4,7 @@
# should be considered to be constant
class nova::params {
include ::openstacklib::defaults
if ($::os_package_type == 'debian') or ($::operatingsystem == 'Fedora') or
($::os['family'] == 'RedHat' and Integer.new($::os['release']['major']) > 7) {
$pyvers = '3'
} else {
$pyvers = ''
}
$pyvers = $::openstacklib::defaults::pyvers
$client_package = "python${pyvers}-novaclient"
$group = 'nova'

View File

@@ -26,11 +26,7 @@ describe 'nova::client' do
let(:platform_params) do
case facts[:osfamily]
when 'Debian'
if facts[:os_package_type] == 'debian'
{ :client_package_name => 'python3-novaclient' }
else
{ :client_package_name => 'python-novaclient' }
end
{ :client_package_name => 'python3-novaclient' }
when 'RedHat'
{ :client_package_name => 'python-novaclient' }
end