Bug #6942
closedhammer do not show subscriptions I want to add to activation key
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1122924
Description of problem:
hammer do not show subscriptions I want to add to my activation key. Says "no Data" although I see these in webUI with "Default_Organization" selected.
Version-Release number of selected component (if applicable):
Satellite-6.0.4-RHEL-6-20140723.0
How reproducible:
Hammer do not show subscriptions I want to add to activation key
Steps to Reproduce:
1. I have satellite with 2 custom products created
2. I have created new activation key:
# hammer --username <user> --password <pass> \
activation-key create --content-view-id MyContentView \
--name MyActivationKey --organization "Default_Organization"
3. List all the subscriptions you can attach to the activation key
# hammer --username <user> --password <pass> \
subscription list --organization-id 1
Actual results:
No data.
When I add these product subscriptions via webUI (where I can see them: Content -> Activation Keys -> MyActivationKey -> Subscriptions -> Add) hammer then lists them:
- hammer --username <user> --password <pass> activation-key subscriptions --id 1
---------------------------------|-----
ID | NAME
---------------------------------|-----
8a90c1364765d6fc014767fa3df10012 | RHEL
8a90c1364765d6fc014767f98fe6000b | Sat6
---------------------------------|-----
Expected results:
Should list subscriptions for mine 2 products.
- hammer --debug --username <user> --password <pass> subscription list --organization-id 1
[ INFO 2014-07-24 07:45:19 Init] Initialization of Hammer CLI (0.1.1) has started...
[DEBUG 2014-07-24 07:45:19 Init] Running at ruby 1.8.7-p352
[ INFO 2014-07-24 07:45:19 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded
[ INFO 2014-07-24 07:45:19 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2014-07-24 07:45:19 Init] Configuration from the file /etc/hammer/cli.modules.d/katello.yml has been loaded
[DEBUG 2014-07-24 07:45:19 Connection] Registered: foreman
[DEBUG 2014-07-24 07:45:19 API] Global headers: {
"Accept-Language" => "en",
:content_type => "application/json",
:accept => "application/json;version=2"
}
[ INFO 2014-07-24 07:45:21 HammerCLI::MainCommand] subcommand organization (HammerCLIForeman::Organization) was removed.
[ INFO 2014-07-24 07:45:21 HammerCLI::MainCommand] subcommand organization (HammerCLIKatello::Organization) was created.
[ INFO 2014-07-24 07:45:22 Modules] Extension module hammer_cli_katello (0.0.4) loaded
[ INFO 2014-07-24 07:45:22 Modules] Extension module hammer_cli_foreman (0.1.1) loaded
[DEBUG 2014-07-24 07:45:22 Init] Using locale 'en'
[DEBUG 2014-07-24 07:45:22 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/locale'
[DEBUG 2014-07-24 07:45:22 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/locale'
[DEBUG 2014-07-24 07:45:22 Init] 'mo' files for locale domain 'hammer-cli-katello' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli_katello-0.0.4/locale'
[ INFO 2014-07-24 07:45:22 HammerCLI::MainCommand] Called with options: {"option_password"=>"***", "option_debug"=>true, "option_username"=>"admin"}
[ INFO 2014-07-24 07:45:22 HammerCLIKatello::SubscriptionCommand] Called with options: {}
[ INFO 2014-07-24 07:45:22 HammerCLIKatello::SubscriptionCommand::ListCommand] Called with options: {"option_organization_id"=>"1"}
[ INFO 2014-07-24 07:45:22 API] GET /katello/api/organizations/1/subscriptions
[DEBUG 2014-07-24 07:45:22 API] Params: {}
[DEBUG 2014-07-24 07:45:22 API] Headers: {
:params => {}
}
[DEBUG 2014-07-24 07:45:22 API] Response {
"total" => 0,
"page" => 1,
"per_page" => 20,
"sort" => {
"order" => nil,
"by" => nil
},
"search" => nil,
"results" => [],
"subtotal" => 0
}
No data.