Debian is using Python 3

ACK Debian's switch to Python 3

Change-Id: I2f88ba6a6ecd18f9d2719fff869045f4c5b9be69
This commit is contained in:
Thomas Goirand 2018-04-06 23:07:58 +02:00
parent 7023c98764
commit 12ade99544
2 changed files with 21 additions and 2 deletions

View File

@ -3,7 +3,13 @@
class aodh::params {
include ::openstacklib::defaults
$client_package_name = 'python-aodhclient'
if ($::os_package_type == 'debian') {
$pyvers = '3'
} else {
$pyvers = ''
}
$client_package_name = "python${pyvers}-aodhclient"
$group = 'aodh'
case $::osfamily {
@ -45,7 +51,7 @@ class aodh::params {
$listener_service_name = 'aodh-listener'
$aodh_wsgi_script_path = '/usr/lib/cgi-bin/aodh'
$aodh_wsgi_script_source = '/usr/share/aodh/app.wsgi'
$redis_package_name = 'python-redis'
$redis_package_name = "python${pyvers}-redis"
}
default: {
fail("Unsupported osfamily: ${::osfamily} operatingsystem")

View File

@ -24,6 +24,19 @@ describe 'aodh::client' do
facts.merge!(OSDefaults.get_facts())
end
let(:platform_params) do
case facts[:osfamily]
when 'Debian'
if facts[:os_package_type] == 'debian'
{ :client_package_name => 'python3-aodhclient' }
else
{ :client_package_name => 'python-aodhclient' }
end
when 'RedHat'
{ :client_package_name => 'python-aodhclient' }
end
end
it_configures 'aodh client'
end
end