Inherit pyvers from openstacklib::defaults

Change-Id: Id839d55945a76ff033925f3e5357bed97767290a
This commit is contained in:
Tobias Urdin 2019-01-17 22:06:38 +01:00
parent 6f318cb392
commit 4856ae2868
2 changed files with 2 additions and 12 deletions

View File

@ -4,13 +4,7 @@
#
class trove::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}-troveclient"
$group = 'trove'

View File

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