Sha256: 4ca54eaf1bb889e07e1c485d7bb887e7190452cfe6fa4132236b8e4179a716b6

Contents?: true

Size: 697 Bytes

Versions: 34

Compression:

Stored size: 697 Bytes

Contents

module Actions
  module Katello
    module CapsuleContent
      class RemoveUnneededRepos < ::Actions::Base
        def plan(capsule_content)
          currently_on_capsule = capsule_content.current_repositories.map(&:pulp_id)
          needed_on_capsule = capsule_content.repos_available_to_capsule.map(&:pulp_id)

          need_removal = currently_on_capsule - needed_on_capsule
          need_removal += capsule_content.orphaned_repos
          need_removal.each do |pulp_id|
            plan_action(Pulp::Repository::Destroy,
                        :pulp_id => pulp_id,
                        :capsule_id => capsule_content.capsule.id)
          end
        end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
katello-3.4.2 app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb
katello-3.4.1 app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb
katello-3.4.0.2 app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb
katello-3.4.0.1 app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb
katello-3.3.2 app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb
katello-3.4.0 app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb
katello-3.4.0.rc2 app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb
katello-3.4.0.rc1 app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb
katello-3.3.1.1 app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb
katello-3.3.1 app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb
katello-3.3.0.1 app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb
katello-3.3.0 app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb
katello-3.3.0.rc2 app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb
katello-3.3.0.rc1.1 app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb
katello-3.3.0.rc1 app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb
katello-3.2.1.1 app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb
katello-3.2.1 app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb
katello-3.2.0 app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb
katello-3.2.0.rc3 app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb
katello-3.2.0.rc2 app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb