Sha256: 418e063a1198e7df14354cf1e0e7e97cff0c73a78af67e3f82c6991a84b81e33
Contents?: true
Size: 898 Bytes
Versions: 28
Compression:
Stored size: 898 Bytes
Contents
module Actions module Katello module Repository class UpdateRedhatRepository < Actions::EntryAction def plan(repo) action_subject repo repo.root.update_attributes!(:url => upstream_url(repo)) if repo.library_instance? repo.update_attributes!(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
28 entries across 28 versions & 1 rubygems