Sha256: b4c1381d1c07ee4eb51c215363f41b6e03919657f1768cc826ccdf43d96e29f8
Contents?: true
Size: 1.05 KB
Versions: 80
Compression:
Stored size: 1.05 KB
Contents
module Katello class ManagedContentMediumProvider < ::MediumProviders::Provider def validate errors = [] errors << N_("Kickstart repository was not set for host '%{host}'") % { :host => entity } if kickstart_repo.nil? errors << N_("Content source was not set for host '%{host}'") % { :host => entity } if entity.content_source.nil? errors end def medium_uri(path = "") url = kickstart_repo.full_path(entity.content_source) url += '/' + path unless path.empty? URI.parse(url) end # If there is an 'AppStream' variant, we need to make it # available to Anaconda def additional_media appstream = entity.operatingsystem.variant_repo(entity, 'AppStream') super + (appstream ? [appstream] : []) end def unique_id @unique_id ||= begin "#{kickstart_repo.name.parameterize}-#{kickstart_repo.id}" end end def kickstart_repo @kickstart_repo ||= entity.try(:content_facet).try(:kickstart_repository) || entity.try(:kickstart_repository) end end end
Version data entries
80 entries across 80 versions & 1 rubygems