Add choices field in config definition

When generating karbor.conf.sample with `oslo-config-generator`, this will
provide "Allowed values" information in configurations, so people needn't
check karbor code base to get the values.

Change-Id: I4f7483f0fd8580fcaa47376754727e574bf11152
This commit is contained in:
yushangbin 2017-07-17 16:45:34 +08:00
parent 8827a43762
commit e98efe778a
2 changed files with 2 additions and 0 deletions

View File

@ -40,6 +40,7 @@ time_trigger_opts = [
cfg.StrOpt('time_format',
default='calendar',
choices=['crontab', 'calendar'],
help='The type of time format which is used to compute time')
]

View File

@ -35,6 +35,7 @@ LOG = logging.getLogger(__name__)
trigger_manager_opts = [
cfg.StrOpt('executor',
default='green_thread',
choices=['thread_pool', 'green_thread'],
help='The name of executor which is used to run operations')
]