Class: Api::V2::ForemanDatacenter::DeviceInterfacesController
- Inherits:
-
BaseController
- Object
- V2::BaseController
- BaseController
- Api::V2::ForemanDatacenter::DeviceInterfacesController
show all
- Includes:
- ForemanDatacenter::Controller::Parameters::DeviceInterface
- Defined in:
- app/controllers/api/v2/foreman_datacenter/device_interfaces_controller.rb
Instance Method Summary
collapse
#action_permission, #controller_permission, #find_resource, #resource_class, #resource_class_for, #resource_finder, #resource_name, #resource_scope, #scope_for
Instance Method Details
#create ⇒ Object
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
|
#destroy ⇒ Object
55
56
57
|
# File 'app/controllers/api/v2/foreman_datacenter/device_interfaces_controller.rb', line 55
def destroy
process_response @device_interface.destroy
end
|
#index ⇒ Object
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
|
#show ⇒ Object
21
22
|
# File 'app/controllers/api/v2/foreman_datacenter/device_interfaces_controller.rb', line 21
def show
end
|
#update ⇒ Object
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
|