Module: Actions::Katello::CheckMatchingContent

Included in:
Repository::CloneContents, Repository::MultiCloneContents
Defined in:
app/lib/actions/katello/check_matching_content.rb

Instance Method Summary collapse

Instance Method Details

#check_matching_content(new_repository, source_repositories) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'app/lib/actions/katello/check_matching_content.rb', line 4

def check_matching_content(new_repository, source_repositories)
  check_matching_content = ::Katello::RepositoryTypeManager.find(new_repository.content_type).
  if new_repository.environment && source_repositories.count == 1 && check_matching_content
    match_check_output = plan_action(Katello::Repository::CheckMatchingContent,
                                     :source_repo_id => source_repositories.first.id,
                                     :target_repo_id => new_repository.id).output

    return match_check_output[:matching_content]
  end
  false
end