Sha256: 35447d61acc8b5ef53f1c3c749d83368d8904adfc8b764afa9184aca40ce0057

Contents?: true

Size: 1.48 KB

Versions: 22

Compression:

Stored size: 1.48 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(repositories, content_view_version, incremental = false)
          content_view = content_view_version.content_view
          filters = incremental ? [] : content_view.filters.applicable(repositories.first)

          self.new_repository = repositories.first.build_clone(content_view: content_view,
                                                               version: content_view_version)

          sequence do
            plan_action(Repository::Create, new_repository, true, false)

            repositories.each do |repository|
              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, filters)
              elsif new_repository.ostree?
                plan_action(Repository::CloneOstreeContent, repository, new_repository)
              elsif new_repository.file?
                plan_action(Repository::CloneFileContent, repository, new_repository)
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
katello-3.5.2 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.5.1.1 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.5.1 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.5.0.1 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.5.0 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.5.0.rc2 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.5.0.rc1 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.4.5 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.4.4 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.4.2 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.4.1 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.4.0.2 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.4.0.1 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.3.2 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.4.0 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.4.0.rc2 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.4.0.rc1 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.3.1.1 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.3.1 app/lib/actions/katello/repository/clone_to_version.rb
katello-3.3.0.1 app/lib/actions/katello/repository/clone_to_version.rb