]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Add help option to Config Settings
authorDirk Mueller <dirk@dmllr.de>
Fri, 19 Jul 2013 21:04:14 +0000 (23:04 +0200)
committerClint Byrum <clint@fewbar.com>
Fri, 2 Aug 2013 04:49:09 +0000 (21:49 -0700)
This way it is possible to generate the config
files from the used config values automatically
(like done e.g. in other OpenStack modules)

Change-Id: I2683743330a8d3589637d967e16b5ba130bd45e1

etc/heat/heat.conf.sample
heat/api/aws/ec2token.py
heat/common/config.py
heat/common/policy.py
heat/common/wsgi.py

index f1fc6ff75ca51808300418680beb35cea8f5fe14..594a216c5912391a30d7923c7d45924bb6e9e13d 100644 (file)
 # Options defined in heat.common.policy
 #
 
-#  (string value)
+# Policy file to use (string value)
 #policy_file=policy.json
 
-#  (string value)
+# Default Rule of Policy File (string value)
 #policy_default_rule=default
 
 
 # Options defined in heat.common.wsgi
 #
 
-#  (string value)
+# Address to bind the server.  Useful when selecting a
+# particular network interface. (string value)
 #bind_host=0.0.0.0
 
-#  (integer value)
+# The port on which the server will listen. (integer value)
 #bind_port=<None>
 
-#  (integer value)
+# Number of backlog requests to configure the socket with
+# (integer value)
 #backlog=4096
 
-#  (string value)
+# Location of the SSL Certificate File to use for SSL mode
+# (string value)
 #cert_file=<None>
 
-#  (string value)
+# Location of the SSL Key File to use for enabling SSL mode
+# (string value)
 #key_file=<None>
 
-#  (integer value)
+# Number of workers for Heat service (integer value)
 #workers=0
 
 
 # Options defined in heat.common.config
 #
 
-#  (string value)
+# The flavor to use (string value)
 #flavor=<None>
 
 # The API paste config file to use (string value)
 # Options defined in heat.api.aws.ec2token
 #
 
-#  (string value)
+# Authentication Endpoint URI (string value)
 #auth_uri=<None>
 
-#  (string value)
+# Keystone EC2 Service Endpoint URI (string value)
 #keystone_ec2_uri=<None>
 
 
index c87af2905f1435ba8f20c3b55ae79e4ed7c1f0cb..996fb006f66e24790efb326f4500313a8b45c82f 100644 (file)
@@ -34,8 +34,12 @@ logger = logging.getLogger(__name__)
 
 
 opts = [
-    cfg.StrOpt('auth_uri', default=None),
-    cfg.StrOpt('keystone_ec2_uri', default=None)
+    cfg.StrOpt('auth_uri',
+               default=None,
+               help=_("Authentication Endpoint URI")),
+    cfg.StrOpt('keystone_ec2_uri',
+               default=None,
+               help=_("Keystone EC2 Service Endpoint URI"))
 ]
 cfg.CONF.register_opts(opts, group='ec2authtoken')
 
index 8113ec1289d616bbd77c39756b70eb57dbf402af..b17b704d4557d1cff6089657e9f61580ed41a26f 100644 (file)
@@ -33,9 +33,10 @@ DEFAULT_PORT = 8000
 
 paste_deploy_group = cfg.OptGroup('paste_deploy')
 paste_deploy_opts = [
-    cfg.StrOpt('flavor'),
+    cfg.StrOpt('flavor',
+               help=_("The flavor to use")),
     cfg.StrOpt('api_paste_config', default="api-paste.ini",
-               help="The API paste config file to use")]
+               help=_("The API paste config file to use"))]
 
 
 service_opts = [
index 59c81f27d100a3ec4bb76664b19213d4ab30826e..94833cd5dcb01173712b1c00044f76946a4dd7b9 100644 (file)
@@ -32,8 +32,12 @@ from heat.openstack.common.gettextutils import _
 logger = logging.getLogger(__name__)
 
 policy_opts = [
-    cfg.StrOpt('policy_file', default='policy.json'),
-    cfg.StrOpt('policy_default_rule', default='default'),
+    cfg.StrOpt('policy_file',
+               default='policy.json',
+               help=_("Policy file to use")),
+    cfg.StrOpt('policy_default_rule',
+               default='default',
+               help=_("Default Rule of Policy File"))
 ]
 
 CONF = cfg.CONF
index f108fe68e5b8db6b7e4fa67bf292ecf8975c0cb8..26d20685a3d18920a7ef10d8fd712d98bbb08dd2 100644 (file)
@@ -54,21 +54,31 @@ URL_LENGTH_LIMIT = 50000
 eventlet.wsgi.MAX_REQUEST_LINE = URL_LENGTH_LIMIT
 
 bind_opts = [
-    cfg.StrOpt('bind_host', default='0.0.0.0'),
-    cfg.IntOpt('bind_port'),
+    cfg.StrOpt('bind_host', default='0.0.0.0',
+               help=_('Address to bind the server.  Useful when '
+                      'selecting a particular network interface.')),
+    cfg.IntOpt('bind_port',
+               help=_('The port on which the server will listen.'))
 ]
 
 cfg.CONF.register_opts(bind_opts)
 
 socket_opts = [
-    cfg.IntOpt('backlog', default=4096),
-    cfg.StrOpt('cert_file'),
-    cfg.StrOpt('key_file'),
+    cfg.IntOpt('backlog', default=4096,
+               help=_("Number of backlog requests "
+                      "to configure the socket with")),
+    cfg.StrOpt('cert_file', default=None,
+               help=_("Location of the SSL Certificate File "
+                      "to use for SSL mode")),
+    cfg.StrOpt('key_file', default=None,
+               help=_("Location of the SSL Key File to use "
+                      "for enabling SSL mode")),
 ]
 
 cfg.CONF.register_opts(socket_opts)
 
-workers_opts = cfg.IntOpt('workers', default=0)
+workers_opts = cfg.IntOpt('workers', default=0,
+                          help=_("Number of workers for Heat service"))
 
 cfg.CONF.register_opt(workers_opts)