def generate_clauses(repo)
      manifest_tags = []

      self.docker_rules.each do |rule|
        manifest_tags.concat(query_manifests(repo, rule))
      end

      { "_id" => { "$in" => manifest_tags } } unless manifest_tags.empty?
    end
def generate_clauses(repo)
      manifest_tags = []

      self.docker_rules.each do |rule|
        manifest_tags.concat(query_manifests(repo, rule))
      end

      { "_id" => { "$in" => manifest_tags } } unless manifest_tags.empty?
    end
Returns a set of Pulp/MongoDB conditions to filter out manifests in the
 repo repository that match parameters

 @param repo [Repository] a repository containing manifests to filter
 @return [Array] an array of hashes with MongoDB conditions