Sha256: 61007642c4b60629625e54d23c4c84268603fa77027529361d8532ad876a3f02

Contents?: true

Size: 1.04 KB

Versions: 7

Compression:

Stored size: 1.04 KB

Contents

module Katello
  class OstreeBranch < Katello::Model
    include Concerns::PulpDatabaseUnit

    has_many :repository_ostree_branches, :dependent => :destroy, :class_name => 'Katello::RepositoryOstreeBranch'
    has_many :repositories, :through => :repository_ostree_branches, :inverse_of => :ostree_branches

    scoped_search :on => :name, :complete_value => true
    scoped_search :on => :version, :complete_value => true
    scoped_search :on => :commit, :complete_value => true
    scoped_search :on => :uuid, :complete_value => true
    scoped_search :on => :version_date, :complete_value => true, :rename => :created

    CONTENT_TYPE = Pulp::OstreeBranch::CONTENT_TYPE

    def self.repository_association_class
      RepositoryOstreeBranch
    end

    def update_from_json(json)
      update_attributes(:name => json[:branch],
                        :version => json[:metadata][:version],
                        :commit => json[:commit],
                        :version_date => json[:_created].to_datetime
                       )
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
katello-3.10.0 app/models/katello/ostree_branch.rb
katello-3.10.0.rc1.1 app/models/katello/ostree_branch.rb
katello-3.9.1 app/models/katello/ostree_branch.rb
katello-3.10.0.rc1 app/models/katello/ostree_branch.rb
katello-3.9.0 app/models/katello/ostree_branch.rb
katello-3.9.0.rc2 app/models/katello/ostree_branch.rb
katello-3.9.0.rc1 app/models/katello/ostree_branch.rb