oslo.config/doc/source
Dolph Mathews 18d1617caa Assume positional arguments are required
The 'positional' keyword specifically applies to oslo.config's argparse
support. Unlike oslo.config, argparse assumes that all positional
arguments are required by default, and you have to explicitly tell it
that a positional argument is optional if you'd like to opt into that
behavior.

This patch adopts that same behavior for oslo.config. When you define an
option to be non-positional (oslo.config's default, designed for config
files), then oslo.config makes that option optional:

However, when you define an option to be positional, oslo.config assumes
that the option is primarily going to be used on the CLI and thus sets
it as required, by default.

This change in behavior has the side effect of allowing argparse to
enforce required arguments on the CLI *while* parsing arguments, instead
of depending on oslo.config to detect the condition *after* argparse has
been allowed to parse "invalid" arguments. argparse correctly raises a
SystemExit in this case, and prints the actual command usage and a "hey,
you forgot this required argument", instead of allowing oslo.config to
dump a backtrace to the CLI with a context-less error message
("context-less" in that no useful CLI usage information is dumped along
with the crash to help you correct the condition).

Change-Id: Ifdc6918444fe72f7e1649483c237cce64b4c72d8
Partial-Bug: 1676989
2017-03-30 18:24:31 +00:00
..
cli Merge "Add special handling for keystone_authtoken group" 2019-07-01 17:04:13 +00:00
configuration Add a Quick Start tutorial 2019-05-03 16:11:49 -06:00
contributor rearrange docs based on new standard layout 2017-06-27 17:17:27 -04:00
reference Assume positional arguments are required 2017-03-30 18:24:31 +00:00
conf.py Bump the openstackdocstheme extension to 1.20 2019-08-01 09:46:12 +08:00
config-generator.conf Add sphinx extension to build sample config 2015-08-11 10:18:40 -04:00
index.rst Move user docs to top of index 2019-04-22 20:55:55 +00:00