Sha256: af43648af20ed43998b8a73bef6584e97df1e20da63d449263b01f43ead67384

Contents?: true

Size: 1.07 KB

Versions: 17

Compression:

Stored size: 1.07 KB

Contents

module Actions
  module Pulp3
    module CapsuleContent
      class ReclaimSpace < Pulp3::AbstractAsyncTask
        def plan(smart_proxy)
          if smart_proxy.pulp_primary?
            repository_hrefs = ::Katello::Pulp3::RepositoryReference.default_cv_repository_hrefs(::Katello::Repository.unscoped.on_demand, ::Organization.all)
            repository_hrefs.flatten!
          else
            if smart_proxy.download_policy != ::Katello::RootRepository::DOWNLOAD_ON_DEMAND
              fail _('Only On Demand smart proxies may have space reclaimed.')
            end
            repository_hrefs = ::Katello::Pulp3::Api::Core.new(smart_proxy).core_repositories_list_all(fields: 'pulp_href').map(&:pulp_href)
          end
          plan_self(repository_hrefs: repository_hrefs, smart_proxy_id: smart_proxy.id)
        end

        def invoke_external_task
          output[:pulp_tasks] = ::Katello::Pulp3::Api::Core.new(SmartProxy.find(input[:smart_proxy_id])).
            repositories_reclaim_space_api.reclaim(repo_hrefs: input[:repository_hrefs])
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
katello-4.4.2.2 app/lib/actions/pulp3/capsule_content/reclaim_space.rb
katello-4.4.2.1 app/lib/actions/pulp3/capsule_content/reclaim_space.rb
katello-4.4.2 app/lib/actions/pulp3/capsule_content/reclaim_space.rb
katello-4.5.1 app/lib/actions/pulp3/capsule_content/reclaim_space.rb
katello-4.5.0 app/lib/actions/pulp3/capsule_content/reclaim_space.rb
katello-4.5.0.rc2 app/lib/actions/pulp3/capsule_content/reclaim_space.rb
katello-4.4.1 app/lib/actions/pulp3/capsule_content/reclaim_space.rb
katello-4.5.0.rc1 app/lib/actions/pulp3/capsule_content/reclaim_space.rb
katello-4.4.0.2 app/lib/actions/pulp3/capsule_content/reclaim_space.rb
katello-4.4.0.1 app/lib/actions/pulp3/capsule_content/reclaim_space.rb
katello-4.3.1 app/lib/actions/pulp3/capsule_content/reclaim_space.rb
katello-4.4.0 app/lib/actions/pulp3/capsule_content/reclaim_space.rb
katello-4.4.0.rc2 app/lib/actions/pulp3/capsule_content/reclaim_space.rb
katello-4.4.0.rc1 app/lib/actions/pulp3/capsule_content/reclaim_space.rb
katello-4.3.0 app/lib/actions/pulp3/capsule_content/reclaim_space.rb
katello-4.3.0.rc4 app/lib/actions/pulp3/capsule_content/reclaim_space.rb
katello-4.3.0.rc3 app/lib/actions/pulp3/capsule_content/reclaim_space.rb