Merge "Debian is using Python 3"
This commit is contained in:
commit
82c31a1bb4
|
@ -3,7 +3,12 @@
|
||||||
class glance::params {
|
class glance::params {
|
||||||
include ::openstacklib::defaults
|
include ::openstacklib::defaults
|
||||||
|
|
||||||
$client_package_name = 'python-glanceclient'
|
if ($::os_package_type == 'debian') {
|
||||||
|
$pyvers = '3'
|
||||||
|
} else {
|
||||||
|
$pyvers = ''
|
||||||
|
}
|
||||||
|
$client_package_name = "python${pyvers}-glanceclient"
|
||||||
|
|
||||||
$cache_cleaner_command = 'glance-cache-cleaner'
|
$cache_cleaner_command = 'glance-cache-cleaner'
|
||||||
$cache_pruner_command = 'glance-cache-pruner'
|
$cache_pruner_command = 'glance-cache-pruner'
|
||||||
|
@ -26,7 +31,7 @@ class glance::params {
|
||||||
$registry_package_name = 'glance-registry'
|
$registry_package_name = 'glance-registry'
|
||||||
$api_service_name = 'glance-api'
|
$api_service_name = 'glance-api'
|
||||||
$registry_service_name = 'glance-registry'
|
$registry_service_name = 'glance-registry'
|
||||||
$pyceph_package_name = 'python-ceph'
|
$pyceph_package_name = "python${pyvers}-ceph"
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, \
|
fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, \
|
||||||
|
|
|
@ -5,7 +5,7 @@ describe 'glance::client' do
|
||||||
shared_examples 'glance client' do
|
shared_examples 'glance client' do
|
||||||
it { is_expected.to contain_class('glance::params') }
|
it { is_expected.to contain_class('glance::params') }
|
||||||
it { is_expected.to contain_package('python-glanceclient').with(
|
it { is_expected.to contain_package('python-glanceclient').with(
|
||||||
:name => 'python-glanceclient',
|
:name => platform_params[:client_package_name],
|
||||||
:ensure => 'present',
|
:ensure => 'present',
|
||||||
:tag => ['openstack', 'glance-support-package'],
|
:tag => ['openstack', 'glance-support-package'],
|
||||||
)
|
)
|
||||||
|
@ -20,6 +20,19 @@ describe 'glance::client' do
|
||||||
facts.merge!(OSDefaults.get_facts())
|
facts.merge!(OSDefaults.get_facts())
|
||||||
end
|
end
|
||||||
|
|
||||||
|
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
|
||||||
|
when 'RedHat'
|
||||||
|
{ :client_package_name => 'python-glanceclient' }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
it_configures 'glance client'
|
it_configures 'glance client'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue