Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle wsgi and add CA file option #330

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions coriolis/keystone.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
default=None,
help='Default auth URL to be used when not specified in the'
' migration\'s connection info.'),
cfg.StrOpt('cafile',
default=None,
help='The CA file used to validate openstack service'
' API endpoints.'),
cfg.IntOpt('identity_api_version',
min=2, max=3,
default=2,
Expand Down Expand Up @@ -127,6 +131,10 @@ def create_keystone_session(ctxt, connection_info={}):
"password": password,
}

cafile = CONF.keystone.cafile
if cafile and cafile != "":
verify = cafile

if not auth:
project_name = connection_info.get("project_name", ctxt.project_name)

Expand Down
10 changes: 10 additions & 0 deletions coriolis/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import argparse
import os
import platform
import sys

from oslo_concurrency import processutils
from oslo_config import cfg
Expand Down Expand Up @@ -100,6 +101,15 @@ def check_locks_dir_empty():
locks_dir)


def get_application():
worker_count, args = get_worker_count_from_args(sys.argv)
CONF(args[1:], project='coriolis', version="1.0.0")
utils.setup_logging()

loader = wsgi.Loader(CONF)
return loader.load_app("coriolis-api")


class WSGIService(service.ServiceBase):
def __init__(self, name, worker_count=None, init_rpc=True):
if init_rpc:
Expand Down
Loading