Browse Source

Inherit pyvers from openstacklib::defaults

Depends-On: I84b767921d151a61429b2c89e6372c4b447f0d7d
Change-Id: Ic5c4a5e5c50fb0058be94b3ee2ed9ceccb3eafdf
tags/14.3.0
Lee Yarwood 4 months ago
parent
commit
01ac308d05
2 changed files with 2 additions and 11 deletions
  1. 1
    6
      manifests/params.pp
  2. 1
    5
      spec/classes/heat_client_spec.rb

+ 1
- 6
manifests/params.pp View File

@@ -4,13 +4,8 @@
4 4
 #
5 5
 class heat::params {
6 6
   include ::openstacklib::defaults
7
+  $pyvers = $::openstacklib::defaults::pyvers
7 8
 
8
-  if ($::os_package_type == 'debian') or ($::os['name'] == 'Fedora') or
9
-    ($::os['family'] == 'RedHat' and Integer.new($::os['release']['major']) > 7) {
10
-    $pyvers = '3'
11
-  } else {
12
-    $pyvers = ''
13
-  }
14 9
   $client_package_name = "python${pyvers}-heatclient"
15 10
   $group               = 'heat'
16 11
 

+ 1
- 5
spec/classes/heat_client_spec.rb View File

@@ -38,11 +38,7 @@ describe 'heat::client' do
38 38
       let(:platform_params) do
39 39
         case facts[:osfamily]
40 40
         when 'Debian'
41
-          if facts[:os_package_type] == 'debian'
42
-            { :client_package_name => 'python3-heatclient' }
43
-          else
44
-            { :client_package_name => 'python-heatclient' }
45
-          end
41
+          { :client_package_name => 'python3-heatclient' }
46 42
         when 'RedHat'
47 43
           { :client_package_name => 'python-heatclient' }
48 44
         end

Loading…
Cancel
Save