Sha256: f141c5df16eb36d813c392bdc495ca6b28408d46dbb0a95e06c35f13fd881990
Contents?: true
Size: 964 Bytes
Versions: 9
Compression:
Stored size: 964 Bytes
Contents
module Katello module Concerns module OperatingsystemsControllerExtensions extend ActiveSupport::Concern def available_kickstart_repo host = Host.new operatingsystem = Operatingsystem.find(params[:id]) host.operatingsystem = operatingsystem host.architecture = Architecture.find(params[:architecture_id]) host.lifecycle_environment = Katello::KTEnvironment.find(params[:lifecycle_environment_id]) host.content_view = Katello::ContentView.find(params[:content_view_id]) host.content_source = SmartProxy.find(params[:content_source_id]) if operatingsystem.is_a?(Redhat) render :json => operatingsystem.kickstart_repo(host) else render :json => nil end end def action_permission case params[:action] when 'available_kickstart_repo' 'view' else super end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems