Sha256: 085436e4d884b8a116a4b5cf2c946e0c0242abd4ce15609162e71503e6357091

Contents?: true

Size: 1.09 KB

Versions: 20

Compression:

Stored size: 1.09 KB

Contents

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

    has_many :repository_ostree_branches, :dependent => :destroy
    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
    scoped_search :relation => :repositories, :on => :name, :rename => :repository, :complete_value => true

    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

20 entries across 20 versions & 1 rubygems

Version Path
katello-3.5.2 app/models/katello/ostree_branch.rb
katello-3.6.0 app/models/katello/ostree_branch.rb
katello-3.6.0.1.rc2 app/models/katello/ostree_branch.rb
katello-3.6.0.rc2 app/models/katello/ostree_branch.rb
katello-3.6.0.rc1 app/models/katello/ostree_branch.rb
katello-3.5.1.1 app/models/katello/ostree_branch.rb
katello-3.5.1 app/models/katello/ostree_branch.rb
katello-3.5.0.1 app/models/katello/ostree_branch.rb
katello-3.5.0 app/models/katello/ostree_branch.rb
katello-3.5.0.rc2 app/models/katello/ostree_branch.rb
katello-3.5.0.rc1 app/models/katello/ostree_branch.rb
katello-3.4.5 app/models/katello/ostree_branch.rb
katello-3.4.4 app/models/katello/ostree_branch.rb
katello-3.4.2 app/models/katello/ostree_branch.rb
katello-3.4.1 app/models/katello/ostree_branch.rb
katello-3.4.0.2 app/models/katello/ostree_branch.rb
katello-3.4.0.1 app/models/katello/ostree_branch.rb
katello-3.4.0 app/models/katello/ostree_branch.rb
katello-3.4.0.rc2 app/models/katello/ostree_branch.rb
katello-3.4.0.rc1 app/models/katello/ostree_branch.rb