Class: Katello::ContentViewEnvironment

Inherits:
Model
  • Object
show all
Includes:
ForemanTasks::Concerns::ActionSubject, Authorization::ContentViewEnvironment, Glue, Glue::Candlepin::Environment
Defined in:
app/models/katello/content_view_environment.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Authorization::ContentViewEnvironment

#readable?

Methods included from Glue

logger

Methods included from Glue::Candlepin::Environment

included

Methods inherited from Model

#destroy!

Class Method Details

.for_content_facets(content_facets) ⇒ Object



28
29
30
# File 'app/models/katello/content_view_environment.rb', line 28

def self.for_content_facets(content_facets)
  joins(:content_view_environment_content_facets, :content_facets).where("#{Katello::ContentViewEnvironmentContentFacet.table_name}.content_facet_id" => content_facets).uniq
end

Instance Method Details

#activation_keysObject



41
42
43
# File 'app/models/katello/content_view_environment.rb', line 41

def activation_keys
  content_view.activation_keys.in_environment(environment)
end

#hostsObject



37
38
39
# File 'app/models/katello/content_view_environment.rb', line 37

def hosts
  ::Host.in_content_view_environment(:content_view => self.content_view, :lifecycle_environment => self.environment)
end

#ownerObject

retrieve the owning environment for this content view environment.



33
34
35
# File 'app/models/katello/content_view_environment.rb', line 33

def owner
  self.environment
end