Class: Content::Repository
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Content::Repository
- Includes:
- Orchestration::Pulp::Sync, Foreman::STI
- Defined in:
- app/models/content/repository.rb
Direct Known Subclasses
Defined Under Namespace
Classes: OperatingSystem, Product
Constant Summary collapse
- YUM_TYPE =
'yum'- KICKSTART_TYPE =
'kickstart'- FILE_TYPE =
'iso'- TYPES =
[YUM_TYPE, KICKSTART_TYPE, FILE_TYPE]
Instance Method Summary collapse
- #content_types ⇒ Object
-
#entity_name ⇒ Object
inhariters are expected to override this method.
- #publish(content_view) ⇒ Object
-
#to_label ⇒ Object
The label is used as a repository label in a yum repo file.
Instance Method Details
#content_types ⇒ Object
36 37 38 |
# File 'app/models/content/repository.rb', line 36 def content_types TYPES end |
#entity_name ⇒ Object
inhariters are expected to override this method
46 47 48 |
# File 'app/models/content/repository.rb', line 46 def entity_name '' end |
#publish(content_view) ⇒ Object
50 51 52 53 54 55 56 |
# File 'app/models/content/repository.rb', line 50 def publish content_view repository_clones.create!( :content_views => [content_view], :name => self.name + "_clone", :relative_path => "content_views/#{to_label}/#{Foreman.uuid}" ) end |
#to_label ⇒ Object
The label is used as a repository label in a yum repo file.
41 42 43 |
# File 'app/models/content/repository.rb', line 41 def to_label "#{entity_name}-#{name}".parameterize end |