Project

General

Profile

Bug #17709

Cannot create a hostgroup with a content view

Added by Ondřej Pražák over 2 years ago. Updated 11 months ago.

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

Description

hammer -v hostgroup create --name 'my-hg' --content-view "RHEL 7 SOE" 

HammerCLIForeman::MissingSearchOptions (Missing options to search organization):
    /home/vagrant/projects/hammer-cli-foreman/lib/hammer_cli_foreman/id_resolver.rb:220:in `search_options'
    /home/vagrant/projects/hammer-cli-foreman/lib/hammer_cli_foreman/id_resolver.rb:180:in `resolved_call'
    /home/vagrant/projects/hammer-cli-foreman/lib/hammer_cli_foreman/id_resolver.rb:172:in `find_resource_raw'
    /home/vagrant/projects/hammer-cli-foreman/lib/hammer_cli_foreman/id_resolver.rb:166:in `find_resource'
    /home/vagrant/projects/hammer-cli-foreman/lib/hammer_cli_foreman/id_resolver.rb:143:in `get_id'
    /home/vagrant/projects/hammer-cli-foreman/lib/hammer_cli_foreman/id_resolver.rb:133:in `block (2 levels) in define_id_finders'
    /home/vagrant/projects/hammer-cli-katello/lib/hammer_cli_katello/search_options_creators.rb:34:in `create_content_views_search_options'
    /home/vagrant/projects/hammer-cli-foreman/lib/hammer_cli_foreman/id_resolver.rb:216:in `search_options'
    /home/vagrant/projects/hammer-cli-foreman/lib/hammer_cli_foreman/id_resolver.rb:180:in `resolved_call'
    /home/vagrant/projects/hammer-cli-foreman/lib/hammer_cli_foreman/id_resolver.rb:172:in `find_resource_raw'
    /home/vagrant/projects/hammer-cli-foreman/lib/hammer_cli_foreman/id_resolver.rb:166:in `find_resource'
    /home/vagrant/projects/hammer-cli-foreman/lib/hammer_cli_foreman/id_resolver.rb:143:in `get_id'
    /home/vagrant/projects/hammer-cli-foreman/lib/hammer_cli_foreman/id_resolver.rb:133:in `block (2 levels) in define_id_finders'
    /home/vagrant/projects/hammer-cli-katello/lib/hammer_cli_katello/content_view_name_resolvable.rb:14:in `all_options'
    /home/vagrant/.rvm/gems/ruby-2.2.4/gems/hammer_cli-0.8.0/lib/hammer_cli/abstract.rb:245:in `options'
    /home/vagrant/.rvm/gems/ruby-2.2.4/gems/hammer_cli-0.8.0/lib/hammer_cli/abstract.rb:32:in `parse'
    /home/vagrant/.rvm/gems/ruby-2.2.4/gems/clamp-1.1.1/lib/clamp/command.rb:62:in `run'
    /home/vagrant/.rvm/gems/ruby-2.2.4/gems/hammer_cli-0.8.0/lib/hammer_cli/abstract.rb:22:in `run'
    /home/vagrant/.rvm/gems/ruby-2.2.4/gems/clamp-1.1.1/lib/clamp/subcommand/execution.rb:11:in `execute'
    /home/vagrant/.rvm/gems/ruby-2.2.4/gems/clamp-1.1.1/lib/clamp/command.rb:63:in `run'
    /home/vagrant/.rvm/gems/ruby-2.2.4/gems/hammer_cli-0.8.0/lib/hammer_cli/abstract.rb:22:in `run'
    /home/vagrant/.rvm/gems/ruby-2.2.4/gems/clamp-1.1.1/lib/clamp/subcommand/execution.rb:11:in `execute'
    /home/vagrant/.rvm/gems/ruby-2.2.4/gems/clamp-1.1.1/lib/clamp/command.rb:63:in `run'
    /home/vagrant/.rvm/gems/ruby-2.2.4/gems/hammer_cli-0.8.0/lib/hammer_cli/abstract.rb:22:in `run'
    /home/vagrant/.rvm/gems/ruby-2.2.4/gems/clamp-1.1.1/lib/clamp/command.rb:132:in `run'
    /home/vagrant/.rvm/gems/ruby-2.2.4/gems/hammer_cli-0.8.0/bin/hammer:125:in `<top (required)>'
    /home/vagrant/.rvm/gems/ruby-2.2.4/bin/hammer:23:in `load'
    /home/vagrant/.rvm/gems/ruby-2.2.4/bin/hammer:23:in `<main>'
    /home/vagrant/.rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:15:in `eval'
    /home/vagrant/.rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:15:in `<main>'

Associated revisions

Revision 75844ddb (diff)
Added by Andrew Kofink over 2 years ago

Fixes #17709 - Provide err msg for cv name in hg (#471)

Provide proper error message to indicate required organization options
for content-view name in hostgroup create/update. These messages are
especially important for these commands because the organization options
are `--query-organization[-id|-label]` rather than just
`--organization[-id|-label]`.

History

#1 Updated by Dominic Cleal over 2 years ago

  • Project changed from Hammer CLI to Katello

#2 Updated by Justin Sherrill over 2 years ago

  • Category set to Hammer
  • Legacy Backlogs Release (now unused) set to 114
  • Difficulty set to easy

Missing --query-organization=name or --query-organization-id=ID

however the error message should be better.

#3 Updated by The Foreman Bot over 2 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Andrew Kofink
  • Legacy Backlogs Release (now unused) deleted (114)
  • Pull request https://github.com/Katello/hammer-cli-katello/pull/471 added

#4 Updated by Brad Buckingham over 2 years ago

  • Target version set to 151

#5 Updated by Anonymous over 2 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#6 Updated by Justin Sherrill over 2 years ago

  • Legacy Backlogs Release (now unused) set to 211

Also available in: Atom PDF