Project

General

Profile

Feature #1123

api for config_templates needs to return additional attributes

Added by Corey Osman almost 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

/config_templates?format=json returns too much data. I simply want a list of templates and some attributes instead of the code
thats inside the templates. If I want the code inside the template it would be better to pass the name of a template or id like:

config_templates/grubby?format=json

Here is a sample of what gets returned now:

[{"config_template":{"name":"Grubby Default","template":"#!/bin/bash\n\nKERNEL=\"/boot/kernel\"\nINITRD=\"/boot/initrd.img\"\n\nwget 
-O \"$KERNEL\" \"<%= @host.url_for_boot(:kernel) %>\"\nwget -O \"$INITRD\" \"<%= @host.url_for_boot(:initrd) %>\"\n\ngrubby 
--add-kernel=$KERNEL --initrd=$INITRD  --copy-default --title \"<%= @host.operatingsystem %>\" --make-default  --args=\
"ks=<%= foreman_url(\"provision\")%>\"\n","snippet":null}},{"config_template":{"name":"HTTP proxy","template":" 
<% if proxy = @host.params[\"http_proxy\"] -%>\nhttp_proxy=<%= proxy %>\nexport http_proxy\nhttps_proxy=<%= proxy %>
\nexport https_proxy\nno_proxy=localhost,127.0.0.0/8,*.local,*.<%= @host.domain.name -%>,puppet\nexport no_proxy\n
<% end -%>\n","snippet":true}},{"config_template":{"name":"Jumpstart Default","template":"install_type <%= @install_type %>\npartitioning explicit\n<%= @disk %>\n<% if @h

Associated revisions

Revision 630eae9c (diff)
Added by Corey Osman over 7 years ago

fixes #1123 api for config_templates needs to return additional attributes

Signed-off-by: Corey Osman <>

History

#1 Updated by Corey Osman over 7 years ago

  • Assignee set to Corey Osman
  • Target version set to 0.4

#2 Updated by Ohad Levy over 7 years ago

  • Subject changed from api for config_templates returns too much data to api for config_templates needs to return additional attributes

#3 Updated by Ohad Levy over 7 years ago

  • Tracker changed from Bug to Feature

#4 Updated by Corey Osman over 7 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF