Module: Katello::Concerns::RendererExtensions::Overrides

Defined in:
app/lib/katello/concerns/renderer_extensions.rb

Instance Method Summary collapse

Instance Method Details

#kickstart_attributesObject



7
8
9
10
11
12
13
14
15
16
17
18
# File 'app/lib/katello/concerns/renderer_extensions.rb', line 7

def kickstart_attributes
  super

  medium_provider = Katello::ManagedContentMediumProvider.new(host)
  content_view = host.try(:content_facet).try(:single_content_view) || host.try(:single_content_view)

  if content_view && host.operatingsystem.is_a?(Redhat) &&
          host.operatingsystem.kickstart_repos(host).first.present? &&
          host&.content_facet&.kickstart_repository.present?
    @mediapath ||= host.operatingsystem.mediumpath(medium_provider)
  end
end