summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2019-01-18 11:42:54 +0000
committerGerrit Code Review <review@openstack.org>2019-01-18 11:42:54 +0000
commitf54faaf00407bd41a56dc82ff7869db6df798e85 (patch)
treef6dd7fcceb5e8125e15a94db050f7fcea363fff7
parent777dcc090f30a1599e9d07d053dd0fa9e2e15d92 (diff)
parent580ead284fbaf6d4b5c6cfd42eea3c59b41df391 (diff)
Merge "Inherit pyvers from openstacklib::defaults"
-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