Bug 1026803 - Hammer CLI - set_parameter command fails with undefined method `[]' for nil:NilClass"
Hammer CLI - set_parameter command fails with undefined method `[]' for nil:N...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Provisioning (Show other bugs)
6.0.2
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: --
Assigned To: Martin Bacovsky
Sachin Ghai
http://projects.theforeman.org/issues...
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-05 08:23 EST by Hayk Hovsepyan
Modified: 2016-04-22 12:35 EDT (History)
3 users (show)

See Also:
Fixed In Version: rubygem-hammer_cli_foreman-0.0.12-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-07-02 10:09:27 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 3583 None None None 2016-04-22 12:34 EDT

  None (edit)
Description Hayk Hovsepyan 2013-11-05 08:23:29 EST
Description of problem:
Here are some more "os" commands that fail to execute:

"hammer --output base os set_parameter --os-id "123" --name "testparam" --value "testvalue""  has output "Could not set operating system parameter:
  Error: undefined method `[]' for nil:NilClass"


"hammer --output base os list --search $search" does not return any result.

rubygem-foreman_api-0.1.8-2.el6sat.noarch
katello-foreman-all-1.4.6-55.el6sat.noarch
ruby193-rubygem-foreman_api-0.1.8-2.el6sat.noarch
dionysus.usersys.redhat.com-foreman-client-1.0-1.noarch
foreman-postgresql-1.3.0-25.el6sat.noarch
ruby193-rubygem-katello-foreman-engine-0.0.12-4.el6sat.noarch
foreman-proxy-1.3.0-3.el6sat.noarch
dionysus.usersys.redhat.com-foreman-proxy-1.0-1.noarch
rubygem-hammer_cli_foreman-0.0.9-2.el6sat.noarch
foreman-1.3.0-25.el6sat.noarch
ruby193-rubygem-foreman-katello-engine-0.0.17-7.el6sat.noarch
katello-configure-foreman-1.4.7-7.el6sat.noarch
Katello-Katello-Installation-HammerCLI-1.0-9.noarch
rubygem-hammer_cli-0.0.8-2.el6sat.noarch
Comment 1 RHEL Product and Program Management 2013-11-05 08:27:18 EST
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 Hayk Hovsepyan 2013-11-05 10:35:22 EST
"hammer os add_configtemplate/remove_configtemplate/add_architecture/remove_architecture" commands fail with error: "Error: resource or action not defined".
Comment 4 Dominic Cleal 2013-11-05 10:55:50 EST
(In reply to Hayk Hovsepyan from comment #3)
> "hammer os
> add_configtemplate/remove_configtemplate/add_architecture/
> remove_architecture" commands fail with error: "Error: resource or action
> not defined".

I think this is bug #1025544.

I can't replicate any issues with the list --search command (`hammer os list --search "name = Fedora"` works), so if you can elaborate on that and file it separate if necessary that'd be appreciated.
Comment 5 Hayk Hovsepyan 2013-11-06 05:11:36 EST
Os search works fine.
Comment 9 Sachin Ghai 2014-05-06 05:06:20 EDT
Verified with Satellite-6.0.3-RHEL-6-20140430.4

os set-parameter works
=======================
[root@qetello02 yum.repos.d]# hammer os create --name 'testos' --major '2'
Operating system created

[root@qetello02 yum.repos.d]# hammer os set-parameter --name 'testparam' --value 'works' --os-id 68
New operating system parameter created

[root@qetello02 yum.repos.d]# hammer os info --id 68
Id:                   68
Name:                 testos 2
Release name:         
Family:               
Installation media:   
Architectures:        
Partition tables:     
Config templates:     
Default OS templates: 
Parameters:           
 1) testparam => works


OS search works too:
===================

[root@qetello02 yum.repos.d]# hammer os list --search "name = testos"
---|-----------------------|--------------|-------
ID | NAME                  | RELEASE NAME | FAMILY
---|-----------------------|--------------|-------
68 | testos 2              |              |       
---|-----------------------|--------------|-------
[root@qetello02 yum.repos.d]#
Comment 10 Bryan Kearney 2014-07-02 10:09:25 EDT
This was delivered in 6.0.3, the Beta version of Satellite 6.0
Comment 11 Bryan Kearney 2014-07-02 10:09:27 EDT
This was delivered with 6.0.3, which is the Satellite 6 Beta.

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