Inherit pyvers from openstacklib::defaults

Depends-On: https://review.openstack.org/#/c/633162/
Change-Id: Ied4fcd08ce82543907c4cf8fd5f2780e63a47eed
This commit is contained in:
Tobias Urdin
2019-01-17 21:47:46 +01:00
parent 5837b0f773
commit 63cd960253
2 changed files with 4 additions and 7 deletions

View File

@@ -5,11 +5,8 @@
# #
class openstacklib::params { class openstacklib::params {
if ($::os_package_type == 'debian') or ($::os['name'] == 'Fedora') or include ::openstacklib::defaults
($::os['family'] == 'RedHat' and Integer.new($::os['release']['major']) > 7) { $pyvers = $::openstacklib::defaults::pyvers
$pyvers = '3'
} else {
$pyvers = ''
}
$openstackclient_package_name = "python${pyvers}-openstackclient" $openstackclient_package_name = "python${pyvers}-openstackclient"
} }

View File

@@ -32,7 +32,7 @@ describe 'openstacklib::openstackclient' do
end end
let(:platform_params) do let(:platform_params) do
if facts[:os_package_type] == 'debian' or (facts[:os_package_type] == 'rpm' \ if facts[:osfamily] == 'Debian' or (facts[:os_package_type] == 'rpm' \
and facts[:operatingsystemrelease].to_i > 7) then and facts[:operatingsystemrelease].to_i > 7) then
openstackclient_package_name = 'python3-openstackclient' openstackclient_package_name = 'python3-openstackclient'
else else