Bug 868021

Summary: Incorrect usage line in pulp-admin client for subsections
Product: [Retired] Pulp Reporter: Sayli Karmarkar <skarmark>
Component: user-experienceAssignee: Jay Dobies <jason.dobies>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: low Docs Contact:
Priority: unspecified    
Version: 2.0.6CC: cperry
Target Milestone: ---Keywords: Triaged
Target Release: Sprint 42   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-09 17:08:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sayli Karmarkar 2012-10-18 22:11:15 UTC
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 16:01:55 UTC
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 16:15:55 UTC
Fixed in okaara 1.0.27

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

Comment 4 Preethi Thomas 2012-12-11 02:42:06 UTC
[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 17:08:58 UTC
Pulp v2.0 released