Inherit pyvers from openstacklib::defaults
Change-Id: I483e300e898c37b2de7b48966a465dfa4570232d
This commit is contained in:
parent
67e1d43e0f
commit
4eadce4d0e
@ -3,14 +3,8 @@
|
||||
class watcher::params {
|
||||
include ::openstacklib::defaults
|
||||
|
||||
if ($::os_package_type == 'debian') or ($::os['name'] == 'Fedora') or
|
||||
($::os['family'] == 'RedHat' and Integer.new($::os['release']['major']) > 7) {
|
||||
$pyvers = '3'
|
||||
$pyver3 = '3.6'
|
||||
} else {
|
||||
$pyvers = ''
|
||||
$pyver3 = '2.7'
|
||||
}
|
||||
$pyvers = $::openstacklib::defaults::pyvers
|
||||
$pyver3 = $::openstacklib::defaults::pyver3
|
||||
|
||||
$client_package_name = "python${pyvers}-watcherclient"
|
||||
$group = 'watcher'
|
||||
@ -38,7 +32,7 @@ class watcher::params {
|
||||
if ($::os_package_type == 'debian') {
|
||||
$watcher_wsgi_script_source = '/usr/share/watcher-common/app.wsgi'
|
||||
} else {
|
||||
$watcher_wsgi_script_source = '/usr/lib/python2.7/dist-packages/watcher/api/app.wsgi'
|
||||
$watcher_wsgi_script_source = "/usr/lib/python${pyver3}/dist-packages/watcher/api/app.wsgi"
|
||||
}
|
||||
$watcher_wsgi_script_path = '/usr/lib/cgi-bin/watcher'
|
||||
}
|
||||
|
@ -27,11 +27,7 @@ describe 'watcher::client' do
|
||||
let(:platform_params) do
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
if facts[:os_package_type] == 'debian'
|
||||
{ :client_package_name => 'python3-watcherclient' }
|
||||
else
|
||||
{ :client_package_name => 'python-watcherclient' }
|
||||
end
|
||||
{ :client_package_name => 'python3-watcherclient' }
|
||||
when 'RedHat'
|
||||
{ :client_package_name => 'python-watcherclient' }
|
||||
end
|
||||
|
@ -92,7 +92,7 @@ describe 'watcher::wsgi::apache' do
|
||||
when 'Debian'
|
||||
{
|
||||
:wsgi_script_path => '/usr/lib/cgi-bin/watcher',
|
||||
:wsgi_script_source => '/usr/lib/python2.7/dist-packages/watcher/api/app.wsgi'
|
||||
:wsgi_script_source => '/usr/lib/python3/dist-packages/watcher/api/app.wsgi'
|
||||
}
|
||||
when 'RedHat'
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user