Bug 852853 - mistype cmd produces wrong help output
mistype cmd produces wrong help output
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: user-experience (Show other bugs)
2.0.6
Unspecified Unspecified
unspecified Severity unspecified
: ---
: Sprint 42
Assigned To: Jay Dobies
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-29 15:12 EDT by dgao
Modified: 2013-09-09 12:31 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-09 12:08:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description dgao 2012-08-29 15:12:46 EDT
Description of problem:

Help output should be based off the last mistyped input, thus outputting the subcmd help, not the main cmd.

  
Actual results:

[root@pulp-nightly ~]# pulp-admin repo unit
Usage: pulp-admin [SECTION, ..] COMMAND

Available Sections:
  consumer   - consumer lifecycle (list, update, etc.) commands
  permission - permission lifecycle (list, grant, revoke, etc.) commands
  repo       - repository lifecycle (create, delete, configure, etc.) commands
  role       - role lifecycle (list, create, update, etc.) commands
  server     - displays information about plugins and types installed on the server
  tasks      - list and cancel tasks running in the Pulp server
  user       - user lifecycle (list, create, update, etc.) commands

Available Commands:
  login  - login and download a session certificate
  logout - deletes the user's session certificate


Expected results:

[root@pulp-nightly ~]# pulp-admin repo 
Usage: pulp-admin repo [SUB_SECTION, ..] COMMAND
Description: repository lifecycle (create, delete, configure, etc.) commands

Available Sections:
  copy    - copy units between repositories
  group   - repository group commands
  publish - run, schedule, or view the status of publish tasks
  remove  - remove units from a repository
  sync    - run, schedule, or view the status of sync tasks
  tasks   - list and cancel tasks related to a specific repository
  units   - list/search for RPM-related content in a repository
  uploads - package and errata upload

Available Commands:
  create - creates a new repository that is configured to sync and publish RPM related content
  delete - deletes a repository
  list   - lists repositories on the server
  search - search items while optionally specifying sort, limit, skip, and requested fields
  update - updates an existing repository's configuration
Comment 1 Jay Dobies 2012-12-06 10:28:22 EST
The structure has changed since this bug was filed, but the example still works. Here's the results with the fix:

-- "repo unit" doesn't exist, so it falls back to repo (in the example above, it'd fall all the way back to root --

╭─[jdob]─[hinterlands]─[~]─[]─●
╰─➤ pulp-admin repo unit
Usage: pulp-admin repo [SUB_SECTION, ..] COMMAND
Description: list repositories and manage repo groups

Available Sections:
  group - repository group commands
  tasks - list and cancel tasks related to a specific repository

Available Commands:
  list - lists repositories on the Pulp server


-- For comparison, this is the repo command it fell back to, explicitly called --

╭─[jdob]─[hinterlands]─[~]─[]─●
╰─➤ pulp-admin repo
Usage: pulp-admin repo [SUB_SECTION, ..] COMMAND
Description: list repositories and manage repo groups

Available Sections:
  group - repository group commands
  tasks - list and cancel tasks related to a specific repository

Available Commands:
  list - lists repositories on the Pulp server
Comment 2 Jay Dobies 2012-12-06 11:15:46 EST
Fixed in okaara 1.0.27
Comment 3 Jay Dobies 2012-12-07 09:06:56 EST
Fixed in the 0.12 beta.
Comment 4 Preethi Thomas 2012-12-10 22:15:55 EST
[root@preethi-el6-pulp ~]# pulp-admin repo 
Usage: pulp-admin [SUB_SECTION, ..] COMMAND
Description: list repositories and manage repo groups

Available Sections:
  group - repository group commands
  tasks - list and cancel tasks related to a specific repository

Available Commands:
  list - lists repositories on the Pulp server
[root@preethi-el6-pulp ~]# 
[root@preethi-el6-pulp ~]# pulp-admin repo unit
Usage: pulp-admin [SUB_SECTION, ..] COMMAND
Description: list repositories and manage repo groups

Available Sections:
  group - repository group commands
  tasks - list and cancel tasks related to a specific repository

Available Commands:
  list - lists repositories on the Pulp server
[root@preethi-el6-pulp ~]#
Comment 5 Preethi Thomas 2013-01-09 12:08:40 EST
Pulp v2.0 released

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