Sha256: bc0d9c45c5d453790f28d571520a625fed7e994ba4b7edeaa471dda4678b5590
Contents?: true
Size: 1.47 KB
Versions: 8
Compression:
Stored size: 1.47 KB
Contents
module Actions module Katello module Organization class ManifestRefresh < Actions::AbstractAsyncTask middleware.use Actions::Middleware::PropagateCandlepinErrors def plan(organization) action_subject organization manifest_update = organization.products.redhat.any? path = "/tmp/#{rand}.zip" details = organization.owner_details upstream = details['upstreamConsumer'].blank? ? {} : details['upstreamConsumer'] sequence do plan_action(Candlepin::Owner::UpstreamUpdate, :organization_id => organization.id, :upstream => upstream) plan_action(Candlepin::Owner::UpstreamExport, :organization_id => organization.id, :upstream => upstream, :path => path) plan_action(Candlepin::Owner::Import, :label => organization.label, :path => path) plan_action(Candlepin::Owner::ImportProducts, :organization_id => organization.id) if manifest_update && SETTINGS[:katello][:use_pulp] organization.products.redhat.flat_map(&:repositories).each do |repo| plan_action(Katello::Repository::RefreshRepository, repo) end end end end def humanized_name _("Refresh Manifest") end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems