Add common.service config options to sample
openstack/common/config/generator.py looks for a variable that is a list of config options. The code in common.service was written with the list passed as an argument to cfg.CONF.register_opts(), instead of being assigned to a variable first, so the generator didn't detect it. In common.service, the list of config options is now assigned to a variable. The ironic.conf.sample file generated by tools/config/generate_sample.sh now includes the two config options: periodic_interval and host. Change-Id: I2f42e7f407ffc157d225652045c1bf53f65405b3 Closes-Bug: #1280064
This commit is contained in:
parent
106e6e157a
commit
89d835e1b3
|
@ -81,6 +81,20 @@
|
|||
#policy_default_rule=default
|
||||
|
||||
|
||||
#
|
||||
# Options defined in ironic.common.service
|
||||
#
|
||||
|
||||
# seconds between running periodic tasks (integer value)
|
||||
#periodic_interval=60
|
||||
|
||||
# Name of this node. This can be an opaque identifier. It is
|
||||
# not necessarily a hostname, FQDN, or IP address. However,
|
||||
# the node name must be valid within an AMQP key, and if using
|
||||
# ZeroMQ, a valid hostname, FQDN, or IP address (string value)
|
||||
#host=ironic
|
||||
|
||||
|
||||
#
|
||||
# Options defined in ironic.common.utils
|
||||
#
|
||||
|
|
|
@ -28,7 +28,7 @@ from ironic.openstack.common import rpc
|
|||
from ironic.openstack.common.rpc import service as rpc_service
|
||||
|
||||
|
||||
cfg.CONF.register_opts([
|
||||
service_opts = [
|
||||
cfg.IntOpt('periodic_interval',
|
||||
default=60,
|
||||
help='seconds between running periodic tasks'),
|
||||
|
@ -39,7 +39,9 @@ cfg.CONF.register_opts([
|
|||
'However, the node name must be valid within '
|
||||
'an AMQP key, and if using ZeroMQ, a valid '
|
||||
'hostname, FQDN, or IP address'),
|
||||
])
|
||||
]
|
||||
|
||||
cfg.CONF.register_opts(service_opts)
|
||||
|
||||
|
||||
class PeriodicService(rpc_service.Service, periodic_task.PeriodicTasks):
|
||||
|
|
Loading…
Reference in New Issue