summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Urdin <tobias.urdin@binero.se>2019-01-17 21:30:39 +0100
committerTobias Urdin <tobias.urdin@binero.se>2019-01-17 21:30:39 +0100
commit580ead284fbaf6d4b5c6cfd42eea3c59b41df391 (patch)
treea655b3beab86898923d077489966e1c955712346
parentaf77837871566f805e43d9680d6ce29210c1e17b (diff)
Inherit pyvers from openstacklib::defaults
Notes
Notes (review): Code-Review+2: zhongshengping <chdzsp@163.com> Code-Review+2: Emilien Macchi <emilien@redhat.com> Workflow+1: Emilien Macchi <emilien@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 18 Jan 2019 11:42:54 +0000 Reviewed-on: https://review.openstack.org/631623 Project: openstack/puppet-glare Branch: refs/heads/master
-rw-r--r--manifests/params.pp12
-rw-r--r--spec/classes/glare_client_spec.rb6
2 files changed, 4 insertions, 14 deletions
diff --git a/manifests/params.pp b/manifests/params.pp
index 3e0597c..f0d1010 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -2,13 +2,7 @@
2# 2#
3class glare::params { 3class glare::params {
4 include ::openstacklib::defaults 4 include ::openstacklib::defaults
5 5 $pyvers = $::openstacklib::defaults::pyvers
6 if ($::os_package_type == 'debian') or ($::os['name'] == 'Fedora') or
7 ($::os['family'] == 'RedHat' and Integer.new($::os['release']['major']) > 7) {
8 $pyvers = '3'
9 } else {
10 $pyvers = ''
11 }
12 6
13 $group = 'glare' 7 $group = 'glare'
14 $client_package_name = "python${pyvers}-glareclient" 8 $client_package_name = "python${pyvers}-glareclient"
@@ -18,9 +12,9 @@ class glare::params {
18 $glare_package_name = 'openstack-glare' 12 $glare_package_name = 'openstack-glare'
19 $glare_service_name = 'openstack-glare-api' 13 $glare_service_name = 'openstack-glare-api'
20 if ($::operatingsystem != 'fedora' and versioncmp($::operatingsystemrelease, '7') < 0) { 14 if ($::operatingsystem != 'fedora' and versioncmp($::operatingsystemrelease, '7') < 0) {
21 $pyceph_package_name = 'python-ceph' 15 $pyceph_package_name = "python${pyvers}-ceph"
22 } else { 16 } else {
23 $pyceph_package_name = 'python-rbd' 17 $pyceph_package_name = "python${pyvers}-rbd"
24 } 18 }
25 } 19 }
26 'Debian': { 20 'Debian': {
diff --git a/spec/classes/glare_client_spec.rb b/spec/classes/glare_client_spec.rb
index 3ce64f8..6c40ae9 100644
--- a/spec/classes/glare_client_spec.rb
+++ b/spec/classes/glare_client_spec.rb
@@ -27,11 +27,7 @@ describe 'glare::client' do
27 let(:platform_params) do 27 let(:platform_params) do
28 case facts[:osfamily] 28 case facts[:osfamily]
29 when 'Debian' 29 when 'Debian'
30 if facts[:os_package_type] == 'debian' 30 { :client_package_name => 'python3-glareclient' }
31 { :client_package_name => 'python3-glareclient' }
32 else
33 { :client_package_name => 'python-glareclient' }
34 end
35 when 'RedHat' 31 when 'RedHat'
36 { :client_package_name => 'python-glareclient' } 32 { :client_package_name => 'python-glareclient' }
37 end 33 end