Actions
Bug #1800
closedNot possible to create unmanaged host via API
Description
even though I send
'{"host": {"operatingsystem_id": 21, "managed": false, "name": "ip188000.domain.ch", "ip": "188.142.144.17", "hostgroup_id": 53, "mac": "00:17:3e:00:4e:4b", "architecture_id": 1, "build": "0", "ptable_id": 1}}'
host is created as managed
Would be cool if the logic reflected the managed:false item.
Updated by Steve Traylen over 12 years ago
With the proposed patch from mailing list this is good and you can add hosts specifying the hostname and group only.
Updated by Tomas Karasek over 12 years ago
the patch from the mailing list by Ohad
diff --git a/app/controllers/hosts_controller.rb b/app/controllers/hosts_controller.rb index 2de8015..7fe9852 100644 --- a/app/controllers/hosts_controller.rb +++ b/app/controllers/hosts_controller.rb @@ -84,7 +84,7 @@ class HostsController < ApplicationController def create @host = Host.new(params[:host]) - @host.managed = true + @host.managed = true if params[:host][:managed].nil? forward_request_url if @host.save
Updated by Nacho Barrientos about 12 years ago
Hi,
Do you plan to merge this patch?
Updated by Greg Sutcliffe about 12 years ago
- Target version changed from 1.1 to Bug scrub
Updated by Joseph Magen about 12 years ago
- Status changed from New to Assigned
Fixed as part of pull request https://github.com/theforeman/foreman/pull/239
Updated by Joseph Magen about 12 years ago
- Status changed from Assigned to Closed
Updated by Joseph Magen about 12 years ago
- Status changed from Closed to Ready For Testing
Updated by Sam Kottler about 12 years ago
I'm going to mark this issue closed so we can get accurate numbers for how many issues got closed. Is this fix now included in the API v1 branch?
Updated by Sam Kottler about 12 years ago
- Status changed from Ready For Testing to Closed
Actions