Prepare for transition to oslo-config-generator

Do formatting changes to make our current generator output match up more
with how it will be with oslo-config-generator. This will make it easier
to review what changes occur to the ironic.conf.sample file when moving
to the use of oslo-config-generator.

* Put spaces between variable and value. For example "foo = spam",
  instead of "foo=spam". If value is empty string, don't have trailing
  space after equal.

* When there are 'choices' change the wording to "Allowed values" from
  "Possible values".  Intentionally did not change any of the other
  messages with the wording 'Possible.*'

* When min_value and max_value are both present, no longer use
  'Possible values' anymore but output them separately instead.

* Change the value of OPT type to 'unknown value'.

* Change the output of deprecated_for_removal flag.

* Regenerate sample config.

Co-Authored-By: Lin Tan <lin.tan@intel.com>
Change-Id: I1bc8b00eb98055a6e0f06af287cfa10c02ee2094
This commit is contained in:
John L. Villalovos 2016-04-07 12:43:06 -07:00
parent 56380f0e12
commit 52fe4a9687
2 changed files with 435 additions and 424 deletions

View File

@ -7,7 +7,7 @@
# Authentication strategy used by ironic-api. "noauth" should
# not be used in a production environment because all
# authentication will be disabled. (string value)
# Possible values: noauth, keystone
# Allowed values: noauth, keystone
#auth_strategy = keystone
# Return server tracebacks in the API response for any error
@ -119,7 +119,8 @@
# Default interval (in seconds) for running driver periodic
# tasks. (integer value)
# This option is deprecated and planned for removal in a future release.
# This option is deprecated for removal.
# Its value may be silently ignored in the future.
#periodic_interval = 60
# Name of this node. This can be an opaque identifier. It is
@ -172,7 +173,8 @@
# If set to false, the logging level will be set to WARNING
# instead of the default INFO level. (boolean value)
# This option is deprecated and planned for removal in a future release.
# This option is deprecated for removal.
# Its value may be silently ignored in the future.
#verbose = true
# The name of a logging configuration file. This file is
@ -280,7 +282,7 @@
#rpc_zmq_bind_address = *
# MatchMaker driver. (string value)
# Possible values: redis, dummy
# Allowed values: redis, dummy
#rpc_zmq_matchmaker = redis
# Type of concurrency used. Either "native" or "eventlet"
@ -323,11 +325,13 @@
#use_pub_sub = true
# Minimal port number for random ports range. (port value)
# Possible values: 0-65535
# Minimum value: 0
# Maximum value: 65535
#rpc_zmq_min_port = 49152
# Maximal port number for random ports range. (integer value)
# Possible values: 1-65536
# Minimum value: 1
# Maximum value: 65536
#rpc_zmq_max_port = 65536
# Number of retries to find free port number before fail with
@ -469,7 +473,7 @@
#
# Protocol used for AMT endpoint (string value)
# Possible values: http, https
# Allowed values: http, https
#protocol = http
# Time interval (in seconds) for successive awake call to AMT
@ -505,7 +509,8 @@
#host_ip = 0.0.0.0
# The TCP port on which ironic-api listens. (port value)
# Possible values: 0-65535
# Minimum value: 0
# Maximum value: 65535
#port = 6385
# The maximum number of items returned in a single response
@ -1062,7 +1067,7 @@
# Type of endpoint to use for temporary URLs. If the Glance
# backend is Swift, use "swift"; if it is CEPH with RADOS
# gateway, use "radosgw". (string value)
# Possible values: swift, radosgw
# Allowed values: swift, radosgw
#temp_url_endpoint_type = swift
@ -1074,12 +1079,13 @@
#glance_host = $my_ip
# Default glance port. (port value)
# Possible values: 0-65535
# Minimum value: 0
# Maximum value: 65535
#glance_port = 9292
# Default protocol to use when connecting to glance. Set to
# https for SSL. (string value)
# Possible values: http, https
# Allowed values: http, https
#glance_protocol = http
# A list of the glance api servers available to ironic. Prefix
@ -1097,7 +1103,7 @@
# Authentication strategy to use when connecting to glance.
# (string value)
# Possible values: keystone, noauth
# Allowed values: keystone, noauth
#auth_strategy = keystone
# Optional path to a CA certificate bundle to be used to
@ -1135,7 +1141,8 @@
#client_timeout = 60
# Port to be used for iLO operations (port value)
# Possible values: 0-65535
# Minimum value: 0
# Maximum value: 65535
#client_port = 443
# The Swift iLO container to store data. (string value)
@ -1262,7 +1269,7 @@
#remote_image_server = <None>
# Share type of virtual media (string value)
# Possible values: CIFS, NFS
# Allowed values: CIFS, NFS
#remote_image_share_type = CIFS
# share name of remote_image_server (string value)
@ -1283,27 +1290,28 @@
#
# Port to be used for iRMC operations (port value)
# Possible values: 443, 80
# Allowed values: 443, 80
#port = 443
# Authentication method to be used for iRMC operations (string
# value)
# Possible values: basic, digest
# Allowed values: basic, digest
#auth_method = basic
# Timeout (in seconds) for iRMC operations (integer value)
#client_timeout = 60
# Sensor data retrieval method. (string value)
# Possible values: ipmitool, scci
# Allowed values: ipmitool, scci
#sensor_method = ipmitool
# SNMP protocol version (string value)
# Possible values: v1, v2c, v3
# Allowed values: v1, v2c, v3
#snmp_version = v2c
# SNMP port (port value)
# Possible values: 0-65535
# Minimum value: 0
# Maximum value: 65535
#snmp_port = 161
# SNMP community. Required for versions "v1" and "v2c" (string
@ -1414,7 +1422,7 @@
# token data is encrypted and authenticated in the cache. If
# the value is not one of these options or empty, auth_token
# will raise an exception on initialization. (string value)
# Possible values: None, MAC, ENCRYPT
# Allowed values: None, MAC, ENCRYPT
#memcache_security_strategy = None
# (Optional, mandatory if memcache_security_strategy is
@ -1482,12 +1490,12 @@
# (list value)
#hash_algorithms = md5
# Authentication type to load (type of value is unknown)
# Authentication type to load (unknown value)
# Deprecated group/name - [keystone_authtoken]/auth_plugin
#auth_type = <None>
# Config Section from which to load plugin specific options
# (type of value is unknown)
# (unknown value)
#auth_section = <None>
@ -1501,7 +1509,8 @@
#host = 127.0.0.1
# Use this port to connect to redis host. (port value)
# Possible values: 0-65535
# Minimum value: 0
# Maximum value: 65535
#port = 6379
# Password for Redis server (optional). (string value)
@ -1547,7 +1556,7 @@
# neutron. Running neutron in noauth mode (related to but not
# affected by this setting) is insecure and should only be
# used for testing. (string value)
# Possible values: keystone, noauth
# Allowed values: keystone, noauth
#auth_strategy = keystone
# UUID of the network to create Neutron ports on, when booting
@ -1761,7 +1770,7 @@
# one we are currently connected to becomes unavailable. Takes
# effect only if more than one RabbitMQ node is provided in
# config. (string value)
# Possible values: round-robin, shuffle
# Allowed values: round-robin, shuffle
#kombu_failover_strategy = round-robin
# The RabbitMQ broker address where a single node is used.
@ -1771,7 +1780,8 @@
# The RabbitMQ broker port where a single node is used. (port
# value)
# Possible values: 0-65535
# Minimum value: 0
# Maximum value: 65535
# Deprecated group/name - [DEFAULT]/rabbit_port
#rabbit_port = 5672
@ -2065,7 +2075,7 @@
# The IP version that will be used for PXE booting. Defaults
# to 4. EXPERIMENTAL (string value)
# Possible values: 4, 6
# Allowed values: 4, 6
#ip_version = 4
@ -2168,7 +2178,8 @@
# Port on which VirtualBox web service is listening. (port
# value)
# Possible values: 0-65535
# Minimum value: 0
# Maximum value: 65535
#port = 18083

