Completed
Pull Request — master (#2334)
by Edward
06:02
created

st2actions.resultstracker.ActionExecutionDispatcher   A

Complexity

Total Complexity 15

Size/Duplication

Total Lines 121
Duplicated Lines 0 %
Metric Value
wmc 15
dl 0
loc 121
rs 10
1
# Licensed to the StackStorm, Inc ('StackStorm') under one or more
2
# contributor license agreements.  See the NOTICE file distributed with
3
# this work for additional information regarding copyright ownership.
4
# The ASF licenses this file to You under the Apache License, Version 2.0
5
# (the "License"); you may not use this file except in compliance with
6
# the License.  You may obtain a copy of the License at
7
#
8
#     http://www.apache.org/licenses/LICENSE-2.0
9
#
10
# Unless required by applicable law or agreed to in writing, software
11
# distributed under the License is distributed on an "AS IS" BASIS,
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
# See the License for the specific language governing permissions and
14
# limitations under the License.
15
16
from oslo_config import cfg
17
18
from st2common import config as common_config
19
from st2common.constants.system import VERSION_STRING
20
common_config.register_opts()
21
22
CONF = cfg.CONF
23
24
25
def parse_args(args=None):
26
    CONF(args=args, version=VERSION_STRING)
27
28
29
def register_opts():
30
    _register_common_opts()
31
    _register_results_tracker_opts()
32
33
34
def get_logging_config_path():
35
    return cfg.CONF.resultstracker.logging
36
37
38
def _register_common_opts():
39
    common_config.register_opts()
40
41
42
def _register_results_tracker_opts():
43
    resultstracker_opts = [
44
        cfg.StrOpt('logging', default='conf/logging.resultstracker.conf',
45
                   help='Location of the logging configuration file.')
46
    ]
47
    CONF.register_opts(resultstracker_opts, group='resultstracker')
48
49
50
register_opts()
51