Bug 852853 - mistype cmd produces wrong help output
Summary: mistype cmd produces wrong help output
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: 2.0.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 42
Assignee: Jay Dobies
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-29 19:12 UTC by dgao
Modified: 2013-09-09 16:31 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-09 17:08:40 UTC
Embargoed:


Attachments (Terms of Use)

Description dgao 2012-08-29 19:12:46 UTC
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 15:28:22 UTC
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 16:15:46 UTC
Fixed in okaara 1.0.27

Comment 3 Jay Dobies 2012-12-07 14:06:56 UTC
Fixed in the 0.12 beta.

Comment 4 Preethi Thomas 2012-12-11 03:15:55 UTC
[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 17:08:40 UTC
Pulp v2.0 released


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