Add doc params to run and register_cli_opts

The run and register_cli_opts methods were extracted to public
in I3d7e28d2432f5b04d4154793025786dc289b0cb2 but were not as
clearly documented as they should have been. This change improves
the situation by adding param descriptions.

Change-Id: I889bc08cda3b3850ccf7d9460851bae211272a4c
This commit is contained in:
Chris Dent 2019-02-13 10:11:43 +00:00
parent fd6bd23457
commit dbe50ea95c
1 changed files with 8 additions and 1 deletions

View File

@ -146,6 +146,9 @@ def register_cli_options(conf, upgrade_command):
Adds a subcommand to support 'upgrade check' on the command line.
:param conf: An oslo.confg ConfigOpts instance on which to register the
upgrade check arguments.
:param upgrade_command: The UpgradeCommands instance.
"""
def add_parsers(subparsers):
upgrade_action = subparsers.add_parser('upgrade')
@ -157,7 +160,11 @@ def register_cli_options(conf, upgrade_command):
def run(conf):
"""Run the requested command."""
"""Run the requested command.
:param conf: An oslo.confg ConfigOpts instance on which the upgrade
commands have been previously registered.
"""
try:
return conf.command.action_fn()
except Exception: