Class: Actions::Katello::Repository::FetchPxeFiles

Inherits:
EntryAction
  • Object
show all
Defined in:
app/lib/actions/katello/repository/fetch_pxe_files.rb

Instance Method Summary collapse

Instance Method Details

#runObject



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'app/lib/actions/katello/repository/fetch_pxe_files.rb', line 10

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