View File

@ -52,7 +52,7 @@ MULTISTROPT = "MultiStrOpt"
PORTOPT = "PortOpt"
OPT_TYPES = {
OPT: 'type of value is unknown',
OPT: 'unknown value',
STROPT: 'string value',
BOOLOPT: 'boolean value',
INTOPT: 'integer value',
@ -291,20 +291,17 @@ def _print_opt(opt, group):
# NOTE(lintan): choices are mutually exclusive with 'min/max',
# see oslo.config for more details.
if min_value is not None and max_value is not None:
print('# Possible values: %(min_value)d-%(max_value)d' %
{'min_value': min_value, 'max_value': max_value})
elif min_value is not None:
if min_value is not None:
print('# Minimum value: %d' % min_value)
elif max_value is not None:
if max_value is not None:
print('# Maximum value: %d' % max_value)
elif choices is not None:
if choices is not None:
if choices == []:
print('# No possible values.')
else:
choices_text = ', '.join([_get_choice_text(choice)
for choice in choices])
print('# Possible values: %s' % choices_text)
print('# Allowed values: %s' % choices_text)
if opt.deprecated_opts:
for deprecated_opt in opt.deprecated_opts:
@ -316,8 +313,8 @@ def _print_opt(opt, group):
(deprecated_group,
deprecated_name))
if opt.deprecated_for_removal:
print('# This option is deprecated and planned for removal in a '
'future release.')
print('# This option is deprecated for removal.')
print('# Its value may be silently ignored in the future.')
try:
if opt_default is None:
print('#%s = <None>' % opt_name)
@ -334,8 +331,11 @@ def _print_type(opt_type, opt_name, opt_default):
print('#%s = %s' % (opt_name, opt_default))
elif opt_type == STROPT:
assert(isinstance(opt_default, six.string_types))
print('#%s=%s' % (opt_name, _sanitize_default(opt_name,
opt_default)))
value = _sanitize_default(opt_name, opt_default)
if value:
print('#%s = %s' % (opt_name, value))
else:
print('#%s =' % (opt_name))
elif opt_type == BOOLOPT:
assert(isinstance(opt_default, bool))
print('#%s = %s' % (opt_name, str(opt_default).lower()))