Missing description of subcommad 'list-extensions' in cinder help information.

Bug #1674934 reported by zhangdaolong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cinderclient
Fix Released
Wishlist
zhangdaolong

Bug Description

Now the current cinderclient version default use v3 interface. And the do_list_extensions of V3 inherited V2.
The do_list_extensions of V2 does not have __doc__.For the cli-reference, there is a specific docs tool used
to auto-generate the cli-reference files.The docs tool find the function __doc__ that starts with 'do_',as The do_list_extensions's __doc__ is none,so the subcommand 'list-extensions' no desc.

python-cinderclient/cinderclient/shell.py
---------------------------------
def _find_actions(self, subparsers, actions_module, version,
                      do_help, input_args):
        for attr in (a for a in dir(actions_module) if a.startswith('do_')):
            # I prefer to be hyphen-separated instead of underscores.
            command = attr[3:].replace('_', '-')
            callback = getattr(actions_module, attr)
            desc = callback.__doc__ or ''
            .......

The OpenStack contributor guide has instructions. The guide has a chapter on how to use the docs
tools - https://docs.openstack.org/contributor-guide/doc-tools.html
Specifically, the chapter on the command line reference explains how the tool works - https://docs.openstack.org/contributor-guide/doc-tools/cli-reference.html

cinder help
--------------------------
........
    unmanage Stop managing a volume.
    upload-to-image Uploads volume to Image Service as an image.
    version-list List all API versions. (Supported by API versions 3.0
                        - 3.latest)
    bash-completion Prints arguments for bash_completion.
    help Shows help about this program or one of its
                        subcommands.
    list-extensions ---->No description information
........
-----------------------------
the subcommand 'list-extensions' does not have description,
as the cinder Command-Line Interface of files are automatically[1] generated
.Resulting in the same lack of information in the document

https://docs.openstack.org/cli-reference/cinder.html
-----------------------------
........

version-list
    List all API versions. (Supported by API versions 3.0 - 3.latest) [hint: use '--os-volume-api-version' flag to show help message for proper version]
bash-completion
    Prints arguments for bash_completion.
help
    Shows help about this program or one of its subcommands.

list-extensions ----->No description information
---------------------------
Generate Command-Line Interface Reference
[1]:https://docs.openstack.org/contributor-guide/doc-tools/cli-reference.html

Changed in python-cinderclient:
assignee: nobody → zhangdaolong (zhangdaolong)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-cinderclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/448546

Changed in python-cinderclient:
status: New → In Progress
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-cinderclient (master)

Reviewed: https://review.openstack.org/448546
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=b2f930348867e7689570c03ef7d6258a2836e56e
Submitter: Jenkins
Branch: master

commit b2f930348867e7689570c03ef7d6258a2836e56e
Author: zhangdaolong <email address hidden>
Date: Wed Mar 22 19:45:38 2017 +0800

    Add description for function do_list_extensions in cinderclient

    Now the current cinderclient version default use v3 interface.
    And the do_list_extensions of V3 inherited V2. The do_list_extensions
    of V2 does not have __doc__.For the cli-reference, there is a specific
    docs tool used to auto-generate the cli-reference files.The docs tool
    find the function __doc__ that starts with 'do_',as The
    do_list_extensions's __doc__ is none,so the subcommand 'list-extensions'
    no desc.

    python-cinderclient/cinderclient/shell.py
    ---------------------------------
    def _find_actions(self, subparsers, actions_module, version,
                          do_help, input_args):
            for attr in (a for a in dir(actions_module) if
    a.startswith('do_')):
                # I prefer to be hyphen-separated instead of underscores.
                command = attr[3:].replace('_', '-')
                callback = getattr(actions_module, attr)
                desc = callback.__doc__ or ''
                .......

    The OpenStack contributor guide has instructions. The guide has a
    chapter on how to use the duto-generate docs tools
    - https://docs.openstack.org/contributor-guide/doc-tools.html
    Specifically, the chapter on the command line reference explains
    how the tool works -
    https://docs.openstack.org/contributor-guide/doc-tools/cli-reference.html

    Change-Id: I5484d1e25b4ec11182b27c80fc43e816b1a12736
    Closes-Bug: #1674934

Changed in python-cinderclient:
status: In Progress → Fix Released
Eric Harney (eharney)
Changed in python-cinderclient:
importance: Undecided → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-cinderclient 3.0.0

This issue was fixed in the openstack/python-cinderclient 3.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.