Class: Api::V2::ConfigTemplatesController

Inherits:
Api::V1::ConfigTemplatesController show all
Includes:
TaxonomyScope, Api::Version2
Defined in:
app/controllers/api/v2/config_templates_controller.rb

Instance Method Summary collapse

Methods included from TaxonomyScope

#set_taxonomy_scope

Methods included from Api::Version2

#api_version

Methods inherited from Api::V1::ConfigTemplatesController

#build_pxe_default, #create, #destroy, #revision, #update

Methods included from Foreman::Renderer

#foreman_url, #render_safe, #snippet, #snippets, #unattended_render, #unattended_render_to_temp_file

Methods included from Api::Version1

#api_version

Methods inherited from BaseController

#get_resource, #resource_class, #resource_name, #resource_scope

Methods included from Foreman::ThreadSession::Cleaner

#clear_thread, included

Instance Method Details

#indexObject


9
10
11
12
# File 'app/controllers/api/v2/config_templates_controller.rb', line 9

def index
  super
  render :template => "api/v1/config_templates/index"
end

#process_operatingsystemsObject


19
20
21
22
# File 'app/controllers/api/v2/config_templates_controller.rb', line 19

def process_operatingsystems
  return unless (ct = params[:config_template]) and (operatingsystems = ct.delete(:operatingsystems))
  ct[:operatingsystem_ids] = operatingsystems.collect {|os| os[:id]}
end

#showObject


14
15
16
17
# File 'app/controllers/api/v2/config_templates_controller.rb', line 14

def show
  super
  render :template => "api/v1/config_templates/show"
end