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 1180282 - There is no way to view an activation key's content enablement in CLI
Summary: There is no way to view an activation key's content enablement in CLI
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: Nightly
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Christine Fouant
QA Contact: jcallaha
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks: sat61-release-notes
TreeView+ depends on / blocked
 
Reported: 2015-01-08 18:50 UTC by jcallaha
Modified: 2019-09-25 21:15 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 11:30:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 9876 0 None None None 2016-04-22 16:04:34 UTC

Description jcallaha 2015-01-08 18:50:30 UTC
Description of problem:
In CLI, a user is able to perform a content-override on a product, in an activation key. However, there is no way to view the enablement of a product in the CLI.


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

How reproducible:
Always

Steps to Reproduce:
1. Create an activation key, add subscription(s), add product(s)
2. run hammer activation-key product-content
3. view results

Actual results:
ID, NAME, TYPE, URL, GPG KEY, and LABEL are shown. However, the product's enablement is not.

Expected results:
The product's enablement is included in the output of the aforementioned command.

Comment 1 RHEL Program Management 2015-01-08 18:54:26 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 jcallaha 2015-03-11 13:19:15 UTC
Bumping priority to high as this feature is necessary for CLI users that want to use the already available content-override command.

Comment 4 Christine Fouant 2015-03-23 21:30:49 UTC
Created redmine issue http://projects.theforeman.org/issues/9876 from this bug

Comment 5 Bryan Kearney 2015-04-08 20:04:52 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/9876 has been closed
-------------
Christine Fouant
Applied in changeset commit:katello|83830f3cfd1068f1f263c794c407b3b752cfbe6b.

Comment 7 jcallaha 2015-05-06 14:11:43 UTC
Failed QA on Satellite-6.1.0-RHEL-7-20150429.2. The API provides the override value, but no override column was provided in activation-key product-content.


