Class: Api::V2::ForemanDatacenter::InterfaceTemplatesController

Inherits:
BaseController
  • Object
show all
Includes:
ForemanDatacenter::Controller::Parameters::InterfaceTemplate
Defined in:
app/controllers/api/v2/foreman_datacenter/interface_templates_controller.rb

Instance Method Summary collapse

Methods inherited from BaseController

#action_permission, #controller_permission, #find_resource, #resource_class, #resource_class_for, #resource_finder, #resource_name, #resource_scope, #scope_for

Instance Method Details

#createObject



35
36
37
38
# File 'app/controllers/api/v2/foreman_datacenter/interface_templates_controller.rb', line 35

def create
  @interface_template = ::ForemanDatacenter::InterfaceTemplate.new(interface_template_params)
  process_response @interface_template.save
end

#destroyObject



43
44
45
# File 'app/controllers/api/v2/foreman_datacenter/interface_templates_controller.rb', line 43

def destroy
  process_response @interface_template.destroy
end

#indexObject



13
14
15
# File 'app/controllers/api/v2/foreman_datacenter/interface_templates_controller.rb', line 13

def index
  @interface_templates = resource_scope_for_index
end

#showObject



20
21
# File 'app/controllers/api/v2/foreman_datacenter/interface_templates_controller.rb', line 20

def show
end