Class: Katello::DockerTag
- Includes:
- ScopedSearchExtensions
- Defined in:
- app/models/katello/docker_tag.rb
Class Method Summary collapse
- .completer_scope_options ⇒ Object
- .grouped ⇒ Object
- .with_identifiers(ids) ⇒ Object
-
.with_uuid(uuid) ⇒ Object
docker tag doesn’t have a uuid in pulp.
Instance Method Summary collapse
- #full_name ⇒ Object
- #related_tags ⇒ Object
-
#repositories ⇒ Object
docker tag only has one repo.
Methods inherited from Model
Class Method Details
.completer_scope_options ⇒ Object
49 50 51 |
# File 'app/models/katello/docker_tag.rb', line 49 def self. {"#{Katello::Repository.table_name}" => lambda { |repo_class| repo_class.docker_type } } end |
.grouped ⇒ Object
20 21 22 23 24 |
# File 'app/models/katello/docker_tag.rb', line 20 def self.grouped grouped_fields = "#{table_name}.name, #{Repository.table_name}.name, #{Product.table_name}.name" ids = uniq.select("ON (#{grouped_fields}) #{table_name}.id").joins(:repository => :product) where(:id => ids) end |
.with_identifiers(ids) ⇒ Object
45 46 47 |
# File 'app/models/katello/docker_tag.rb', line 45 def self.with_identifiers(ids) self.where(:id => ids) end |
.with_uuid(uuid) ⇒ Object
docker tag doesn’t have a uuid in pulp
27 28 29 |
# File 'app/models/katello/docker_tag.rb', line 27 def self.with_uuid(uuid) where(:id => uuid) end |
Instance Method Details
#full_name ⇒ Object
36 37 38 |
# File 'app/models/katello/docker_tag.rb', line 36 def full_name "#{repository.name}:#{name}" end |
#related_tags ⇒ Object
40 41 42 43 |
# File 'app/models/katello/docker_tag.rb', line 40 def # tags in the same repo group with the same name self.class.where(:repository_id => repository.group, :name => name) end |
#repositories ⇒ Object
docker tag only has one repo
32 33 34 |
# File 'app/models/katello/docker_tag.rb', line 32 def repositories [repository] end |