Bug #867
closedupdating a host to belong to a null hostgroup doesn't work
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
Updated by Ohad Levy over 13 years ago
- Project changed from Smart Proxy to Foreman
Updated by Paul Kelly over 13 years ago
- 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?
Updated by Corey Osman over 13 years ago
I'll take a look at it and test it out.
Updated by Corey Osman over 13 years ago
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 "".
Updated by Paul Kelly over 13 years ago
- % Done changed from 0 to 100
Applied in changeset bf228dd6dd0cca6c9cbb1a0ec4bf18d41cf04970.
Updated by Ohad Levy over 13 years ago
- Status changed from Ready For Testing to Closed