Sha256: 5119ac620c3bf8e25e2b91f8c7dae8ddc5b88096b8bb89b3fd2840b25ac2e924

Contents?: true

Size: 930 Bytes

Versions: 22

Compression:

Stored size: 930 Bytes

Contents

module Actions
  module Katello
    module OrphanCleanup
      class RemoveOrphans < Actions::Base
        input_format do
          param :capsule_id
        end
        def plan(proxy)
          sequence do
            if proxy.pulp_primary?
              ::Katello::RootRepository.orphaned.destroy_all
              plan_action(RemoveOrphanedContentUnits)
            end
            if proxy.pulp3_enabled?
              plan_action(
                Actions::Pulp3::Orchestration::OrphanCleanup::RemoveOrphans,
                proxy)
              plan_self(:smart_proxy_id => proxy.id)
            end
          end
        end

        def finalize
          smart_proxy = ::SmartProxy.unscoped.find(input[:smart_proxy_id])
          if smart_proxy.pulp_mirror?
            ::ForemanTasks.async_task(::Actions::Katello::CapsuleContent::UpdateContentCounts, smart_proxy)
          end
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
katello-4.14.2 app/lib/actions/katello/orphan_cleanup/remove_orphans.rb
katello-4.15.0 app/lib/actions/katello/orphan_cleanup/remove_orphans.rb
katello-4.15.0.rc2 app/lib/actions/katello/orphan_cleanup/remove_orphans.rb
katello-4.15.0.rc1 app/lib/actions/katello/orphan_cleanup/remove_orphans.rb
katello-4.14.1 app/lib/actions/katello/orphan_cleanup/remove_orphans.rb
katello-4.14.0 app/lib/actions/katello/orphan_cleanup/remove_orphans.rb
katello-4.14.0.rc3 app/lib/actions/katello/orphan_cleanup/remove_orphans.rb
katello-4.14.0.rc2 app/lib/actions/katello/orphan_cleanup/remove_orphans.rb
katello-4.14.0.rc1.1 app/lib/actions/katello/orphan_cleanup/remove_orphans.rb
katello-4.14.0.rc1 app/lib/actions/katello/orphan_cleanup/remove_orphans.rb
katello-4.13.1 app/lib/actions/katello/orphan_cleanup/remove_orphans.rb
katello-4.13.0 app/lib/actions/katello/orphan_cleanup/remove_orphans.rb
katello-4.12.1 app/lib/actions/katello/orphan_cleanup/remove_orphans.rb
katello-4.13.0.rc1 app/lib/actions/katello/orphan_cleanup/remove_orphans.rb
katello-4.12.0 app/lib/actions/katello/orphan_cleanup/remove_orphans.rb
katello-4.12.0.rc3 app/lib/actions/katello/orphan_cleanup/remove_orphans.rb
katello-4.12.0.rc2 app/lib/actions/katello/orphan_cleanup/remove_orphans.rb
katello-4.12.0.rc1 app/lib/actions/katello/orphan_cleanup/remove_orphans.rb
katello-4.11.1 app/lib/actions/katello/orphan_cleanup/remove_orphans.rb
katello-4.11.0 app/lib/actions/katello/orphan_cleanup/remove_orphans.rb