Bug 1131559

Summary: Hammer - remote install packages: unusable command which contains parameter with array
Product: Red Hat Satellite Reporter: Pavel Studeník <pstudeni>
Component: HammerAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: UnspecifiedCC: sthirugn
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-19 15:24:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pavel Studeník 2014-08-19 14:49:21 UTC
Description of problem:

I tried to used hammer for installation remote packages to system. I can't find way to create a list in bash for hammer.

>> hammer -u admin -p PASS content-host package install --content-host-id 7097a1fc-713f-429c-bf99-6914a79243e4 --packages [zsh]
Could not install packages:
  undefined method `each' for "[zsh]":String

>> hammer -u admin -p PASS content-host package install --content-host-id 7097a1fc-713f-429c-bf99-6914a79243e4 --packages zsh
Could not install packages:
  undefined method `each' for "zsh":String

>> hammer -u admin -p changeme content-host package install --content-host-id 7097a1fc-713f-429c-bf99-6914a79243e4 --packages 'zsh'
Could not install packages:
  undefined method `each' for "zsh":Strin

I found same problem with install/remove/upgrade.


Version-Release number of selected component (if applicable):
rubygem-hammer_cli-0.1.1-11.el6sat.noarch
rubygem-hammer_cli_foreman-0.1.1-15.el6sat.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3-3.el6sat.noarch
rubygem-hammer_cli_katello-0.0.4-12.el6sat.noarch


How reproducible:
always

Steps to Reproduce:
1. to register system
2. to get id of content-host
3. to use hammer for remote install package

Actual results:
fail

Expected results:
work correct

Comment 1 RHEL Program Management 2014-08-19 14:53:19 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 sthirugn@redhat.com 2014-08-19 15:15:27 UTC
Perhaps duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1131230 which I created yesterday?

Comment 4 Pavel Studeník 2014-08-19 15:24:36 UTC
Yes. I closed it.

*** This bug has been marked as a duplicate of bug 1131230 ***