Class: Content::Repository
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Content::Repository
- Includes:
- CustomRepositoryPaths, Orchestration::Pulp, Content::Remote::Pulp::Repository, Orchestration
- Defined in:
- app/models/content/repository.rb
Constant Summary collapse
- YUM_TYPE =
'yum'
- KICKSTART_TYPE =
'kickstart'
- FILE_TYPE =
'iso'
- TYPES =
[YUM_TYPE, KICKSTART_TYPE, FILE_TYPE]
- REPO_PREFIX =
'/pulp/repos/'
Instance Method Summary collapse
- #full_path ⇒ Object
-
#to_label ⇒ Object
The label is used as a repository label in a yum repo file.
- #update_cache ⇒ Object
Methods included from Content::Remote::Pulp::Repository
#delete, #pulp?, #retrieve_with_details, #sync, #sync_history, #sync_status
Methods included from CustomRepositoryPaths
#custom_content_path, #custom_repo_path, #repo_path_from_content_path
Instance Method Details
#full_path ⇒ Object
58 59 60 61 62 63 |
# File 'app/models/content/repository.rb', line 58 def full_path pulp_url = URI.parse(Setting.pulp_url) scheme = (unprotected ? 'http' : 'https') port = (pulp_url.port == 443 || pulp_url.port == 80 ? "" : ":#{pulp_url.port}") "#{scheme}://#{pulp_url.host}#{port}#{REPO_PREFIX}#{relative_path}" end |
#to_label ⇒ Object
The label is used as a repository label in a yum repo file.
66 67 68 |
# File 'app/models/content/repository.rb', line 66 def to_label "#{product.name}-#{name}".parameterize end |
#update_cache ⇒ Object
54 55 56 |
# File 'app/models/content/repository.rb', line 54 def update_cache nil end |