Bug #867
closed
updating a host to belong to a null hostgroup doesn't work
Added by Corey Osman over 13 years ago.
Updated over 13 years ago.
Description
when I call http://foreman/hosts/update_multiple_hostgroup with some json code where the hostgroup_id is set to "". The api call completes but it doesn't seem to update the host.
If I were to update the host through http://foreman/hosts/FQDN and pass in hostgroup_id="" the command would complete successfully and set the hostgroup to "blank" hostgroup. I also don't see a method to select a "blank" hostgroup when using the webui multiedit function either. I'll need this feature in order to unset a host from a hostgroup from my mobile app
- Project changed from Smart Proxy to Foreman
- Target version set to 0.3
- Category set to Web Interface
- Status changed from New to Ready For Testing
- Assignee set to Paul Kelly
A hostgroup id of "clear", rather than the numeric value of a hostgroup_id, is now interpreted as a request to replace the current hostgroup_id for all multiple hosts with a nil.
I have not explicitly tested the API with a json call as I am not clear as to how this differs from the web interface interaction. Are there tools to help with the testing of this?
I'll take a look at it and test it out.
Just tested and it works very well. I wasn't able to test the environment portion but I am now able to set the hostgroup to "".
- % Done changed from 0 to 100
- Status changed from Ready For Testing to Closed
Also available in: Atom
PDF