Sha256: e06e3115b62a1006a50ea00eab32721074dcceaa957f784b967d48bee70cca87

Contents?: true

Size: 1.4 KB

Versions: 152

Compression:

Stored size: 1.4 KB

Contents

module Katello
  class DockerManifest < Katello::Model
    include Concerns::PulpDatabaseUnit
    has_many :docker_tags, :as => :docker_taggable, :class_name => "Katello::DockerTag", :dependent => :destroy
    has_many :docker_manifest_list_manifests, :class_name => "Katello::DockerManifestListManifest",
             :dependent => :delete_all, :inverse_of => :docker_manifest
    has_many :docker_manifest_lists, :through => :docker_manifest_list_manifests, :inverse_of => :docker_manifests

    CONTENT_TYPE = "docker_manifest".freeze

    scoped_search :relation => :docker_tags, :on => :name, :rename => :tag, :complete_value => true
    scoped_search :on => :digest, :rename => :digest, :complete_value => true, :only_explicit => true
    scoped_search :on => :schema_version, :rename => :schema_version, :complete_value => true, :only_explicit => true
    scoped_search :relation => :docker_manifest_lists, :on => :digest, :rename => :manifest_list_digest, :complete_value => true, :only_explicit => true

    def self.default_sort
      order(:schema_version)
    end

    def manifest_type
      "image"
    end

    def remove_from_repository(repo_id)
      self.class.repository_association_class.where(:repository_id => repo_id, self.class.unit_id_field.to_sym => self.id).delete_all
      self.destroy if (self.repositories.empty? || self.docker_manifest_lists.empty?)
      DockerMetaTag.cleanup_tags
    end
  end
end

Version data entries

152 entries across 152 versions & 1 rubygems

Version Path
katello-4.14.2 app/models/katello/docker_manifest.rb
katello-4.15.0 app/models/katello/docker_manifest.rb
katello-4.15.0.rc2 app/models/katello/docker_manifest.rb
katello-4.15.0.rc1 app/models/katello/docker_manifest.rb
katello-4.14.1 app/models/katello/docker_manifest.rb
katello-4.14.0 app/models/katello/docker_manifest.rb
katello-4.14.0.rc3 app/models/katello/docker_manifest.rb
katello-4.14.0.rc2 app/models/katello/docker_manifest.rb
katello-4.14.0.rc1.1 app/models/katello/docker_manifest.rb
katello-4.14.0.rc1 app/models/katello/docker_manifest.rb
katello-4.13.1 app/models/katello/docker_manifest.rb
katello-4.13.0 app/models/katello/docker_manifest.rb
katello-4.12.1 app/models/katello/docker_manifest.rb
katello-4.13.0.rc1 app/models/katello/docker_manifest.rb
katello-4.12.0 app/models/katello/docker_manifest.rb
katello-4.12.0.rc3 app/models/katello/docker_manifest.rb
katello-4.12.0.rc2 app/models/katello/docker_manifest.rb
katello-4.12.0.rc1 app/models/katello/docker_manifest.rb
katello-4.11.1 app/models/katello/docker_manifest.rb
katello-4.11.0 app/models/katello/docker_manifest.rb