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

Version Path
katello-3.14.0.rc2 app/lib/actions/katello/repository/fetch_pxe_files.rb
katello-3.13.2 app/lib/actions/katello/repository/fetch_pxe_files.rb
katello-3.14.0.rc1 app/lib/actions/katello/repository/fetch_pxe_files.rb
katello-3.13.1 app/lib/actions/katello/repository/fetch_pxe_files.rb
katello-3.13.0 app/lib/actions/katello/repository/fetch_pxe_files.rb
katello-3.13.0.rc2.1 app/lib/actions/katello/repository/fetch_pxe_files.rb
katello-3.13.0.rc2 app/lib/actions/katello/repository/fetch_pxe_files.rb
katello-3.12.3 app/lib/actions/katello/repository/fetch_pxe_files.rb
katello-3.12.2 app/lib/actions/katello/repository/fetch_pxe_files.rb
katello-3.13.0.rc1 app/lib/actions/katello/repository/fetch_pxe_files.rb
katello-3.12.1 app/lib/actions/katello/repository/fetch_pxe_files.rb
katello-3.11.2 app/lib/actions/katello/repository/fetch_pxe_files.rb
katello-3.10.2 app/lib/actions/katello/repository/fetch_pxe_files.rb
katello-3.12.0 app/lib/actions/katello/repository/fetch_pxe_files.rb
katello-3.12.0.rc2 app/lib/actions/katello/repository/fetch_pxe_files.rb
katello-3.10.1.1 app/lib/actions/katello/repository/fetch_pxe_files.rb
katello-3.12.0.rc1 app/lib/actions/katello/repository/fetch_pxe_files.rb
katello-3.10.1 app/lib/actions/katello/repository/fetch_pxe_files.rb
katello-3.11.1 app/lib/actions/katello/repository/fetch_pxe_files.rb
katello-3.11.0 app/lib/actions/katello/repository/fetch_pxe_files.rb