Sha256: 995376738e4536366f8e50c6c0faaee803676c95ed7be54ace600a9bac4f97ea
Contents?: true
Size: 876 Bytes
Versions: 57
Compression:
Stored size: 876 Bytes
Contents
module Actions module Katello module Repository class UpdateRedhatRepository < Actions::EntryAction def plan(repo) action_subject repo repo.root.update!(:url => upstream_url(repo)) if repo.library_instance? repo.update!(relative_path: relative_path(repo)) plan_action(::Actions::Pulp::Repository::Refresh, repo) plan_self(:repository_id => repo.id) end def run repository = ::Katello::Repository.find(input[:repository_id]) ForemanTasks.async_task(Katello::Repository::UpdateMetadataSync, repository) end private def relative_path(repo) repo.generate_repo_path(repo.generate_content_path) end def upstream_url(repo) repo.product.repo_url(repo.generate_content_path) end end end end end
Version data entries
57 entries across 57 versions & 1 rubygems