Bug 1180282
| Summary: | There is no way to view an activation key's content enablement in CLI | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | jcallaha |
| Component: | Hammer | Assignee: | Christine Fouant <cfouant> |
| Status: | CLOSED ERRATA | QA Contact: | jcallaha |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | Nightly | CC: | bbuckingham, bkearney, rochacbruno, rplevka |
| Target Milestone: | Unspecified | Keywords: | ReleaseNotes, Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://projects.theforeman.org/issues/9876 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-07-27 11:30:02 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: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1190823 | ||
|
Description
jcallaha
2015-01-08 18:50:30 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. Bumping priority to high as this feature is necessary for CLI users that want to use the already available content-override command. Created redmine issue http://projects.theforeman.org/issues/9876 from this bug Moving to POST since upstream bug http://projects.theforeman.org/issues/9876 has been closed ------------- Christine Fouant Applied in changeset commit:katello|83830f3cfd1068f1f263c794c407b3b752cfbe6b. 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
-----|------------------------------------------------------|------|-----|---------|-----------------------------
I did the rel note but wasn't supposed to put this on-qa. 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
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? ---|------|------|-----|---------|-------|--------- 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 |