Sha256: 8cee9beab50624c69aba21081099acda114168ab0a9f4470e5ead0f01f82b3ac

Contents?: true

Size: 640 Bytes

Versions: 18

Compression:

Stored size: 640 Bytes

Contents

module Actions
  module Pulp
    module Repos
      class Update < Pulp::Abstract
        def plan(product)
          sync_plan = product.sync_plan

          product.repos(product.library).each do |repo|
            if sync_plan.nil?
              plan_action(::Actions::Pulp::Repository::RemoveSchedule, :repo_id => repo.id)
            else
              plan_action(::Actions::Pulp::Repository::UpdateSchedule,
                :repo_id => repo.id,
                :schedule => sync_plan.schedule_format,
                :enabled => sync_plan.enabled
              )
            end
          end
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
katello-3.0.2 app/lib/actions/pulp/repos/update.rb
katello-2.4.5 app/lib/actions/pulp/repos/update.rb
katello-3.0.1 app/lib/actions/pulp/repos/update.rb
katello-2.4.4 app/lib/actions/pulp/repos/update.rb
katello-3.0.0 app/lib/actions/pulp/repos/update.rb
katello-2.4.3 app/lib/actions/pulp/repos/update.rb
katello-3.0.0.rc7 app/lib/actions/pulp/repos/update.rb
katello-3.0.0.rc5 app/lib/actions/pulp/repos/update.rb
katello-2.4.2 app/lib/actions/pulp/repos/update.rb
katello-3.0.0.rc4 app/lib/actions/pulp/repos/update.rb
katello-3.0.0.rc3 app/lib/actions/pulp/repos/update.rb
katello-3.0.0.rc2 app/lib/actions/pulp/repos/update.rb
katello-3.0.0.rc1 app/lib/actions/pulp/repos/update.rb
katello-2.4.1 app/lib/actions/pulp/repos/update.rb
katello-2.4.0 app/lib/actions/pulp/repos/update.rb
katello-2.4.0.rc3 app/lib/actions/pulp/repos/update.rb
katello-2.4.0.rc2 app/lib/actions/pulp/repos/update.rb
katello-2.4.0.rc1 app/lib/actions/pulp/repos/update.rb