Merge "Make it possible to use uwsgi easily"

This commit is contained in:
Zuul 2019-12-05 19:43:00 +00:00 committed by Gerrit Code Review
commit be831287ee
2 changed files with 10 additions and 0 deletions

View File

@ -10,6 +10,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import sys
from oslo_config import cfg
from oslo_log import log
@ -19,6 +20,7 @@ import pecan
from magnum.api import config as api_config
from magnum.api import middleware
from magnum.common import config as common_config
from magnum.common import service
import magnum.conf
CONF = magnum.conf.CONF
@ -65,3 +67,8 @@ def load_app():
def app_factory(global_config, **local_conf):
return setup_app()
def build_wsgi_app(argv=None):
service.prepare_service(sys.argv)
return load_app()

View File

@ -47,6 +47,9 @@ console_scripts =
magnum-driver-manage = magnum.cmd.driver_manage:main
magnum-status = magnum.cmd.status:main
wsgi_scripts =
magnum-api-wsgi = magnum.api.app:build_wsgi_app
oslo.config.opts =
magnum = magnum.opts:list_opts
magnum.conf = magnum.conf.opts:list_opts