Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #10215 - host update resets some attributes #176

Merged
merged 1 commit into from
Apr 22, 2015

Conversation

mbacovsky
Copy link
Member

No description provided.

@domcleal
Copy link
Contributor

Tests well, and looks sane 👍

[root@foreman ~]# hammer host update --puppet-classes ntp --name $(hostname)                                                            
Host updated
[root@foreman ~]# hammer host puppet-classes --host $(hostname)
---|-----
ID | NAME
---|-----
2  | ntp 
---|-----
[root@foreman ~]# hammer host update --comment $RANDOM --name $(hostname)                                                               
Host updated
[root@foreman ~]# hammer host puppet-classes --host $(hostname)                                                                         
---|-----
ID | NAME
---|-----
2  | ntp 
---|-----
[root@foreman ~]# hammer host info --name $(hostname) | grep -i comment
Comment:            5410

Logs look good:

Started PUT "/api/hosts/1" for 127.0.0.1 at 2015-04-22 13:34:52 +0000
2015-04-22 13:34:52 [I] Processing by Api::V2::HostsController#update as JSON
2015-04-22 13:34:52 [I]   Parameters: {"host"=>{"name"=>"foreman.example.com", "comment"=>"5410", "compute_attributes"=>{"volumes_attributes"=>{}}, "host_parameters_attributes"=>{}, "interfaces_attributes"=>{}}, "apiv"=>"v2", "id"=>"1"}

Previous it was:

2015-04-22 13:33:19 [I]   Parameters: {"host"=>{"name"=>"foreman.example.com", "comment"=>"2589", "compute_attributes"=>{"volumes_attributes"=>{}}, "owner_id"=>nil, "puppet_proxy_id"=>nil, "puppet_ca_proxy_id"=>nil, "puppetclass_ids"=>nil, "host_parameters_attributes"=>{}, "interfaces_attributes"=>{}}, "apiv"=>"v2", "id"=>"1"}

@tstrachota
Copy link
Member

LGTM, @mbacovsky

@mbacovsky
Copy link
Member Author

Thanks for testing, @domcleal, @tstrachota!

mbacovsky added a commit that referenced this pull request Apr 22, 2015
Fixes #10215 - host update resets some attributes
@mbacovsky mbacovsky merged commit ad0190c into theforeman:master Apr 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants