Project

General

Profile

Actions

Bug #867

closed

updating a host to belong to a null hostgroup doesn't work

Added by Corey Osman almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #892: submit button is missing when host has no hostgroup and is managedClosedAmos Benari05/09/2011Actions
Actions #1

Updated by Ohad Levy almost 13 years ago

  • Project changed from Smart Proxy to Foreman
Actions #2

Updated by Corey Osman almost 13 years ago

  • Target version set to 0.3
Actions #3

Updated by Paul Kelly almost 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?

Actions #4

Updated by Corey Osman almost 13 years ago

I'll take a look at it and test it out.

Actions #5

Updated by Corey Osman almost 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 "".

Actions #6

Updated by Paul Kelly almost 13 years ago

  • % Done changed from 0 to 100
Actions #7

Updated by Ohad Levy almost 13 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF