Inherit pyvers from openstacklib::defaults
Depends-On: I84b767921d151a61429b2c89e6372c4b447f0d7d Depends-On: https://review.openstack.org/#/c/633162/ Change-Id: I2ceeee6a2479fa43ead877a7130908c1dd516d30
This commit is contained in:
parent
0128c46d49
commit
5cc9d67e34
|
@ -2,15 +2,8 @@
|
|||
# should be considered to be constant
|
||||
class glance::params {
|
||||
include ::openstacklib::defaults
|
||||
$pyvers = $::openstacklib::defaults::pyvers
|
||||
|
||||
if ($::os_package_type == 'debian') or ($::operatingsystem == 'Fedora') or
|
||||
($::os['family'] == 'RedHat' and Integer.new($::os['release']['major']) > 7) {
|
||||
$pyvers = '3'
|
||||
$_pyceph_package_name = 'python3-rbd'
|
||||
} else {
|
||||
$pyvers = ''
|
||||
$_pyceph_package_name = 'python-rbd'
|
||||
}
|
||||
$client_package_name = "python${pyvers}-glanceclient"
|
||||
|
||||
$cache_cleaner_command = 'glance-cache-cleaner'
|
||||
|
@ -26,7 +19,7 @@ class glance::params {
|
|||
if ($::operatingsystem != 'fedora' and versioncmp($::operatingsystemrelease, '7') < 0) {
|
||||
$pyceph_package_name = 'python-ceph'
|
||||
} else {
|
||||
$pyceph_package_name = $_pyceph_package_name
|
||||
$pyceph_package_name = "python${pyvers}-rbd"
|
||||
}
|
||||
}
|
||||
'Debian': {
|
||||
|
|
|
@ -82,13 +82,8 @@ describe 'glance::backend::rbd' do
|
|||
let(:platform_params) do
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
if facts[:os_package_type] == 'debian' then
|
||||
pyceph_pkg = 'python3-ceph'
|
||||
else
|
||||
pyceph_pkg = 'python-ceph'
|
||||
end
|
||||
{
|
||||
:pyceph_package_name => pyceph_pkg,
|
||||
:pyceph_package_name => 'python3-ceph',
|
||||
}
|
||||
when 'RedHat'
|
||||
{
|
||||
|
|
|
@ -23,11 +23,7 @@ describe 'glance::client' do
|
|||
let(:platform_params) do
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
if facts[:os_package_type] == 'debian'
|
||||
{ :client_package_name => 'python3-glanceclient' }
|
||||
else
|
||||
{ :client_package_name => 'python-glanceclient' }
|
||||
end
|
||||
{ :client_package_name => 'python3-glanceclient' }
|
||||
when 'RedHat'
|
||||
if facts[:operatingsystem] == 'Fedora'
|
||||
{ :client_package_name => 'python3-glanceclient' }
|
||||
|
|
Loading…
Reference in New Issue