Sha256: e0a1ade0bd767558a488ce28b4e71e82eb2ce5415ed15a76467286b917fcd455

Contents?: true

Size: 767 Bytes

Versions: 6

Compression:

Stored size: 767 Bytes

Contents

module Katello
  class YumMetadataFile < Katello::Model
    include Concerns::PulpDatabaseUnit
    include ScopedSearchExtensions
    belongs_to :repository, :inverse_of => :yum_metadata_files, :class_name => "Katello::Repository"
    CONTENT_TYPE = "yum_repo_metadata_file".freeze

    def self.import_for_repository(repository, _force = true)
      ::Katello::YumMetadataFile.where(:repository_id => repository).destroy_all
      super(repository, true)
    end

    def self.manage_repository_association
      false
    end

    # yum metadata file only has one repo
    def repositories
      [repository]
    end

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
katello-3.12.3 app/models/katello/yum_metadata_file.rb
katello-3.12.2 app/models/katello/yum_metadata_file.rb
katello-3.12.1 app/models/katello/yum_metadata_file.rb
katello-3.12.0 app/models/katello/yum_metadata_file.rb
katello-3.12.0.rc2 app/models/katello/yum_metadata_file.rb
katello-3.12.0.rc1 app/models/katello/yum_metadata_file.rb