Sha256: 15651e853c4721dfcc6acdedd66811af0e52b70d1d33ad15804f233fd145ecd3

Contents?: true

Size: 991 Bytes

Versions: 19

Compression:

Stored size: 991 Bytes

Contents

module Actions
  module Katello
    module PulpSelector
      def plan_pulp_action(backend_actions, repository, smart_proxy, *args)
        fail "nil smart_proxy passed to PulpSelector" if smart_proxy.nil?
        planned = plan_optional_pulp_action(backend_actions, repository, smart_proxy, *args)
        fail "Could not locate an action for type #{smart_proxy.backend_service_type(repository)}" unless planned
        planned
      end

      def plan_optional_pulp_action(backend_actions, repository, smart_proxy, *args)
        found_action = select_pulp_action(backend_actions, repository, smart_proxy)
        plan_action(found_action, repository, smart_proxy, *args) if found_action
      end

      def select_pulp_action(backend_actions, repository, smart_proxy)
        backend_type = smart_proxy.backend_service_type(repository)
        found_action = backend_actions.find { |action| action.backend_service_type == backend_type }
        found_action
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
katello-3.15.0.1 app/lib/actions/katello/pulp_selector.rb
katello-3.15.0 app/lib/actions/katello/pulp_selector.rb
katello-3.15.0.rc2 app/lib/actions/katello/pulp_selector.rb
katello-3.15.0.rc1.3 app/lib/actions/katello/pulp_selector.rb
katello-3.15.0.rc1.2 app/lib/actions/katello/pulp_selector.rb
katello-3.15.0.rc1.1 app/lib/actions/katello/pulp_selector.rb
katello-3.15.0.rc1 app/lib/actions/katello/pulp_selector.rb
katello-3.14.1 app/lib/actions/katello/pulp_selector.rb
katello-3.13.4 app/lib/actions/katello/pulp_selector.rb
katello-3.14.0 app/lib/actions/katello/pulp_selector.rb
katello-3.13.3 app/lib/actions/katello/pulp_selector.rb
katello-3.14.0.rc2 app/lib/actions/katello/pulp_selector.rb
katello-3.13.2 app/lib/actions/katello/pulp_selector.rb
katello-3.14.0.rc1 app/lib/actions/katello/pulp_selector.rb
katello-3.13.1 app/lib/actions/katello/pulp_selector.rb
katello-3.13.0 app/lib/actions/katello/pulp_selector.rb
katello-3.13.0.rc2.1 app/lib/actions/katello/pulp_selector.rb
katello-3.13.0.rc2 app/lib/actions/katello/pulp_selector.rb
katello-3.13.0.rc1 app/lib/actions/katello/pulp_selector.rb