Project

General

Profile

Actions

Bug #7473

closed

Using hostgroup puppet-classes generates "Missing options to search puppetclass" error

Added by Dominic Cleal over 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Foreman commands (obsolete)
Target version:
-
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1122167
Description of problem:

Using the 'hostgroup puppet-classes' command via the CLI generates an error:

  1. hammer -u zumx59 -p s9w3 hostgroup puppet-classes --hostgroup-id 1
    Error: Missing options to search puppetclass

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

  • apr-util-ldap-1.3.9-3.el6_0.1.x86_64
  • candlepin-0.9.19-1.el6_5.noarch
  • candlepin-scl-1-5.el6_4.noarch
  • candlepin-scl-quartz-2.1.5-5.el6_4.noarch
  • candlepin-scl-rhino-1.7R3-1.el6_4.noarch
  • candlepin-scl-runtime-1-5.el6_4.noarch
  • candlepin-selinux-0.9.19-1.el6_5.noarch
  • candlepin-tomcat6-0.9.19-1.el6_5.noarch
  • elasticsearch-0.90.10-4.el6sat.noarch
  • foreman-1.6.0.29-1.el6sat.noarch
  • foreman-compute-1.6.0.29-1.el6sat.noarch
  • foreman-gce-1.6.0.29-1.el6sat.noarch
  • foreman-libvirt-1.6.0.29-1.el6sat.noarch
  • foreman-ovirt-1.6.0.29-1.el6sat.noarch
  • foreman-postgresql-1.6.0.29-1.el6sat.noarch
  • foreman-proxy-1.6.0.21-1.el6sat.noarch
  • foreman-selinux-1.6.0-8.el6sat.noarch
  • foreman-vmware-1.6.0.29-1.el6sat.noarch
  • katello-1.5.0-27.el6sat.noarch
  • katello-ca-1.0-1.noarch
  • katello-certs-tools-1.5.6-1.el6sat.noarch
  • katello-installer-0.0.56-1.el6sat.noarch
  • openldap-2.4.23-32.el6_4.1.x86_64
  • pulp-katello-0.3-3.el6sat.noarch
  • pulp-nodes-common-2.4.0-0.23.beta.el6sat.noarch
  • pulp-nodes-parent-2.4.0-0.23.beta.el6sat.noarch
  • pulp-puppet-plugins-2.4.0-0.23.beta.el6sat.noarch
  • pulp-puppet-tools-2.4.0-0.23.beta.el6sat.noarch
  • pulp-rpm-plugins-2.4.0-0.23.beta.el6sat.noarch
  • pulp-selinux-2.4.0-0.23.beta.el6sat.noarch
  • pulp-server-2.4.0-0.23.beta.el6sat.noarch
  • python-ldap-2.3.10-1.el6.x86_64
  • ruby193-rubygem-net-ldap-0.3.1-3.el6sat.noarch
  • ruby193-rubygem-runcible-1.1.0-2.el6sat.noarch
  • rubygem-hammer_cli-0.1.1-10.el6sat.noarch
  • rubygem-hammer_cli_foreman-0.1.1-12.el6sat.noarch
  • rubygem-hammer_cli_foreman_tasks-0.0.3-3.el6sat.noarch
  • rubygem-hammer_cli_katello-0.0.4-8.el6sat.noarch

How reproducible:

Steps to Reproduce:
1. Use the CLI and run the hostgroup puppet-class command
2.
3.

Actual results:

An error is being raised

Expected results:

Additional info:

  1. hammer u zumx59 -p s9w3 hostgroup list
    --
    |--------------------------------------------------------------------|-------|------------------|-------------|-------|---------
    ID | NAME | LABEL | OPERATING SYSTEM | ENVIRONMENT | MODEL | ANCESTRY
    ---|--------------------------------------------------------------------|-------|------------------|-------------|-------|---------
    4 | baz | | | | |
    2 | ofoo | | | | |
    1 | 쥄㣆ꢕ䗀ᖑᆰ뒘礋捖䱣쒀䴮쏩騬橌矄ⱅರ㪷澘쨼 | | | | |
    3 | 쏩騬橌矄ⱅರ | | | | |
    ---|--------------------------------------------------------------------|-------|------------------|-------------|-------|---------
  1. hammer -u zumx59 -p s9w3 hostgroup puppet-classes -h
    Usage:
    hammer hostgroup puppet-classes [OPTIONS]

Options:
--environment ENVIRONMENT_NAME Environment name
--environment-id ENVIRONMENT_ID
--host HOST_NAME Host name
--host-id HOST_ID
--hostgroup HOSTGROUP_NAME Hostgroup name
--hostgroup-id HOSTGROUP_ID
--order ORDER Sort results
--page PAGE paginate results
--per-page PER_PAGE number of entries per request
--search SEARCH Filter results
-h, --help print help

  1. hammer -u zumx59 -p s9w3 -v -d hostgroup puppet-classes --hostgroup-id 1
    [ INFO 2014-07-22 13:07:32 Init] Initialization of Hammer CLI (0.1.1) has started...
    [DEBUG 2014-07-22 13:07:32 Init] Running at ruby 1.8.7-p352
    [ INFO 2014-07-22 13:07:32 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded
    [ INFO 2014-07-22 13:07:32 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
    [ INFO 2014-07-22 13:07:32 Init] Configuration from the file /etc/hammer/cli.modules.d/katello.yml has been loaded
    [DEBUG 2014-07-22 13:07:33 Connection] Registered: foreman
    [DEBUG 2014-07-22 13:07:33 API] Global headers: {
    "Accept-Language" => "en",
    :content_type => "application/json",
    :accept => "application/json;version=2"
    }
    [ INFO 2014-07-22 13:07:33 HammerCLI::MainCommand] subcommand organization (HammerCLIForeman::Organization) was removed.
    [ INFO 2014-07-22 13:07:33 HammerCLI::MainCommand] subcommand organization (HammerCLIKatello::Organization) was created.
    [ INFO 2014-07-22 13:07:34 Modules] Extension module hammer_cli_katello (0.0.4) loaded
    [ INFO 2014-07-22 13:07:34 Modules] Extension module hammer_cli_foreman (0.1.1) loaded
    [DEBUG 2014-07-22 13:07:34 Init] Using locale 'en'
    [DEBUG 2014-07-22 13:07:34 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-22 13:07:34 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-22 13:07:34 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-22 13:07:34 HammerCLI::MainCommand] Called with options: {"option_password"=>"***", "option_username"=>"zumx59", "option_debug"=>true, "option_verbose"=>true}
    [ INFO 2014-07-22 13:07:34 HammerCLIForeman::Hostgroup] Called with options: {}
    [ INFO 2014-07-22 13:07:34 HammerCLIForeman::Hostgroup::PuppetClassesCommand] Called with options: {"option_hostgroup_id"=>"1"}
    [ERROR 2014-07-22 13:07:34 Exception] Error: Missing options to search puppetclass
    Error: Missing options to search puppetclass
    [ERROR 2014-07-22 13:07:34 Exception]

HammerCLIForeman::MissingSeachOptions (Missing options to search puppetclass):
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/id_resolver.rb:152:in `search_options'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/id_resolver.rb:120:in `find_resource'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/id_resolver.rb:114:in `get_id'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/id_resolver.rb:108:in `puppetclass_id'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/commands.rb:143:in `send'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/commands.rb:143:in `get_resource_id'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/commands.rb:132:in `get_identifier'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/hostgroup.rb:103: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:164:in `send_request'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/commands.rb:198:in `send_request'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/hostgroup.rb:98:in `send_request'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/commands.rb:244:in `retrieve_and_print'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/commands.rb:231:in `browse_collection'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/commands.rb:216: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:102
/usr/bin/hammer:19:in `load'
/usr/bin/hammer:19

Actions #1

Updated by Dominic Cleal over 9 years ago

  • Subject changed from Using hostgroup puppet-classes generates error to Using hostgroup puppet-classes generates "Missing options to search puppetclass" error
  • Category set to Foreman commands (obsolete)
Actions #2

Updated by Ori Rabin about 9 years ago

  • Status changed from New to Assigned
  • Assignee set to Ori Rabin
Actions #3

Updated by The Foreman Bot about 9 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli-foreman/pull/169 added
  • Pull request deleted ()
Actions #4

Updated by Ori Rabin about 9 years ago

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

Also available in: Atom PDF