Bug 868021 - Incorrect usage line in pulp-admin client for subsections
Incorrect usage line in pulp-admin client for subsections
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: user-experience (Show other bugs)
2.0.6
Unspecified Unspecified
unspecified Severity low
: ---
: Sprint 42
Assigned To: Jay Dobies
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-18 18:11 EDT by Sayli Karmarkar
Modified: 2015-03-22 21:11 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:58 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 Sayli Karmarkar 2012-10-18 18:11:15 EDT
Description of problem:

$ pulp-admin repo 
Usage: pulp-admin repo [SUB_SECTION, ..] COMMAND
Description: general repository commands

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


$ pulp-admin repo group
Usage: pulp-admin group [SUB_SECTION, ..] COMMAND
Description: repository group commands

Available Sections:
  members - manage members of repository groups
...

$ pulp-admin repo group members
Usage: pulp-admin members [SUB_SECTION, ..] COMMAND
Description: manage members of repository groups
...

Expected results:

$ pulp-admin repo group members
Usage: pulp-admin repo group members [SUB_SECTION, ..] COMMAND
Description: manage members of repository groups
...
Comment 1 Jay Dobies 2012-12-06 11:01:55 EST
This is actually a complicated problem to fix. Each section is responsible for printing its own usage description, but it's not aware of where it lies in the CLI hierarchy.

The simplest approach for now is to simply omit the section name entirely. It still conveys the idea of optional subsections and the command itself, so it's not totally horrible. I'll have to rethink this more at a pretty fundamental okaara level in the future.


-- Example: a section, notice the description is displayed after usage --

╭─[jdob]─[hinterlands]─[~/vault/code/okaara/test]─[master ✘]─●
╰─➤ pulp-admin rpm repo sync
Usage: pulp-admin [SUB_SECTION, ..] COMMAND
Description: run, schedule, or view the status of sync tasks

Available Sections:
  schedules - manage repository sync schedules

Available Commands:
  run    - triggers an immediate sync of a repository
  status - displays the status of a repository's sync tasks


-- Example: at the root, there is intentionally no description --

╭─[jdob]─[hinterlands]─[~/vault/code/okaara/test]─[master ✘]─●
╰─➤ pulp-admin
Usage: pulp-admin [SUB_SECTION, ..] COMMAND

Available Sections:
  event  - subscribe to event notifications
  orphan - find and remove orphaned content units
  puppet - manage Puppet-related content and features
  repo   - list repositories and manage repo groups
  rpm    - manage RPM-related content and features
  server - display info about the server
  tasks  - list and cancel server-side tasks

Available Commands:
  login  - login and download a session certificate
  logout - deletes the user's session certificate
Comment 2 Jay Dobies 2012-12-06 11:15:55 EST
Fixed in okaara 1.0.27
Comment 3 Jay Dobies 2012-12-07 09:06:18 EST
Fixed in the 0.12 beta.
Comment 4 Preethi Thomas 2012-12-10 21:42:06 EST
[root@preethi-el6-pulp ~]# rpm -q pulp-server
pulp-server-2.0.6-0.14.beta.noarch
[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 ~]# 
[root@preethi-el6-pulp ~]# 
[root@preethi-el6-pulp ~]#  pulp-admin repo group
Usage: pulp-admin [SUB_SECTION, ..] COMMAND
Description: repository group commands

Available Sections:
  members - manage members of repository groups

Available Commands:
  create - creates a new repository group
  delete - deletes a repository group
  list   - lists repository groups on the Pulp server
  search - searches for repository groups on the Pulp server
  update - updates the metadata about the group itself (not its members)
[root@preethi-el6-pulp ~]#  pulp-admin repo group members
Usage: pulp-admin [SUB_SECTION, ..] COMMAND
Description: manage members of repository groups

Available Commands:
  add    - adds repositories to an existing repository group
  list   - lists repositories in a repository group
  remove - removes repositories from a repository group
[root@preethi-el6-pulp ~]#
Comment 5 Preethi Thomas 2013-01-09 12:08:58 EST
Pulp v2.0 released

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