Bug 523970 - DOCS: List of virsh commands is not sorted in alphabetical order
Summary: DOCS: List of virsh commands is not sorted in alphabetical order
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-17 12:54 UTC by Jan Stodola
Modified: 2015-03-16 14:31 UTC (History)
9 users (show)

Fixed In Version: libvirt-0.8.7
Clone Of:
Environment:
Last Closed: 2015-03-16 14:31:35 UTC
Embargoed:


Attachments (Terms of Use)
virsh -h (8.03 KB, text/plain)
2009-09-17 12:54 UTC, Jan Stodola
no flags Details

Description Jan Stodola 2009-09-17 12:54:33 UTC
Created attachment 361493 [details]
virsh -h

Description of problem:
List of commands in virsh help should be listed in alphabetical order - most of the commands are already listed in alphabetical order, but some of them are not (help, start, iface*, secret*, dump and so forth).

Version-Release number of selected component (if applicable):
libvirt-client-0.7.1-1.fc12.x86_64

How reproducible:
always

Steps to Reproduce:
1. run virsh -h
  
Actual results:
not all listed commands are sorted in alphabetical order
(for example command "dump" is between commands "schedinfo" and "shutdown"
)

Expected results:
all commands listed in alphabetical order

Comment 1 Mark McLoughlin 2009-09-17 13:21:35 UTC
Good point, they're almost alphabetical but not quite

Moving this one upstream

Might be a nice opportunity to cook up a simple patch :-)

Thanks for the report

Comment 2 Ján Tomko 2015-03-16 14:31:35 UTC
Fixed by:
commit 7829052757953023b0826e0293ffe18ed4ab89e9
Author:     Osier Yang <jyang>
AuthorDate: 2010-11-30 14:37:04 +0800
Commit:     Eric Blake <eblake>
CommitDate: 2010-11-30 13:35:32 -0700

    virsh: Categorize commands into groups for virsh help
    
    Change the virsh help out. The new output of "virsh help" and
    "virsh --help" will be like:
    
     Secret (help keyword 'secret'):
        secret-define                  define or modify a secret from an XML file
        secret-dumpxml                 secret attributes in XML
        secret-set-value               set a secret value
        secret-get-value               Output a secret value
        secret-undefine                undefine a secret
        secret-list                    list secrets
    
     Snapshot (help keyword 'snapshot'):
        snapshot-create                Create a snapshot
        snapshot-current               Get the current snapshot
        snapshot-delete                Delete a domain snapshot
        snapshot-dumpxml               Dump XML for a domain snapshot
        snapshot-list                  List snapshots for a domain
        snapshot-revert                Revert a domain to a snapshot
    
    Also support output help information of specified command group, e.g.
    
    % ./tools/virsh help "Network Filter"
     Network Filter (help keyword 'filter'):
        nwfilter-define                define or update a network filter from an XML file
        nwfilter-undefine              undefine a network filter
        nwfilter-dumpxml               network filter information in XML
        nwfilter-list                  list network filters
        nwfilter-edit                  edit XML configuration for a network filter
    
    Each group has a help keyword, e.g.
    
    % ./tools/virsh help filter
     Network Filter (help keyword 'filter'):
        nwfilter-define                define or update a network filter from an XML file
        nwfilter-undefine              undefine a network filter
        nwfilter-dumpxml               network filter information in XML
        nwfilter-list                  list network filters
        nwfilter-edit                  edit XML configuration for a network filter
    
    * tools/virsh.c:
      - introduce new struct "vshCmdGrp" and macros to define the groups.
      - split previous array "commands" into small arrays which are orgnized
        by group
      - changed some functions, e.g. "vshCmdDefSearch"
      - Added new functions, e.g. "vshCmdGrpSearch"
      - commands of each group are in "alphabetical order" now.
      - command groups are in "alphabetical order" now.
      - the commands are categorized with reference of
        http://wiki.libvirt.org/page/VirshHelpV2 (by Justin)
      - the modifications doesn't affect tests
    
    * TODO:
      - doc

git describe: v0.8.6-2-g7829052 contains: v0.8.7~198


Note You need to log in before you can comment on or make changes to this bug.