From fb05772b3f84e0afe62ca45e17516bb630e0fe7d Mon Sep 17 00:00:00 2001
From: Takashi Kajinami <kajinamit@oss.nttdata.com>
Date: Mon, 18 Mar 2024 16:09:13 +0900
Subject: [PATCH] Revert "Fix wrong wsgi script path"

This reverts commit 8588e30b3953f377ca5700fa8641824df7166f9c.

Reason for revert:
The wsgi script generated by setuptools was restored by [1].

[1] https://review.opendev.org/c/openstack/mistral/+/912085

Change-Id: Iaccdd9db4c9ae8a9ed59bbf782ddd8f39a90a1bc
---
 manifests/params.pp                      | 5 ++---
 spec/classes/mistral_wsgi_apache_spec.rb | 4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/manifests/params.pp b/manifests/params.pp
index 26b7be4..f65707a 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -4,7 +4,6 @@
 #
 class mistral::params {
   include openstacklib::defaults
-  $pyver3 = $::openstacklib::defaults::pyver3
 
   $client_package      = 'python3-mistralclient'
   $db_sync_command     = 'mistral-db-manage upgrade head'
@@ -24,7 +23,7 @@ class mistral::params {
       $event_engine_package_name  = 'openstack-mistral-event-engine'
       $event_engine_service_name  = 'openstack-mistral-event-engine'
       $mistral_wsgi_script_path   = '/var/www/cgi-bin/mistral'
-      $mistral_wsgi_script_source = "/usr/lib/python${pyver3}/site-packages/mistral/api/wsgi.py"
+      $mistral_wsgi_script_source = '/usr/bin/mistral-wsgi-api'
     }
     'Debian': {
       $common_package_name        = 'mistral-common'
@@ -37,7 +36,7 @@ class mistral::params {
       $event_engine_package_name  = 'mistral-event-engine'
       $event_engine_service_name  = 'mistral-event-engine'
       $mistral_wsgi_script_path   = '/usr/lib/cgi-bin/mistral'
-      $mistral_wsgi_script_source = "/usr/lib/python${pyver3}/dist-packages/mistral/api/wsgi.py"
+      $mistral_wsgi_script_source = '/usr/bin/mistral-wsgi-api'
     }
     default: {
       fail("Unsupported osfamily: ${facts['os']['family']}")
diff --git a/spec/classes/mistral_wsgi_apache_spec.rb b/spec/classes/mistral_wsgi_apache_spec.rb
index 5201012..5772172 100644
--- a/spec/classes/mistral_wsgi_apache_spec.rb
+++ b/spec/classes/mistral_wsgi_apache_spec.rb
@@ -158,12 +158,12 @@ describe 'mistral::wsgi::apache' do
         when 'Debian'
           {
             :wsgi_script_path   => '/usr/lib/cgi-bin/mistral',
-            :wsgi_script_source => '/usr/lib/python3/dist-packages/mistral/api/wsgi.py'
+            :wsgi_script_source => '/usr/bin/mistral-wsgi-api'
           }
         when 'RedHat'
           {
             :wsgi_script_path   => '/var/www/cgi-bin/mistral',
-            :wsgi_script_source => '/usr/lib/python3.9/site-packages/mistral/api/wsgi.py'
+            :wsgi_script_source => '/usr/bin/mistral-wsgi-api'
           }
 
         end