Sha256: e1e1af1d6f6dc80651208d61904fa432b7182b659eef1150cc79abaae43b32ea
Contents?: true
Size: 921 Bytes
Versions: 105
Compression:
Stored size: 921 Bytes
Contents
module Actions module Katello module Repository class FetchPxeFiles < Actions::EntryAction input_format do param :id, Integer param :capsule_id, Integer end def run repository = ::Katello::Repository.find(input[:id]) return unless needs_download?(repository) capsule = if input[:capsule_id].present? SmartProxy.unscoped.find(input[:capsule_id]) else SmartProxy.default_capsule! end downloader = ::Katello::PxeFilesDownloader.new(repository, capsule) downloader.download_files end private def needs_download?(repository) repository.distribution_bootable? && repository.download_policy == ::Runcible::Models::YumImporter::DOWNLOAD_ON_DEMAND end end end end end
Version data entries
105 entries across 105 versions & 1 rubygems