Class: Api::V2::Compliance::TailoringFilesController
- Inherits:
-
BaseController
- Object
- BaseController
- Api::V2::Compliance::TailoringFilesController
show all
- Includes:
- Foreman::Controller::Parameters::TailoringFile, ForemanOpenscap::Api::V2::ScapApiControllerExtensions, ForemanOpenscap::BodyLogExtensions
- Defined in:
- app/controllers/api/v2/compliance/tailoring_files_controller.rb
Instance Method Summary
collapse
#log_response_body, #logger_msg, #skip_body_log
Instance Method Details
#create ⇒ Object
44
45
46
47
|
# File 'app/controllers/api/v2/compliance/tailoring_files_controller.rb', line 44
def create
@tailoring_file = ForemanOpenscap::TailoringFile.new(tailoring_file_params)
process_response @tailoring_file.save
end
|
#destroy ⇒ Object
60
61
62
|
# File 'app/controllers/api/v2/compliance/tailoring_files_controller.rb', line 60
def destroy
process_response @tailoring_file.destroy
end
|
#index ⇒ Object
14
15
16
|
# File 'app/controllers/api/v2/compliance/tailoring_files_controller.rb', line 14
def index
@tailoring_files = resource_scope_for_index(:permission => :view_tailoring_files)
end
|
#show ⇒ Object
29
30
|
# File 'app/controllers/api/v2/compliance/tailoring_files_controller.rb', line 29
def show
end
|
#update ⇒ Object
53
54
55
|
# File 'app/controllers/api/v2/compliance/tailoring_files_controller.rb', line 53
def update
process_response @tailoring_file.update(tailoring_file_params)
end
|
#xml ⇒ Object
21
22
23
24
25
|
# File 'app/controllers/api/v2/compliance/tailoring_files_controller.rb', line 21
def xml
send_data @tailoring_file.scap_file,
:type => 'application/xml',
:filename => @tailoring_file.original_filename || "#{@tailoring_file.name}.xml"
end
|