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