Class: Katello::YumMetadataFile

Inherits:
Model
  • Object
show all
Includes:
Concerns::PulpDatabaseUnit, ScopedSearchExtensions
Defined in:
app/models/katello/yum_metadata_file.rb

Constant Summary collapse

CONTENT_TYPE =
"yum_repo_metadata_file".freeze

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Concerns::PulpDatabaseUnit

#backend_data, #library_repositories, #remove_from_repository

Methods inherited from Model

#destroy!

Class Method Details

.completer_scope_optionsObject



18
19
20
# File 'app/models/katello/yum_metadata_file.rb', line 18

def self.completer_scope_options
  {"#{Katello::Repository.table_name}" => lambda { |repo_class| repo_class.yum_type } }
end

.import_for_repository(repository, options = {}) ⇒ Object



8
9
10
11
# File 'app/models/katello/yum_metadata_file.rb', line 8

def self.import_for_repository(repository, options = {})
  ::Katello::YumMetadataFile.where(:repository_id => repository).destroy_all
  super(repository, options)
end

Instance Method Details

#repositoriesObject

yum metadata file only has one repo



14
15
16
# File 'app/models/katello/yum_metadata_file.rb', line 14

def repositories
  [repository]
end