Remove obsolete config option "use_mistral_rpc"
* "use_mistral_rpc" is not used anymore * Style changes Change-Id: I1f0f5a9306cd2ec7f5d4f2e0304cb4465a10afed
This commit is contained in:
parent
9d00052f61
commit
967a8c09e6
@ -78,9 +78,7 @@ def launch_executor(transport):
|
|||||||
|
|
||||||
endpoints = [rpc.ExecutorServer(executor_v2)]
|
endpoints = [rpc.ExecutorServer(executor_v2)]
|
||||||
|
|
||||||
get_rpc_server = get_rpc_server_function()
|
server = messaging.get_rpc_server(
|
||||||
|
|
||||||
server = get_rpc_server(
|
|
||||||
transport,
|
transport,
|
||||||
target,
|
target,
|
||||||
endpoints,
|
endpoints,
|
||||||
@ -121,9 +119,7 @@ def launch_engine(transport):
|
|||||||
# Setup expiration policy
|
# Setup expiration policy
|
||||||
expiration_policy.setup()
|
expiration_policy.setup()
|
||||||
|
|
||||||
get_rpc_server = get_rpc_server_function()
|
server = messaging.get_rpc_server(
|
||||||
|
|
||||||
server = get_rpc_server(
|
|
||||||
transport,
|
transport,
|
||||||
target,
|
target,
|
||||||
endpoints,
|
endpoints,
|
||||||
@ -149,13 +145,6 @@ class ThreadingWSGIServer(socketserver.ThreadingMixIn, WSGIServer):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def get_rpc_server_function():
|
|
||||||
if CONF.use_mistral_rpc:
|
|
||||||
return rpc.get_rpc_server
|
|
||||||
else:
|
|
||||||
return messaging.get_rpc_server
|
|
||||||
|
|
||||||
|
|
||||||
def launch_api(transport):
|
def launch_api(transport):
|
||||||
host = cfg.CONF.api.host
|
host = cfg.CONF.api.host
|
||||||
port = cfg.CONF.api.port
|
port = cfg.CONF.api.port
|
||||||
|
@ -38,23 +38,36 @@ launch_opt = cfg.ListOpt(
|
|||||||
api_opts = [
|
api_opts = [
|
||||||
cfg.StrOpt('host', default='0.0.0.0', help='Mistral API server host'),
|
cfg.StrOpt('host', default='0.0.0.0', help='Mistral API server host'),
|
||||||
cfg.PortOpt('port', default=8989, help='Mistral API server port'),
|
cfg.PortOpt('port', default=8989, help='Mistral API server port'),
|
||||||
cfg.BoolOpt('allow_action_execution_deletion', default=False,
|
cfg.BoolOpt(
|
||||||
|
'allow_action_execution_deletion',
|
||||||
|
default=False,
|
||||||
help='Enables the ability to delete action_execution which '
|
help='Enables the ability to delete action_execution which '
|
||||||
'has no relationship with workflows.'),
|
'has no relationship with workflows.'
|
||||||
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
pecan_opts = [
|
pecan_opts = [
|
||||||
cfg.StrOpt('root', default='mistral.api.controllers.root.RootController',
|
cfg.StrOpt(
|
||||||
help='Pecan root controller'),
|
'root',
|
||||||
cfg.ListOpt('modules', default=["mistral.api"],
|
default='mistral.api.controllers.root.RootController',
|
||||||
help='A list of modules where pecan will search for '
|
help='Pecan root controller'
|
||||||
'applications.'),
|
),
|
||||||
cfg.BoolOpt('debug', default=False,
|
cfg.ListOpt(
|
||||||
help='Enables the ability to display tracebacks in the '
|
'modules',
|
||||||
'browser and interactively debug during '
|
default=["mistral.api"],
|
||||||
'development.'),
|
help='A list of modules where pecan will search for applications.'
|
||||||
cfg.BoolOpt('auth_enable', default=True,
|
),
|
||||||
help='Enables user authentication in pecan.')
|
cfg.BoolOpt(
|
||||||
|
'debug',
|
||||||
|
default=False,
|
||||||
|
help='Enables the ability to display tracebacks in the browser and'
|
||||||
|
' interactively debug during development.'
|
||||||
|
),
|
||||||
|
cfg.BoolOpt(
|
||||||
|
'auth_enable',
|
||||||
|
default=True,
|
||||||
|
help='Enables user authentication in pecan.'
|
||||||
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
use_debugger = cfg.BoolOpt(
|
use_debugger = cfg.BoolOpt(
|
||||||
@ -67,53 +80,64 @@ use_debugger = cfg.BoolOpt(
|
|||||||
)
|
)
|
||||||
|
|
||||||
engine_opts = [
|
engine_opts = [
|
||||||
cfg.StrOpt('engine', default='default',
|
cfg.StrOpt('engine', default='default', help='Mistral engine plugin'),
|
||||||
help='Mistral engine plugin'),
|
cfg.StrOpt(
|
||||||
cfg.StrOpt('host', default='0.0.0.0',
|
'host',
|
||||||
|
default='0.0.0.0',
|
||||||
help='Name of the engine node. This can be an opaque '
|
help='Name of the engine node. This can be an opaque '
|
||||||
'identifier. It is not necessarily a hostname, '
|
'identifier. It is not necessarily a hostname, '
|
||||||
'FQDN, or IP address.'),
|
'FQDN, or IP address.'
|
||||||
cfg.StrOpt('topic', default='mistral_engine',
|
),
|
||||||
help='The message topic that the engine listens on.'),
|
cfg.StrOpt(
|
||||||
cfg.StrOpt('version', default='1.0',
|
'topic',
|
||||||
help='The version of the engine.'),
|
default='mistral_engine',
|
||||||
cfg.IntOpt('execution_field_size_limit_kb', default=1024,
|
help='The message topic that the engine listens on.'
|
||||||
|
),
|
||||||
|
cfg.StrOpt('version', default='1.0', help='The version of the engine.'),
|
||||||
|
cfg.IntOpt(
|
||||||
|
'execution_field_size_limit_kb',
|
||||||
|
default=1024,
|
||||||
help='The default maximum size in KB of large text fields '
|
help='The default maximum size in KB of large text fields '
|
||||||
'of runtime execution objects. Use -1 for no limit.'),
|
'of runtime execution objects. Use -1 for no limit.'
|
||||||
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
executor_opts = [
|
executor_opts = [
|
||||||
cfg.StrOpt('host', default='0.0.0.0',
|
cfg.StrOpt(
|
||||||
|
'host',
|
||||||
|
default='0.0.0.0',
|
||||||
help='Name of the executor node. This can be an opaque '
|
help='Name of the executor node. This can be an opaque '
|
||||||
'identifier. It is not necessarily a hostname, '
|
'identifier. It is not necessarily a hostname, '
|
||||||
'FQDN, or IP address.'),
|
'FQDN, or IP address.'
|
||||||
cfg.StrOpt('topic', default='mistral_executor',
|
),
|
||||||
help='The message topic that the executor listens on.'),
|
cfg.StrOpt(
|
||||||
cfg.StrOpt('version', default='1.0',
|
'topic',
|
||||||
help='The version of the executor.')
|
default='mistral_executor',
|
||||||
|
help='The message topic that the executor listens on.'
|
||||||
|
),
|
||||||
|
cfg.StrOpt(
|
||||||
|
'version',
|
||||||
|
default='1.0',
|
||||||
|
help='The version of the executor.'
|
||||||
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
rpc_option = cfg.BoolOpt(
|
|
||||||
'use_mistral_rpc',
|
|
||||||
default=False,
|
|
||||||
help='Specifies whether Mistral uses modified oslo.messaging (if True)'
|
|
||||||
' or original oslo.messaging. Modified oslo.messaging is done for'
|
|
||||||
' acknowledgement a message after processing.'
|
|
||||||
)
|
|
||||||
|
|
||||||
execution_expiration_policy_opts = [
|
execution_expiration_policy_opts = [
|
||||||
cfg.IntOpt('evaluation_interval',
|
cfg.IntOpt(
|
||||||
|
'evaluation_interval',
|
||||||
help='How often will the executions be evaluated '
|
help='How often will the executions be evaluated '
|
||||||
'(in minutes). For example for value 120 the interval '
|
'(in minutes). For example for value 120 the interval '
|
||||||
'will be 2 hours (every 2 hours).'),
|
'will be 2 hours (every 2 hours).'
|
||||||
|
),
|
||||||
cfg.IntOpt('older_than',
|
cfg.IntOpt(
|
||||||
|
'older_than',
|
||||||
help='Evaluate from which time remove executions in minutes. '
|
help='Evaluate from which time remove executions in minutes. '
|
||||||
'For example when older_than = 60, remove all executions '
|
'For example when older_than = 60, remove all executions '
|
||||||
'that finished a 60 minutes ago or more. '
|
'that finished a 60 minutes ago or more. '
|
||||||
'Minimum value is 1. '
|
'Minimum value is 1. '
|
||||||
'Note that only final state execution will remove '
|
'Note that only final state execution will remove '
|
||||||
'( SUCCESS / ERROR ).')
|
'( SUCCESS / ERROR ).'
|
||||||
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
wf_trace_log_name_opt = cfg.StrOpt(
|
wf_trace_log_name_opt = cfg.StrOpt(
|
||||||
@ -124,11 +148,15 @@ wf_trace_log_name_opt = cfg.StrOpt(
|
|||||||
)
|
)
|
||||||
|
|
||||||
coordination_opts = [
|
coordination_opts = [
|
||||||
cfg.StrOpt('backend_url',
|
cfg.StrOpt(
|
||||||
help='The backend URL to be used for coordination'),
|
'backend_url',
|
||||||
cfg.FloatOpt('heartbeat_interval',
|
help='The backend URL to be used for coordination'
|
||||||
|
),
|
||||||
|
cfg.FloatOpt(
|
||||||
|
'heartbeat_interval',
|
||||||
default=5.0,
|
default=5.0,
|
||||||
help='Number of seconds between heartbeats for coordination.')
|
help='Number of seconds between heartbeats for coordination.'
|
||||||
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
profiler_opts = profiler.list_opts()[0][1]
|
profiler_opts = profiler.list_opts()[0][1]
|
||||||
@ -140,6 +168,7 @@ profiler_opts.append(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
API_GROUP = 'api'
|
API_GROUP = 'api'
|
||||||
@ -157,10 +186,10 @@ CONF.register_opts(executor_opts, group=EXECUTOR_GROUP)
|
|||||||
CONF.register_opts(execution_expiration_policy_opts,
|
CONF.register_opts(execution_expiration_policy_opts,
|
||||||
group=EXECUTION_EXPIRATION_POLICY_GROUP)
|
group=EXECUTION_EXPIRATION_POLICY_GROUP)
|
||||||
CONF.register_opt(wf_trace_log_name_opt)
|
CONF.register_opt(wf_trace_log_name_opt)
|
||||||
CONF.register_opt(rpc_option)
|
|
||||||
CONF.register_opts(coordination_opts, group=COORDINATION_GROUP)
|
CONF.register_opts(coordination_opts, group=COORDINATION_GROUP)
|
||||||
CONF.register_opts(profiler_opts, group=PROFILER_GROUP)
|
CONF.register_opts(profiler_opts, group=PROFILER_GROUP)
|
||||||
|
|
||||||
|
|
||||||
CLI_OPTS = [
|
CLI_OPTS = [
|
||||||
use_debugger,
|
use_debugger,
|
||||||
launch_opt
|
launch_opt
|
||||||
@ -195,7 +224,6 @@ def list_opts():
|
|||||||
CLI_OPTS,
|
CLI_OPTS,
|
||||||
[
|
[
|
||||||
wf_trace_log_name_opt,
|
wf_trace_log_name_opt,
|
||||||
rpc_option
|
|
||||||
]
|
]
|
||||||
))
|
))
|
||||||
]
|
]
|
||||||
@ -203,7 +231,9 @@ def list_opts():
|
|||||||
|
|
||||||
def parse_args(args=None, usage=None, default_config_files=None):
|
def parse_args(args=None, usage=None, default_config_files=None):
|
||||||
log.set_defaults(default_log_levels=_DEFAULT_LOG_LEVELS)
|
log.set_defaults(default_log_levels=_DEFAULT_LOG_LEVELS)
|
||||||
|
|
||||||
log.register_options(CONF)
|
log.register_options(CONF)
|
||||||
|
|
||||||
CONF(
|
CONF(
|
||||||
args=args,
|
args=args,
|
||||||
project='mistral',
|
project='mistral',
|
||||||
@ -224,11 +254,16 @@ def set_cors_middleware_defaults():
|
|||||||
# TODO(krotscheck): Update with https://review.openstack.org/#/c/285368/
|
# TODO(krotscheck): Update with https://review.openstack.org/#/c/285368/
|
||||||
cfg.set_defaults(
|
cfg.set_defaults(
|
||||||
cors.CORS_OPTS,
|
cors.CORS_OPTS,
|
||||||
allow_headers=['X-Auth-Token', 'X-Identity-Status', 'X-Roles',
|
allow_headers=[
|
||||||
|
'X-Auth-Token', 'X-Identity-Status', 'X-Roles',
|
||||||
'X-Service-Catalog', 'X-User-Id', 'X-Tenant-Id',
|
'X-Service-Catalog', 'X-User-Id', 'X-Tenant-Id',
|
||||||
'X-Project-Id', 'X-User-Name', 'X-Project-Name'],
|
'X-Project-Id', 'X-User-Name', 'X-Project-Name'
|
||||||
allow_methods=['GET', 'PUT', 'POST', 'DELETE', 'PATCH'],
|
],
|
||||||
expose_headers=['X-Auth-Token', 'X-Subject-Token',
|
allow_methods=[
|
||||||
'X-Service-Token', 'X-Project-Id', 'X-User-Name',
|
'GET', 'PUT', 'POST', 'DELETE', 'PATCH'
|
||||||
'X-Project-Name']
|
],
|
||||||
|
expose_headers=[
|
||||||
|
'X-Auth-Token', 'X-Subject-Token', 'X-Service-Token',
|
||||||
|
'X-Project-Id', 'X-User-Name', 'X-Project-Name'
|
||||||
|
]
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user