Project

General

Profile

Actions

Bug #1905

closed

os_default_templates should be exposed instead of config_templates when calling operatingsystems

Added by Jasper Poppe over 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
trivial
Triaged:
Fixed in Releases:
Found in Releases:

Description

I am working on a Foreman CLI script

One of the issues I encountered is that the os_default_templates variables were not exposed, I need to check those to be able to determine what kind of JSON request I need to send for adding or binding other templates to operatingsystems.

I have changed the following line in app/models/operatingsystem.rb:

{:operatingsystem => {:name => to_s, :id => id, :media => media, :architectures => architectures, :ptables => ptables, :config_templates => config_templates}

to: {:operatingsystem => {:name => to_s, :id => id, :media => media, :architectures => architectures, :ptables => ptables, :os_default_templates => os_default_templates}

I think this is a bug because returning the all the operating system associated configuration templates including data when you query operating system information does not make sense. You could get this data by querying config_templates instead.

I could make a Git pull request if that is preferred.

Actions

Also available in: Atom PDF