Merge "JSON ingester experimental feature flag"
This commit is contained in:
commit
099245d369
|
@ -17,6 +17,8 @@ from __future__ import print_function
|
|||
from __future__ import division
|
||||
from __future__ import absolute_import
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from congress.api import versions
|
||||
from congress.api import webservice
|
||||
|
||||
|
@ -152,11 +154,14 @@ class APIRouterV1(object):
|
|||
resource_mgr.register_handler(webhook_collection_handler)
|
||||
|
||||
# Setup /v1/data-sources/<ds_id>/tables/<table_name>/webhook
|
||||
json_ingester_webhook_path = \
|
||||
"%s/tables/(?P<table_name>[^/]+)/webhook" % ds_path
|
||||
json_ingester_webhook_collection_handler = \
|
||||
webservice.CollectionHandler(json_ingester_webhook_path, webhook)
|
||||
resource_mgr.register_handler(json_ingester_webhook_collection_handler)
|
||||
if cfg.CONF.json_ingester.json_ingester_experimental:
|
||||
json_ingester_webhook_path = \
|
||||
"%s/tables/(?P<table_name>[^/]+)/webhook" % ds_path
|
||||
json_ingester_webhook_collection_handler = \
|
||||
webservice.CollectionHandler(json_ingester_webhook_path,
|
||||
webhook)
|
||||
resource_mgr.register_handler(
|
||||
json_ingester_webhook_collection_handler)
|
||||
|
||||
# Setup /v1/system/datasource-drivers
|
||||
system = process_dict['api-system']
|
||||
|
|
|
@ -107,6 +107,9 @@ cfg.CONF.register_opts(dse_opts, group='dse')
|
|||
|
||||
# json ingester opts
|
||||
json_opts = [
|
||||
cfg.BoolOpt('json_ingester_experimental', default=False,
|
||||
help='Set the flag to True to enable the experimental JSON'
|
||||
'ingester feature.'),
|
||||
cfg.StrOpt('config_path', default='/etc/congress/json_ingesters',
|
||||
help=_('The directory for JSON ingester config files.')),
|
||||
cfg.StrOpt('postgres_host', default='localhost',
|
||||
|
|
|
@ -209,6 +209,7 @@ def create_datasources(bus):
|
|||
"be running.", ds.name, ds.driver)
|
||||
|
||||
# create json_ingester data sources
|
||||
create_json_ingester_datasources(bus)
|
||||
if cfg.CONF.json_ingester.json_ingester_experimental:
|
||||
create_json_ingester_datasources(bus)
|
||||
|
||||
return services
|
||||
|
|
Loading…
Reference in New Issue