updating a host to belong to a null hostgroup doesn't work
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
#3 Updated by Paul Kelly over 9 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?