Actions
Feature #1123
closedapi for config_templates needs to return additional attributes
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
Updated by Corey Osman over 13 years ago
- Assignee set to Corey Osman
- Target version set to 0.4
Updated by Ohad Levy about 13 years ago
- Subject changed from api for config_templates returns too much data to api for config_templates needs to return additional attributes
Updated by Corey Osman about 13 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset 630eae9ccf8a817b5845af1332274d7f8f4bb45f.
Actions