Project

General

Profile

Bug #22763

hammer content-view puppet-module add raises ArgumentError (wrong number of arguments (given 1, expected 0))

Added by roman plevka over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Hammer
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

# hammer -d content-view puppet-module add --organization-id 1 --content-view-id 1
[ INFO 2018-03-05T06:29:47 Init] Initialization of Hammer CLI (0.12.0) has started...
[DEBUG 2018-03-05T06:29:47 Init] Running at ruby 2.4.2-p198
[ INFO 2018-03-05T06:29:47 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded
[ INFO 2018-03-05T06:29:47 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2018-03-05T06:29:47 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_bootdisk.yml has been loaded
[ INFO 2018-03-05T06:29:47 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_discovery.yml has been loaded
[ INFO 2018-03-05T06:29:47 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_docker.yml has been loaded
[ INFO 2018-03-05T06:29:47 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_tasks.yml has been loaded
[ INFO 2018-03-05T06:29:47 Init] Configuration from the file /etc/hammer/cli.modules.d/katello.yml has been loaded
[ INFO 2018-03-05T06:29:47 Init] Configuration from the file /root/.hammer/defaults.yml has been loaded
[ INFO 2018-03-05T06:29:47 Init] Configuration from the file /root/.hammer/cli.modules.d/foreman.yml has been loaded
[DEBUG 2018-03-05T06:29:47 SSLoptions] SSL options: {
    :ssl_ca_file => "/etc/pki/katello/certs/katello-server-ca.crt",
     :verify_ssl => true
}
[DEBUG 2018-03-05T06:29:47 API] Global headers: {
        :content_type => "application/json",
              :accept => "application/json;version=2",
    "Accept-Language" => "en" 
}
[DEBUG 2018-03-05T06:29:47 API] Follow redirects: never
[DEBUG 2018-03-05T06:29:47 Connection] Registered: foreman
[ INFO 2018-03-05T06:29:47 Modules] Extension module hammer_cli_foreman (0.13.pre.develop) loaded.
[ INFO 2018-03-05T06:29:47 Modules] Extension module hammer_cli_foreman_bootdisk (0.1.3) loaded.
[ INFO 2018-03-05T06:29:47 Modules] Extension module hammer_cli_foreman_discovery (1.0.0) loaded.
[ INFO 2018-03-05T06:29:47 HammerCLI::MainCommand] subcommand organization (HammerCLIForeman::Organization) was removed.
[ INFO 2018-03-05T06:29:47 HammerCLI::MainCommand] subcommand organization (HammerCLIKatello::Organization) was created.
[ INFO 2018-03-05T06:29:48 Modules] Extension module hammer_cli_katello (0.11.0) loaded.
[DEBUG 2018-03-05T06:29:48 Init] Using locale 'en'
[DEBUG 2018-03-05T06:29:48 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.0/locale'
[DEBUG 2018-03-05T06:29:48 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.13.pre.develop/locale'
[DEBUG 2018-03-05T06:29:48 Init] 'mo' files for locale domain 'hammer_cli_foreman_docker' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman_docker-0.0.4/locale'
[DEBUG 2018-03-05T06:29:48 Init] 'mo' files for locale domain 'hammer-cli-katello' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.11.0/locale'
[ INFO 2018-03-05T06:29:48 HammerCLI::MainCommand] Called with options: {"option_debug"=>true}
[ INFO 2018-03-05T06:29:48 HammerCLIKatello::ContentView] Called with options: {}
[ INFO 2018-03-05T06:29:48 HammerCLIKatello::ContentViewPuppetModule] Called with options: {}
[DEBUG 2018-03-05T06:29:48 Exception] Using exception handler HammerCLIKatello::ExceptionHandler#handle_argument_error
[ERROR 2018-03-05T06:29:48 Exception] wrong number of arguments (given 1, expected 0)
Could not add the puppet module:
  wrong number of arguments (given 1, expected 0)
[ERROR 2018-03-05T06:29:48 Exception] 

ArgumentError (wrong number of arguments (given 1, expected 0)):
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.11.0/lib/hammer_cli_katello/content_view_puppet_module.rb:40:in `get_identifier'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.13.pre.develop/lib/hammer_cli_foreman/option_sources/self_param.rb:11:in `get_options'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.0/lib/hammer_cli/options/option_collector.rb:13:in `block in all_options_raw'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.0/lib/hammer_cli/options/option_collector.rb:12:in `each'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.0/lib/hammer_cli/options/option_collector.rb:12:in `inject'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.0/lib/hammer_cli/options/option_collector.rb:12:in `all_options_raw'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.0/lib/hammer_cli/options/option_collector.rb:18:in `all_options'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.0/lib/hammer_cli/options/option_collector.rb:22:in `options'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.0/lib/hammer_cli/abstract.rb:239:in `options'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.0/lib/hammer_cli/abstract.rb:42:in `parse'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:62:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.0/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.0/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.0/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.0/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.12.0/bin/hammer:142:in `<top (required)>'
    /usr/bin/hammer:22:in `load'
    /usr/bin/hammer:22:in `<main>'

there is no request made to the server, so this is something in the CLI module.
Also, when one uses --organization-id with --content-view (name) parameter, there is a GET request made and properly processed by satellite, before the command fails with the same error.


Related issues

Has duplicate Hammer CLI - Bug #22879: HammerCLIKatello::ContentViewPuppetModule::CreateCommand.get_identifier wrong numer of argumentsDuplicate2018-03-13

History

#1 Updated by John Mitsch over 3 years ago

Which version of katello was this using?

#2 Updated by roman plevka over 3 years ago

John Mitsch wrote:

Which version of katello was this using?

Sorry - it was a recent nightly version

#3 Updated by Ales Dujicek over 3 years ago

  • Has duplicate Bug #22879: HammerCLIKatello::ContentViewPuppetModule::CreateCommand.get_identifier wrong numer of arguments added

#4 Updated by Ales Dujicek over 3 years ago

  • Pull request https://github.com/Katello/hammer-cli-katello/pull/548 added

#5 Updated by Andrew Kofink over 3 years ago

  • Legacy Backlogs Release (now unused) set to 338

#6 Updated by Brad Buckingham about 3 years ago

  • Status changed from New to Closed

Moving to closed, since the associated PR has been merged.

Also available in: Atom PDF