Browse Source

Debian is using Python 3

ACK Debian's switch to Python 3

Change-Id: I2f88ba6a6ecd18f9d2719fff869045f4c5b9be69
changes/22/559422/4
Thomas Goirand 4 years ago
parent
commit
12ade99544
  1. 10
      manifests/params.pp
  2. 13
      spec/classes/aodh_client_spec.rb

10
manifests/params.pp

@ -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")

13
spec/classes/aodh_client_spec.rb

@ -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

Loading…
Cancel
Save