Class: Content::Repository

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Orchestration::Pulp::Sync, RepositoryCommon, Foreman::STI
Defined in:
app/models/content/repository.rb

Direct Known Subclasses

OperatingSystem, Product

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]

Constants included from RepositoryCommon

Content::RepositoryCommon::REPO_PREFIX

Instance Method Summary collapse

Methods included from RepositoryCommon

#full_path

Instance Method Details

#clone(content_view) ⇒ Object



66
67
68
69
70
71
72
# File 'app/models/content/repository.rb', line 66

def clone content_view
  repository_clones.create!(
    :content_views => [content_view],
    :name => self.name + "_clone",
    :relative_path => "content_views/#{entity_name}/#{name}/#{Foreman.uuid}"
  )
end

#content_typesObject



52
53
54
# File 'app/models/content/repository.rb', line 52

def content_types
  TYPES
end

#entity_nameObject

inhariters are expected to override this method



62
63
64
# File 'app/models/content/repository.rb', line 62

def entity_name
  ''
end

#to_labelObject

The label is used as a repository label in a yum repo file.



57
58
59
# File 'app/models/content/repository.rb', line 57

def to_label
  "#{entity_name}/#{name}"
end