config options: centralize section "service"
Move options from 'service' to 'conf/service.py'. Change-Id: I621481590d93b806ea17d498a562da87207001f3 Co-Authored-By: Stephen Finucane <stephen.finucane@intel.com> Implements: blueprint centralize-config-options-newton
This commit is contained in:
committed by
Daniel Berrange
parent
6ce0125834
commit
23dee1adc3
@@ -64,6 +64,7 @@ from nova.conf import remote_debug
|
||||
from nova.conf import scheduler
|
||||
# from nova.conf import security
|
||||
from nova.conf import serial_console
|
||||
from nova.conf import service
|
||||
# from nova.conf import spice
|
||||
# from nova.conf import ssl
|
||||
# from nova.conf import trusted_computing
|
||||
@@ -124,6 +125,7 @@ rdp.register_opts(CONF)
|
||||
scheduler.register_opts(CONF)
|
||||
# security.register_opts(CONF)
|
||||
serial_console.register_opts(CONF)
|
||||
service.register_opts(CONF)
|
||||
# spice.register_opts(CONF)
|
||||
# ssl.register_opts(CONF)
|
||||
# trusted_computing.register_opts(CONF)
|
||||
|
||||
103
nova/conf/service.py
Normal file
103
nova/conf/service.py
Normal file
@@ -0,0 +1,103 @@
|
||||
# Copyright 2015 OpenStack Foundation
|
||||
# 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
|
||||
|
||||
service_opts = [
|
||||
cfg.IntOpt('report_interval',
|
||||
default=10,
|
||||
help='Seconds between nodes reporting state to datastore'),
|
||||
cfg.BoolOpt('periodic_enable',
|
||||
default=True,
|
||||
help='Enable periodic tasks'),
|
||||
cfg.IntOpt('periodic_fuzzy_delay',
|
||||
default=60,
|
||||
help='Range of seconds to randomly delay when starting the'
|
||||
' periodic task scheduler to reduce stampeding.'
|
||||
' (Disable by setting to 0)'),
|
||||
cfg.ListOpt('enabled_apis',
|
||||
default=['osapi_compute', 'metadata'],
|
||||
help='A list of APIs to enable by default'),
|
||||
cfg.ListOpt('enabled_ssl_apis',
|
||||
default=[],
|
||||
help='A list of APIs with enabled SSL'),
|
||||
cfg.StrOpt('osapi_compute_listen',
|
||||
default="0.0.0.0",
|
||||
help='The IP address on which the OpenStack API will listen.'),
|
||||
cfg.IntOpt('osapi_compute_listen_port',
|
||||
default=8774,
|
||||
min=1,
|
||||
max=65535,
|
||||
help='The port on which the OpenStack API will listen.'),
|
||||
cfg.IntOpt('osapi_compute_workers',
|
||||
help='Number of workers for OpenStack API service. The default '
|
||||
'will be the number of CPUs available.'),
|
||||
cfg.StrOpt('metadata_manager',
|
||||
default='nova.api.manager.MetadataManager',
|
||||
help='DEPRECATED: OpenStack metadata service manager',
|
||||
deprecated_for_removal=True),
|
||||
cfg.StrOpt('metadata_listen',
|
||||
default="0.0.0.0",
|
||||
help='The IP address on which the metadata API will listen.'),
|
||||
cfg.IntOpt('metadata_listen_port',
|
||||
default=8775,
|
||||
min=1,
|
||||
max=65535,
|
||||
help='The port on which the metadata API will listen.'),
|
||||
cfg.IntOpt('metadata_workers',
|
||||
help='Number of workers for metadata service. The default will '
|
||||
'be the number of CPUs available.'),
|
||||
# NOTE(sdague): Ironic is still using this facility for their HA
|
||||
# manager. Ensure they are sorted before removing this.
|
||||
cfg.StrOpt('compute_manager',
|
||||
default='nova.compute.manager.ComputeManager',
|
||||
help='DEPRECATED: Full class name for the Manager for compute',
|
||||
deprecated_for_removal=True),
|
||||
cfg.StrOpt('console_manager',
|
||||
default='nova.console.manager.ConsoleProxyManager',
|
||||
help='DEPRECATED: Full class name for the Manager for '
|
||||
'console proxy',
|
||||
deprecated_for_removal=True),
|
||||
cfg.StrOpt('consoleauth_manager',
|
||||
default='nova.consoleauth.manager.ConsoleAuthManager',
|
||||
help='DEPRECATED: Manager for console auth',
|
||||
deprecated_for_removal=True),
|
||||
cfg.StrOpt('cert_manager',
|
||||
default='nova.cert.manager.CertManager',
|
||||
help='DEPRECATED: Full class name for the Manager for cert',
|
||||
deprecated_for_removal=True),
|
||||
# NOTE(sdague): the network_manager has a bunch of different in
|
||||
# tree classes that are still legit options. In Newton we should
|
||||
# turn this into a selector.
|
||||
cfg.StrOpt('network_manager',
|
||||
default='nova.network.manager.VlanManager',
|
||||
help='Full class name for the Manager for network'),
|
||||
cfg.StrOpt('scheduler_manager',
|
||||
default='nova.scheduler.manager.SchedulerManager',
|
||||
help='DEPRECATED: Full class name for the Manager for '
|
||||
'scheduler',
|
||||
deprecated_for_removal=True),
|
||||
cfg.IntOpt('service_down_time',
|
||||
default=60,
|
||||
help='Maximum time since last check-in for up service'),
|
||||
]
|
||||
|
||||
|
||||
def register_opts(conf):
|
||||
conf.register_opts(service_opts)
|
||||
|
||||
|
||||
def list_opts():
|
||||
return {'DEFAULT': service_opts}
|
||||
Reference in New Issue
Block a user