Class: Api::V2::ForemanDatacenter::DeviceInterfacesController

Inherits:
BaseController
  • Object
show all
Includes:
ForemanDatacenter::Controller::Parameters::DeviceInterface
Defined in:
app/controllers/api/v2/foreman_datacenter/device_interfaces_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



39
40
41
42
# File 'app/controllers/api/v2/foreman_datacenter/device_interfaces_controller.rb', line 39

def create
  @device_interface = ::ForemanDatacenter::DeviceInterface.new(device_interface_params)
         process_response @device_interface.save
end

#destroyObject



55
56
57
# File 'app/controllers/api/v2/foreman_datacenter/device_interfaces_controller.rb', line 55

def destroy
  process_response @device_interface.destroy
end

#indexObject



14
15
16
# File 'app/controllers/api/v2/foreman_datacenter/device_interfaces_controller.rb', line 14

def index
  @device_interfaces = resource_scope_for_index
end

#showObject



21
22
# File 'app/controllers/api/v2/foreman_datacenter/device_interfaces_controller.rb', line 21

def show
end

#updateObject



48
49
50
# File 'app/controllers/api/v2/foreman_datacenter/device_interfaces_controller.rb', line 48

def update
  process_response @device_interface.update(device_interface_params)
end