Class: Katello::PxeFilesDownloader
- Inherits:
-
Object
- Object
- Katello::PxeFilesDownloader
- Defined in:
- app/services/katello/pxe_files_downloader.rb
Instance Attribute Summary collapse
-
#capsule ⇒ Object
Returns the value of attribute capsule.
-
#repository ⇒ Object
Returns the value of attribute repository.
Instance Method Summary collapse
- #download_files ⇒ Object
-
#initialize(repository, capsule) ⇒ PxeFilesDownloader
constructor
A new instance of PxeFilesDownloader.
Constructor Details
#initialize(repository, capsule) ⇒ PxeFilesDownloader
Returns a new instance of PxeFilesDownloader.
5 6 7 8 |
# File 'app/services/katello/pxe_files_downloader.rb', line 5 def initialize(repository, capsule) @capsule = capsule @repository = repository end |
Instance Attribute Details
#capsule ⇒ Object
Returns the value of attribute capsule.
3 4 5 |
# File 'app/services/katello/pxe_files_downloader.rb', line 3 def capsule @capsule end |
#repository ⇒ Object
Returns the value of attribute repository.
3 4 5 |
# File 'app/services/katello/pxe_files_downloader.rb', line 3 def repository @repository end |
Instance Method Details
#download_files ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/services/katello/pxe_files_downloader.rb', line 10 def download_files os = Redhat.(repository) medium_provider = Katello::ManagedContentMediumProvider.new( OpenStruct.new( content_source: capsule, kickstart_repository: repository)) ueber_cert = ::Cert::Certs.ueber_cert(repository.organization) cert = OpenSSL::X509::Certificate.new(ueber_cert[:cert]) key = OpenSSL::PKey::RSA.new(ueber_cert[:key]) os.boot_file_sources(medium_provider).values.map do |source_pxe_file| fetch(source_pxe_file, cert, key) end end |