Class: Actions::Katello::Repository::MultiCloneToVersion
- Inherits:
-
Base
- Object
- Base
- Actions::Katello::Repository::MultiCloneToVersion
- Defined in:
- app/lib/actions/katello/repository/multi_clone_to_version.rb
Instance Method Summary collapse
- #extended_repo_mapping(repo_map, content_view, incremental) ⇒ Object
- #plan(repository_mapping, content_view_version, options = {}) ⇒ Object
Instance Method Details
#extended_repo_mapping(repo_map, content_view, incremental) ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'app/lib/actions/katello/repository/multi_clone_to_version.rb', line 17 def extended_repo_mapping(repo_map, content_view, incremental) # Example: {[source_repos] => {dest_repo: dest_repo, filters: filters}} extended_repo_map = {} repo_map.each do |source_repos, dest_repo| filters = incremental ? [] : content_view.filters.applicable(source_repos.first) extended_repo_map[source_repos] = { :dest_repo => dest_repo, :filters => filters } end extended_repo_map end |
#plan(repository_mapping, content_view_version, options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/lib/actions/katello/repository/multi_clone_to_version.rb', line 5 def plan(repository_mapping, content_view_version, = {}) incremental = .fetch(:incremental, false) content_view = content_view_version.content_view extended_repo_map = extended_repo_mapping(repository_mapping, content_view, incremental) sequence do plan_action(::Actions::Katello::Repository::MultiCloneContents, extended_repo_map, copy_contents: true, solve_dependencies: true, metadata_generate: !incremental) end end |