Class: Api::V2::ForemanDatacenter::ManagementDevicesController
- Inherits:
-
BaseController
- Object
- V2::BaseController
- BaseController
- Api::V2::ForemanDatacenter::ManagementDevicesController
show all
- Includes:
- ForemanDatacenter::Controller::Parameters::ManagementDevice
- Defined in:
- app/controllers/api/v2/foreman_datacenter/management_devices_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
35
36
37
38
|
# File 'app/controllers/api/v2/foreman_datacenter/management_devices_controller.rb', line 35
def create
@management_device = ::ForemanDatacenter::ManagementDevice.new(management_device_params) process_response @management_device.save
end
|
#destroy ⇒ Object
51
52
53
|
# File 'app/controllers/api/v2/foreman_datacenter/management_devices_controller.rb', line 51
def destroy
process_response @management_device.destroy
end
|
#index ⇒ Object
13
14
15
|
# File 'app/controllers/api/v2/foreman_datacenter/management_devices_controller.rb', line 13
def index
@management_devices = resource_scope_for_index
end
|
#show ⇒ Object
20
21
|
# File 'app/controllers/api/v2/foreman_datacenter/management_devices_controller.rb', line 20
def show
end
|
#update ⇒ Object
44
45
46
|
# File 'app/controllers/api/v2/foreman_datacenter/management_devices_controller.rb', line 44
def update
process_response @management_device.update(management_device_params)
end
|