Sha256: 5fa31361f487b89339a592509a8862d0439c483e7befbaa8b79f50ab1467e1ac

Contents?: true

Size: 1.24 KB

Versions: 13

Compression:

Stored size: 1.24 KB

Contents

module Actions
  module Katello
    module Repository
      class CloneToVersion < Actions::Base
        # allows accessing the build object from the superior action
        attr_accessor :new_repository

        def plan(repository, content_view_version, incremental = false)
          content_view = content_view_version.content_view
          filters = incremental ? [] : content_view.filters.applicable(repository)
          self.new_repository = repository.build_clone(content_view: content_view,
                                                       version: content_view_version)
          sequence do
            plan_action(Repository::Create, new_repository, true, false)

            if new_repository.yum?
              plan_action(Repository::CloneYumContent, repository, new_repository, filters, !incremental,
                          :generate_metadata => !incremental, :index_content => !incremental, :simple_clone => incremental)
            elsif new_repository.docker?
              plan_action(Repository::CloneDockerContent, repository, new_repository)
            elsif new_repository.ostree?
              plan_action(Repository::CloneOstreeContent, repository, new_repository)
            end
          end
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
katello-3.1.0.1 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.1.0 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.1.0.rc2.1 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.0.2 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.1.0.rc1 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.0.1 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.0.0 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.0.0.rc7 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.0.0.rc5 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.0.0.rc4 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.0.0.rc3 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.0.0.rc2 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.0.0.rc1 app/lib/actions/katello/repository/clone_to_version.rb