Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1361473 - [RFE] - Display the errata or packages that would applicable/installable for a given host using Hammer CLI
Summary: [RFE] - Display the errata or packages that would applicable/installable for ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer - Content
Version: 6.2.0
Hardware: All
OS: All
high
medium
Target Milestone: Unspecified
Assignee: David Davis
QA Contact: Daniel Lobato Garcia
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-29 06:54 UTC by Nagoor Shaik
Modified: 2020-08-13 08:32 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 12:35:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 16533 0 Normal Closed As a CLI user, I should be able to see a list of packages available for update on a content host. 2020-05-14 10:40:49 UTC
Red Hat Knowledge Base (Solution) 2807001 0 None None None 2016-12-14 06:57:08 UTC
Red Hat Product Errata RHSA-2018:0336 0 normal SHIPPED_LIVE Important: Satellite 6.3 security, bug fix, and enhancement update 2018-02-21 22:43:42 UTC

Comment 1 Bryan Kearney 2016-09-13 14:18:05 UTC
Upstream bug component is Hammer - Content

Comment 2 David Davis 2016-09-16 16:34:38 UTC
We've added the ability to view packages that are applicable or upgradable for a host (much like you can do now with errata). To view the upgradable packages for host with id 1, you'd do:

   hammer package list --host-id 1 --packages-restrict-upgradable true

It's not 100% clear to me if this solves the RFE but feel free to respond/reopen.

Comment 3 Nagoor Shaik 2016-09-21 14:02:02 UTC
Hi David,

There is no sub-option such as --host-id in Satellite 6.2.2 

 # hammer package list --help
Usage:
    hammer package list [OPTIONS]

Options:
 --by BY                                             Field to sort the results on
 --content-view CONTENT_VIEW_NAME                    Content view name to search by
 --content-view-filter CONTENT_VIEW_FILTER_NAME      Name to search by
 --content-view-filter-id CONTENT_VIEW_FILTER_ID     filter identifier
 --content-view-id CONTENT_VIEW_ID                   content view numeric identifier
 --content-view-version CONTENT_VIEW_VERSION_VERSION Content view version number
 --content-view-version-id CONTENT_VIEW_VERSION_ID   Content view version identifier
 --environment ENVIRONMENT_NAME                      Name to search by
 --environment-id ENVIRONMENT_ID                      
 --full-results FULL_RESULTS                         Whether or not to show all results
                                                     One of true/false, yes/no, 1/0.
 --ids IDS                                           ids to filter content by
                                                     Comma separated list of values.
 --order ORDER                                       Sort field and order, eg. 'name DESC'
 --organization ORGANIZATION_NAME                    Organization name to search by
 --organization-id ORGANIZATION_ID                   organization ID
 --organization-label ORGANIZATION_LABEL             Organization label to search by
 --page PAGE                                         Page number, starting at 1
 --per-page PER_PAGE                                 Number of results per page to return
 --product PRODUCT_NAME                              Product name to search by
 --product-id PRODUCT_ID                             product numeric identifier
 --repository REPOSITORY_NAME                        Repository name to search by
 --repository-id REPOSITORY_ID                       repository ID
 --search SEARCH                                     Search string
 -h, --help                                          print help

 rpm -qa | grep hammer
tfm-rubygem-hammer_cli_foreman_tasks-0.0.10.3-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3.3-1.el7sat.noarch
tfm-rubygem-hammer_cli_csv-2.1.0-1.el7sat.noarch
tfm-rubygem-hammer_cli-0.5.1.11-4.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.6-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_remote_execution-0.0.5.3-1.el7sat.noarch
tfm-rubygem-hammer_cli_import-0.11.2-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman-0.5.1.9-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_discovery-0.0.2.3-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_admin-0.0.5-1.el7sat.noarch
tfm-rubygem-hammer_cli_katello-0.0.22.26-1.el7sat.noarch

Comment 4 Bryan Kearney 2016-09-22 18:18:22 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16533 has been resolved.

Comment 6 Daniel Lobato Garcia 2017-08-23 09:40:33 UTC
Verified.

Version Tested: Satellite-6.3 Snap 12

Running `hammer host info --id 1` returns now the applicable/upgradable packages in Content Information:

Content Information:
    Content View:
    Lifecycle Environment:
    Applicable Packages:
    Upgradable Packages:
    Applicable Errata:
        Enhancement:
        Bug Fix:
        Security:

Comment 9 errata-xmlrpc 2018-02-21 12:35:52 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-2018:0336


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