Bug 1571800 - hammer content-view puppet-module add fails with wrong number of arguments (given 1, expected 0)
Summary: hammer content-view puppet-module add fails with wrong number of arguments (g...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: Nightly
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: 6.4.0
Assignee: Evgeni Golov
QA Contact: Lukas Pramuk
URL:
Whiteboard:
: 1573236 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-25 12:44 UTC by Lukas Pramuk
Modified: 2019-11-05 23:16 UTC (History)
4 users (show)

Fixed In Version: tfm-rubygem-hammer_cli_katello-0.13.0-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-16 19:28:31 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 22763 Normal Closed hammer content-view puppet-module add raises ArgumentError (wrong number of arguments (given 1, expected 0)) 2020-07-10 13:07:00 UTC
Foreman Issue Tracker 22879 Normal Duplicate HammerCLIKatello::ContentViewPuppetModule::CreateCommand.get_identifier wrong numer of arguments 2020-07-10 13:07:01 UTC

Description Lukas Pramuk 2018-04-25 12:44:33 UTC
Description of problem:
hammer content-view puppet-module add fails with wrong number of arguments (given 1, expected 0)

Version-Release number of selected component (if applicable):
6.4.0 pre
katello-3.7.0-2.nightly.el7sat.noarch
foreman-1.18.0.0.1-0.1.el7sat.noarch
tfm-rubygem-hammer_cli-0.12.0-1.el7sat                               
tfm-rubygem-hammer_cli_foreman-0.12.1-1.el7sat                       
tfm-rubygem-hammer_cli_katello-0.12.0-1.el7sat                       


How reproducible:
100%

Steps to Reproduce:
1. # hammer -v content-view puppet-module add --author="robottelo" --name="generic_1" --content-view-id="120"
...

[ERROR 2018-04-23T15:35:40 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-04-23T15:35:40 Exception] 

ArgumentError (wrong number of arguments (given 1, expected 0)):
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.12.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.12.1/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:23:in `load'
    /usr/bin/hammer:23:in `<main>'

Actual results:
Exception - wrong number of arguments (given 1, expected 0)

Expected results:
Successful puppet module addition

Comment 3 Brad Buckingham 2018-05-01 21:36:45 UTC
*** Bug 1573236 has been marked as a duplicate of this bug. ***

Comment 5 Christine Fouant 2018-05-09 14:16:35 UTC
Tested upstream, couldn't reproduce:

[vagrant@centos7-hammer-devel ~]$ hammer -v content-view puppet-module add --author "puppetlabs" --name "concat" --content-view-id 3
Puppet module added to content view

Comment 7 Lukas Pramuk 2018-05-10 13:47:24 UTC
@Sat6.4.0 Snap 2 - BUG present
tfm-rubygem-hammer_cli-0.12.0-1.el7sat.noarch
foreman-1.18.0.0.1-0.1.el7sat.noarch
katello-3.7.0-3.nightly.el7sat.noarch

# hammer content-view create --name "Puppet View" --organization-id 1 --product Internal

# hammer content-view puppet-module add --author lpramuk --name mc --content-view "Puppet View" --organization-id 1
Could not add the puppet module:
  wrong number of arguments (given 1, expected 0)


vs.


@Upstream - it works OK
tfm-rubygem-hammer_cli-0.13.pre.develop-1.201803232224gite493035.el7.noarch
foreman-1.18.0-0.develop.201805080055git36d17b1.el7.noarch
katello-3.7.0-3.nightly.el7.noarch

# hammer content-view puppet-module add --author lpramuk --name mc --content-view "Puppet View" --organization-id 1
Puppet module added to content view

Isn't the fix to bring hammer 0.13 downstream?

Comment 8 Lukas Pramuk 2018-05-10 14:01:50 UTC
Nope.

Comment 9 Evgeni Golov 2018-05-14 15:11:45 UTC
I still think it's a packaging issue, looking into it

Comment 10 Evgeni Golov 2018-05-14 15:39:42 UTC
it requires a change to hammer_cli_katello, which is not in a released version of that gem yet.

Comment 11 Evgeni Golov 2018-05-15 07:51:35 UTC
0.13.0 was released and built, moving to on_dev

Comment 12 Lukas Pramuk 2018-05-25 08:32:02 UTC
VERIFIED.

@satellite-6.4.0-7.beta.el7sat.noarch
foreman-1.18.0.0.7-1.el7sat.noarch
katello-3.7.0-3.nightly.el7sat.noarch

tfm-rubygem-hammer_cli-0.13.0-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman-0.13.0-1.el7sat.noarch
tfm-rubygem-hammer_cli_katello-0.13.1-1.el7sat.noarch


# hammer content-view create --name "Puppet View" --organization-id 1 --product Internal
Content view created

# hammer content-view puppet-module add --author lpramuk --name mc --content-view "Puppet View" --organization-id 1
Puppet module added to content view

Comment 13 Bryan Kearney 2018-10-16 19:28:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:2927


Note You need to log in before you can comment on or make changes to this bug.