Project

General

Profile

Bug #6465

hammer activation-key update should not require an organization-id when have the --id option

Added by dustin tsang over 6 years ago. Updated about 2 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
Hammer
Target version:
Difficulty:
easy
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1114109
Description of problem:
When updating an activation key passing its ID, the organization option should not be required.

Version-Release number of selected component (if applicable):
  1. hammer --version
    hammer (0.1.1) * hammer_cli_foreman (0.1.1) * hammer_cli_katello (0.0.4)

How reproducible:
Aways

Steps to Reproduce:
1. Create an activation key using hammer
2. Try to update its name passing --id and --new-name options

Actual results:
The activation key is not updated and an exception is raised

Expected results:
The activation key should be updated.

Additional info:
  1. LANG=en_US hammer -v -u admin -p changeme --output csv activation-key create --name='ue99k5' --organization-id='169' --usage-limit='unlimited'
    Message,Id,Name
    Activation key created,35,ue99k5
  1. LANG=en_US hammer -v -u admin -p changeme activation-key info --id='35'
    Name: ue99k5
    ID: 35
    Description:
    Lifecycle Environment:
    Content View:
    Host Collections:
  1. LANG=en_US hammer -v -u admin -p changeme --output csv activation-key update --id='35' --new-name='glHZmTDUdzxiYFJ'
    [ERROR 2014-06-27 14:02:31 Exception] Error: Missing options to search organization
    Could not update the activation key:
    Error: Missing options to search organization
    [ERROR 2014-06-27 14:02:31 Exception]

HammerCLIForeman::MissingSeachOptions (Missing options to search organization):
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/id_resolver.rb:115:in `search_options'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/id_resolver.rb:88:in `find_resource'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/id_resolver.rb:82:in `get_id'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/id_resolver.rb:76:in `organization_id'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/commands.rb:133:in `send'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/commands.rb:133:in `get_resource_id'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/commands.rb:164:in `request_params'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/commands.rb:161:in `each'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/commands.rb:161:in `request_params'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/./apipie/command.rb:42:in `send_request'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/commands.rb:154:in `send_request'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/./apipie/command.rb:33:in `execute'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/bin/hammer:100
/usr/bin/hammer:19:in `load'
/usr/bin/hammer:19

History

#1 Updated by dustin tsang over 6 years ago

  • Target version set to 48
  • Difficulty set to easy

#2 Updated by Eric Helms about 6 years ago

  • Target version changed from 48 to 49

#3 Updated by Eric Helms about 6 years ago

  • Triaged changed from No to Yes

#4 Updated by The Foreman Bot about 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/hammer-cli-katello/pull/202 added

#5 Updated by dustin tsang about 6 years ago

  • Status changed from Ready For Testing to Rejected

#6 Updated by Eric Helms about 6 years ago

  • Legacy Backlogs Release (now unused) set to 13

#7 Updated by Eric Helms over 5 years ago

  • Legacy Backlogs Release (now unused) deleted (13)

#8 Updated by Eric Helms about 4 years ago

  • Legacy Backlogs Release (now unused) set to 166

Also available in: Atom PDF