neutron/neutron/conf/service.py
Aradhana Singh 79fd5b4b17 Refactoring config options for service
Refactoring neutron configuration options for service to be in
neutron/conf. This would allow centralization of all configuration
options and provide an easy way to import.

Co-Authored-By: Dariusz Smigiel <smigiel.dariusz@gmail.com>

Partial-Bug: #1563069

Change-Id: Iff140c11765199536a8fd8066ad3063ed92355ae
2016-05-14 21:44:18 -05:00

47 lines
1.7 KiB
Python

# Copyright 2011 VMware, Inc
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from neutron._i18n import _
service_opts = [
cfg.IntOpt('periodic_interval',
default=40,
help=_('Seconds between running periodic tasks.')),
cfg.IntOpt('api_workers',
help=_('Number of separate API worker processes for service. '
'If not specified, the default is equal to the number '
'of CPUs available for best performance.')),
cfg.IntOpt('rpc_workers',
default=1,
help=_('Number of RPC worker processes for service.')),
cfg.IntOpt('rpc_state_report_workers',
default=1,
help=_('Number of RPC worker processes dedicated to state '
'reports queue.')),
cfg.IntOpt('periodic_fuzzy_delay',
default=5,
help=_('Range of seconds to randomly delay when starting the '
'periodic task scheduler to reduce stampeding. '
'(Disable by setting to 0)')),
]
def register_service_opts(opts, conf=cfg.CONF):
conf.register_opts(opts)