Project

General

Profile

Actions

Bug #24602

open

Possible fix for external_usergroups_controller when using api/v2/operatingsystems/:operatingsystem_id/os_default_templates/

Added by Gorka Benguria over 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Hi all

I was triing to assign os default templates using REST api v2 (POST to api/v2/operatingsystems/:operatingsystem_id/os_default_templates/). I was using this command, to create the external usergroup.

curl -s -H Accept:application/json -H Content-Type:application/json -k -u admin:changeme -X POST -d '{"provisioning_template_id":43,"template_kind_id":1}' https://172.19.0.1/api/v2/operatingsystems/1/os_default_templates

I server was not complaining, but in the response the value of the operating system was null. And going to the web interface no default template was assigned, finally I fixed it modifiing the file app/controllers/api/v2/os_default_templates_controller.rb at the line 42. I include the resulting patch:


Files

20180813063716-foreman.patch 20180813063716-foreman.patch 713 Bytes Gorka Benguria, 08/13/2018 04:44 PM

No data to display

Actions

Also available in: Atom PDF