summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Yarwood <lyarwood@redhat.com>2019-01-11 13:19:17 +0000
committerTobias Urdin <tobias.urdin@binero.se>2019-01-17 15:56:35 +0100
commit01ac308d05e6882b9c4187f8cbb947296aa8fff7 (patch)
tree54be840e8855c880703ff75a82dcac49e62caea0
parent2c4f5dcd2e35cdaeb522a901871d89532f571103 (diff)
Inherit pyvers from openstacklib::defaults
Notes
Notes (review): Code-Review+2: Alex Schultz <aschultz@redhat.com> Code-Review+2: zhongshengping <chdzsp@163.com> Workflow+1: zhongshengping <chdzsp@163.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 18 Jan 2019 02:33:17 +0000 Reviewed-on: https://review.openstack.org/630220 Project: openstack/puppet-heat Branch: refs/heads/master
-rw-r--r--manifests/params.pp7
-rw-r--r--spec/classes/heat_client_spec.rb6
2 files changed, 2 insertions, 11 deletions
diff --git a/manifests/params.pp b/manifests/params.pp
index f08f768..0208f5f 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -4,13 +4,8 @@
4# 4#
5class heat::params { 5class heat::params {
6 include ::openstacklib::defaults 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 $client_package_name = "python${pyvers}-heatclient" 9 $client_package_name = "python${pyvers}-heatclient"
15 $group = 'heat' 10 $group = 'heat'
16 11
diff --git a/spec/classes/heat_client_spec.rb b/spec/classes/heat_client_spec.rb
index d828348..62fb3b7 100644
--- a/spec/classes/heat_client_spec.rb
+++ b/spec/classes/heat_client_spec.rb
@@ -38,11 +38,7 @@ describe 'heat::client' do
38 let(:platform_params) do 38 let(:platform_params) do
39 case facts[:osfamily] 39 case facts[:osfamily]
40 when 'Debian' 40 when 'Debian'
41 if facts[:os_package_type] == 'debian' 41 { :client_package_name => 'python3-heatclient' }
42 { :client_package_name => 'python3-heatclient' }
43 else
44 { :client_package_name => 'python-heatclient' }
45 end
46 when 'RedHat' 42 when 'RedHat'
47 { :client_package_name => 'python-heatclient' } 43 { :client_package_name => 'python-heatclient' }
48 end 44 end