Bug 1143987 - [RFE] Hammer task missing info subcommand [NEEDINFO]
Summary: [RFE] Hammer task missing info subcommand
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Tasks Plugin
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: Released
Assignee: Ivan Necas
QA Contact: Nikhil Kathole
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks: 1122832
TreeView+ depends on / blocked
 
Reported: 2014-09-18 11:59 UTC by Peter Vreman
Modified: 2019-10-07 17:19 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 12:36:15 UTC
bkearney: needinfo? (bkearney)


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:1222 None None None 2019-05-14 12:36:34 UTC
Foreman Issue Tracker 9165 None None None 2016-04-22 15:56:18 UTC

Description Peter Vreman 2014-09-18 11:59:30 UTC
Description of problem:
The hammer task has only 1 action progress. This is inconsistent with the other commands that have list, info, update.
Especially the list is a missing feature, because you cannot retrieve a list of possible ID / names of the tasks that are running or were stopped.

See below the inconsistency of the subcommand compared to sync-plan:

# hammer task --help
[Foreman] username:
[Foreman] password for :
Usage:
    hammer task [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
    SUBCOMMAND                    subcommand
    [ARG] ...                     subcommand arguments

Subcommands:
    progress                      Show the progress of the task



# hammer sync-plan --help
[Foreman] username:
[Foreman] password for :
Usage:
    hammer sync-plan [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
    SUBCOMMAND                    subcommand
    [ARG] ...                     subcommand arguments

Subcommands:
    create                        Create a sync plan
    delete                        Destroy a sync plan
    info                          Show a sync plan
    list                          List sync plans
    update                        Update a sync plan




Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:
hammer task have also list, info subcommands to be consistent.
hammer task list to list tasks, optionally with a filter on running,stopped,paused and maybe time limited.


Additional info:

Comment 1 RHEL Product and Program Management 2014-09-18 12:03:27 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Bryan Kearney 2015-01-29 16:28:50 UTC
Created redmine issue http://projects.theforeman.org/issues/9165 from this bug

Comment 5 Bryan Kearney 2015-08-25 18:07:51 UTC
Upstream bug component is Tasks Plugin

Comment 6 Bryan Kearney 2016-07-08 20:28:23 UTC
Per 6.3 planning, moving out non acked bugs to the backlog

Comment 8 Adam Ruzicka 2016-10-05 13:05:44 UTC
# hammer task --help
Usage:
    hammer task [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    subcommand
 [ARG] ...                     subcommand arguments

Subcommands:
 list                          List tasks
 progress                      Show the progress of the task
 resume                        Resume all tasks paused in error state

Options:
 -h, --help                    print help


>> hammer task list to list tasks, optionally with a filter on  running,stopped,paused and maybe time limited.
# hammer task list --help
Usage:
    hammer task list [OPTIONS]

Options:
 --by BY                       Field to sort the results on
 --order ORDER                 Sort field and order, e.g. 'name DESC'
 --page PAGE                   Page number, starting at 1
 --per-page PER_PAGE           Number of results per page to return
 --search SEARCH               Search string
 -h, --help                    print help


hammer task got the list and resume subcommands, info subcommand is still missing

Comment 11 pm-sat@redhat.com 2018-06-06 08:07:24 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/9165 has been resolved.

Comment 14 Nikhil Kathole 2018-12-12 10:36:27 UTC
VERIFIED

Version tested:
Satellite 6.5 snap 7

# hammer task -h
Usage:
    hammer task [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    Subcommand
 [ARG] ...                     Subcommand arguments

Subcommands:
 info                          Show task details
 list                          List tasks
 progress                      Show the progress of the task
 resume                        Resume all tasks paused in error state

Options:
 -h, --help                    Print help

# hammer task info -h
Usage:
    hammer task info [OPTIONS]

Options:
 --id ID                           UUID of the task
 --location-id LOCATION_ID         Scope by locations
 --organization-id ORGANIZATION_ID Scope by organizations
 -h, --help                        Print help


# hammer task info --id 87b21448-78a2-4dd4-9deb-948941e0e557
ID:          87b21448-78a2-4dd4-9deb-948941e0e557
Action:      Enable repository {"text"=>"repository 'Red Hat Satellite Maintenance 6 for RHEL 7 Server RPMs x86_64'", "link"=>nil} product {"text"=>"product 'Red Hat Enterprise Linux Server'", "link"=>"/products/1/"} organization {"text"=>"organization 'Default Organization'", "link"=>"/organizations/1/edit"}
State:       stopped
Result:      success
Started at:  2018/12/07 17:09:03
Ended at:    2018/12/07 17:09:05
Owner:       admin
Task errors:

Comment 15 Bryan Kearney 2019-03-08 14:46:40 UTC
test1

Comment 17 errata-xmlrpc 2019-05-14 12:36:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:1222


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