diff options
| author | Richard Theis <rtheis@us.ibm.com> | 2016-06-02 09:53:55 -0500 |
|---|---|---|
| committer | Richard Theis <rtheis@us.ibm.com> | 2016-06-02 10:07:34 -0500 |
| commit | 6f2c1734e3d66e261f231711455821321c1fc254 (patch) | |
| tree | 269f19082215e0ccb37c361427062c9d4e91b646 /doc/source | |
| parent | b349156059edb1c7ae8e4bdfbd5eb0826d7aa808 (diff) | |
| download | python-openstackclient-6f2c1734e3d66e261f231711455821321c1fc254.tar.gz | |
Fix --enable options on commands
The --enable option on commands is ignored when the arguments are parsed.
This is related to the --enable-beta-commands option. Renaming the option
to --os-beta-command fixes the problem.
There's no need to handle backwards compatibility for the option name
change because there hasn't been an OSC release yet with beta commands.
Change-Id: I0327ba8a2058858a83e9a42e231470ed733cc834
Closes-Bug: #1588384
Diffstat (limited to 'doc/source')
| -rw-r--r-- | doc/source/command-beta.rst | 12 | ||||
| -rw-r--r-- | doc/source/command-objects/network-segment.rst | 4 | ||||
| -rw-r--r-- | doc/source/man/openstack.rst | 6 |
3 files changed, 9 insertions, 13 deletions
diff --git a/doc/source/command-beta.rst b/doc/source/command-beta.rst index 53a44204..f0a4f851 100644 --- a/doc/source/command-beta.rst +++ b/doc/source/command-beta.rst @@ -33,7 +33,7 @@ example list List examples .. caution:: This is a beta command and subject to change. - Use global option ``--enable-beta-commands`` to + Use global option ``--os-beta-command`` to enable this command. .. program:: example list @@ -52,7 +52,7 @@ The command help must label the command as a beta. """Display example details (Caution: This is a beta command and subject to change. - Use global option --enable-beta-commands to enable + Use global option --os-beta-command to enable this command) """ @@ -60,13 +60,9 @@ Implementation -------------- The command must raise a ``CommandError`` exception if beta commands -are not enabled via ``--enable-beta-commands`` global option. +are not enabled via ``--os-beta-command`` global option. .. code-block:: python def take_action(self, parsed_args): - if not self.app.options.enable_beta_commands: - msg = _('Caution: This is a beta command and subject to ' - 'change. Use global option --enable-beta-commands ' - 'to enable this command.') - raise exceptions.CommandError(msg) + self.validate_os_beta_command_enabled() diff --git a/doc/source/command-objects/network-segment.rst b/doc/source/command-objects/network-segment.rst index 8e177d6a..56a11e1e 100644 --- a/doc/source/command-objects/network-segment.rst +++ b/doc/source/command-objects/network-segment.rst @@ -15,7 +15,7 @@ network segment list List network segments .. caution:: This is a beta command and subject to change. - Use global option ``--enable-beta-commands`` to + Use global option ``--os-beta-command`` to enable this command. .. program:: network segment list @@ -39,7 +39,7 @@ network segment show Display network segment details .. caution:: This is a beta command and subject to change. - Use global option ``--enable-beta-commands`` to + Use global option ``--os-beta-command`` to enable this command. .. program:: network segment show diff --git a/doc/source/man/openstack.rst b/doc/source/man/openstack.rst index e14f1f95..7af380a3 100644 --- a/doc/source/man/openstack.rst +++ b/doc/source/man/openstack.rst @@ -132,6 +132,9 @@ OPTIONS This key should be the value of one of the HMAC keys defined in the configuration files of OpenStack services to be traced. +:option:`--os-beta-command` + Enable beta commands which are subject to change + :option:`--log-file` <LOGFILE> Specify a file to log output. Disabled by default. @@ -144,9 +147,6 @@ OPTIONS :option:`--debug` Show tracebacks on errors and set verbosity to debug -:option:`--enable-beta-commands` - Enable beta commands which are subject to change - COMMANDS ======== |