# hammer -d -v -u admin -p changeme  activation-key product-content --id="2" --organization-id="6"
[ INFO 2015-05-06 09:59:51 Init] Initialization of Hammer CLI (0.1.4.9) has started...
[DEBUG 2015-05-06 09:59:51 Init] Running at ruby 2.0.0-p598
[ INFO 2015-05-06 09:59:51 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded
[ INFO 2015-05-06 09:59:51 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2015-05-06 09:59:51 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_bootdisk.yml has been loaded
[ INFO 2015-05-06 09:59:51 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_discovery.yml has been loaded
[ INFO 2015-05-06 09:59:51 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_docker.yml has been loaded
[ INFO 2015-05-06 09:59:51 Init] Configuration from the file /etc/hammer/cli.modules.d/gutterball.yml has been loaded
[ INFO 2015-05-06 09:59:51 Init] Configuration from the file /etc/hammer/cli.modules.d/import.yml has been loaded
[ INFO 2015-05-06 09:59:51 Init] Configuration from the file /etc/hammer/cli.modules.d/katello.yml has been loaded
[DEBUG 2015-05-06 09:59:51 Connection] Registered: foreman
[DEBUG 2015-05-06 09:59:51 API] Global headers: {
        :content_type => "application/json",
              :accept => "application/json;version=2",
    "Accept-Language" => "en"
}
[ INFO 2015-05-06 09:59:51 Modules] Extension module hammer_cli_foreman (0.1.4.10) loaded
[ INFO 2015-05-06 09:59:51 Modules] Extension module hammer_cli_foreman_bootdisk (0.1.2.6) loaded
[ INFO 2015-05-06 09:59:51 Modules] Extension module hammer_cli_foreman_discovery (0.0.1.8) loaded
[ INFO 2015-05-06 09:59:51 HammerCLI::MainCommand] subcommand organization (HammerCLIForeman::Organization) was removed.
[ INFO 2015-05-06 09:59:51 HammerCLI::MainCommand] subcommand organization (HammerCLIKatello::Organization) was created.
[ INFO 2015-05-06 09:59:51 Modules] Extension module hammer_cli_import (0.10.6.5) loaded
[ INFO 2015-05-06 09:59:51 Modules] Extension module hammer_cli_katello (0.0.7.9) loaded
[DEBUG 2015-05-06 09:59:51 Init] Using locale 'en'
[DEBUG 2015-05-06 09:59:51 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/usr/share/gems/gems/hammer_cli-0.1.4.9/locale'
[DEBUG 2015-05-06 09:59:51 Init] 'mo' files for locale domain 'hammer-cli@system' loaded from '/usr/share/locale'
[DEBUG 2015-05-06 09:59:51 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/usr/share/gems/gems/hammer_cli_foreman-0.1.4.10/locale'
[DEBUG 2015-05-06 09:59:51 Init] 'mo' files for locale domain 'hammer-cli-foreman@system' loaded from '/usr/share/locale'
[DEBUG 2015-05-06 09:59:51 Init] 'mo' files for locale domain 'hammer_cli_foreman_docker' loaded from '/usr/share/gems/gems/hammer_cli_foreman_docker-0.0.3.2/locale'
[DEBUG 2015-05-06 09:59:51 Init] 'mo' files for locale domain 'hammer_cli_foreman_docker@system' loaded from '/usr/share/locale'
[DEBUG 2015-05-06 09:59:51 Init] 'mo' files for locale domain 'hammer-cli-katello' loaded from '/usr/share/gems/gems/hammer_cli_katello-0.0.7.9/locale'
[ INFO 2015-05-06 09:59:51 HammerCLI::MainCommand] Called with options: {"option_verbose"=>true, "option_debug"=>true, "option_username"=>"admin", "option_password"=>"***"}
[ INFO 2015-05-06 09:59:51 HammerCLIKatello::ActivationKeyCommand] Called with options: {}
[ INFO 2015-05-06 09:59:51 HammerCLIKatello::ActivationKeyCommand::ProductContentCommand] Called with options: {"option_organization_id"=>"6", "option_id"=>"2"}
[ INFO 2015-05-06 09:59:51 API] GET /katello/api/activation_keys/2/product_content
[DEBUG 2015-05-06 09:59:51 API] Params: {}
[DEBUG 2015-05-06 09:59:51 API] Headers: {
    :params => {}
}
[DEBUG 2015-05-06 10:00:06 API] Response: {
       "total" => 3,
    "subtotal" => 3,
        "page" => nil,
    "per_page" => nil,
      "search" => nil,
        "sort" => {
           "by" => nil,
        "order" => nil
    },
     "results" => [
        [0] {
            "override" => "0",
             "product" => {
                  "id" => 111,
                "name" => "Red Hat Enterprise Linux Server"
            },
             "content" => {
                   "id" => "2455",
                 "name" => "Red Hat Enterprise Linux 7 Server (Kickstart)",
                "label" => "rhel-7-server-kickstart"
            }
        },
        [1] {
            "override" => "default",
             "product" => {
                  "id" => 111,
                "name" => "Red Hat Enterprise Linux Server"
            },
             "content" => {
                   "id" => "2472",
                 "name" => "Red Hat Enterprise Linux 7 Server - RH Common (RPMs)",
                "label" => "rhel-7-server-rh-common-rpms"
            }
        },
        [2] {
            "override" => "default",
             "product" => {
                  "id" => 111,
                "name" => "Red Hat Enterprise Linux Server"
            },
             "content" => {
                   "id" => "2456",
                 "name" => "Red Hat Enterprise Linux 7 Server (RPMs)",
                "label" => "rhel-7-server-rpms"
            }
        }
    ]
}
[DEBUG 2015-05-06 10:00:06 API] Response headers: {
                   :date => "Wed, 06 May 2015 13:59:51 GMT",
                 :server => "Apache/2.4.6 (Red Hat Enterprise Linux)",
        :foreman_version => "1.7.2",
    :foreman_api_version => "2",
        :apipie_checksum => "85179ec311129f67b4c37efdfb780a69",
        :x_ua_compatible => "IE=Edge,chrome=1",
          :cache_control => "must-revalidate, private, max-age=0",
           :x_request_id => "af0b841347db612689f2f07cc9ddad1d",
              :x_runtime => "14.285500",
           :x_rack_cache => "miss",
           :x_powered_by => "Phusion Passenger 4.0.18",
             :set_cookie => [
        [0] "_session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTg4YWI2ODc0MDM3ODUwZmI5N2NlM2VmYWQ4NTFhNDY3BjsAVEkiC2xvY2FsZQY7AEYiB2Vu--abbbd4d4c448e73fdad72ccebfcf6d1488c504a1; path=/; HttpOnly"
    ],
                   :etag => "\"45bf2be8f5f02dffe2eb75e142d69b5c\"",
                 :status => "200 OK",
             :connection => "close",
      :transfer_encoding => "chunked",
           :content_type => "application/json; charset=utf-8"
}
-----|------------------------------------------------------|------|-----|---------|-----------------------------
ID   | NAME                                                 | TYPE | URL | GPG KEY | LABEL
-----|------------------------------------------------------|------|-----|---------|-----------------------------
2455 | Red Hat Enterprise Linux 7 Server (Kickstart)        |      |     |         | rhel-7-server-kickstart
2472 | Red Hat Enterprise Linux 7 Server - RH Common (RPMs) |      |     |         | rhel-7-server-rh-common-rpms
2456 | Red Hat Enterprise Linux 7 Server (RPMs)             |      |     |         | rhel-7-server-rpms
-----|------------------------------------------------------|------|-----|---------|-----------------------------

Comment 9 David O'Brien 2015-06-09 20:28:15 UTC
I did the rel note but wasn't supposed to put this on-qa.

Comment 10 jcallaha 2015-11-10 16:53:01 UTC
Verified in upstream.

[root@qe-blade-12 ~]# hammer -u admin -p changeme  activation-key product-content --id="1" --organization-id="1"
--------------|--------|------|-----|---------|------------------------------------|---------
ID            | NAME   | TYPE | URL | GPG KEY | LABEL                              | ENABLED?
--------------|--------|------|-----|---------|------------------------------------|---------
1447094401556 | yum    |      |     |         | Default_Organization_custom_yum    | 0       
1447094597924 | puppet |      |     |         | Default_Organization_custom_puppet | default 
--------------|--------|------|-----|---------|------------------------------------|---------


  RELEASE: Red Hat Enterprise Linux Server release 7.1 (Maipo)
  FOREMAN: 1.11.0-develop
     RUBY: ruby 2.0.0p598 (2014-11-13) [x86_64-linux]
   PUPPET: 3.8.4

Comment 13 Bruno Rocha 2016-04-19 13:55:32 UTC
Verified on downstream 6.2 SNAP 8.2

Enabled field is shown!

$ hammer -d -v -u admin -p changeme  activation-key product-content --id="1" --organization-id="1"
...
...
...
---|------|------|-----|---------|-------|---------
ID | NAME | TYPE | URL | GPG KEY | LABEL | ENABLED?
---|------|------|-----|---------|-------|---------

Comment 14 Bryan Kearney 2016-07-27 11:30:02 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/RHBA-2016:1501


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