Sha256: 0fb9dcbe3e27a184de823e1a40928a0a5c29dc9549886f49f9fbeb41e109384c

Contents?: true

Size: 710 Bytes

Versions: 9

Compression:

Stored size: 710 Bytes

Contents

module Actions
  module Pulp
    module Repository
      class Refresh < Pulp::AbstractAsyncTask
        def plan(repository, options = {})
          options[:capsule_id] ||= SmartProxy.default_capsule!.id
          plan_self(:capsule_id => options[:capsule_id], :pulp_id => repository.pulp_id)
        end

        def invoke_external_task
          repo = ::Katello::Repository.find_by(:pulp_id => input[:pulp_id])
          if repo.nil?
            repo = ::Katello::ContentViewPuppetEnvironment.find_by(:pulp_id => input[:pulp_id])
            repo = repo.nonpersisted_repository
          end
          repo.backend_service(smart_proxy(input[:capsule_id])).refresh
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
katello-3.13.4 app/lib/actions/pulp/repository/refresh.rb
katello-3.13.3 app/lib/actions/pulp/repository/refresh.rb
katello-3.13.2 app/lib/actions/pulp/repository/refresh.rb
katello-3.14.0.rc1 app/lib/actions/pulp/repository/refresh.rb
katello-3.13.1 app/lib/actions/pulp/repository/refresh.rb
katello-3.13.0 app/lib/actions/pulp/repository/refresh.rb
katello-3.13.0.rc2.1 app/lib/actions/pulp/repository/refresh.rb
katello-3.13.0.rc2 app/lib/actions/pulp/repository/refresh.rb
katello-3.13.0.rc1 app/lib/actions/pulp/repository/refresh.rb