puppetlabs/puppetdb — pull request #758 by kbarber (2013-11-17 01:13:38+00:00)
Title: PDB-85 Fix report export format

Three new parameters were added to the events end-point that were really
derived from the report of the event, and so aren't necessary for later
injection via import.

This was blocking anonymization and import from working as expected. This patch
ensures those parameters are stripped from the export correctly.

This bug wasn't seen because our tests do not always generate events, so
the invalid parameters never surfaced. As a safety guard for future
generations I've made sure that all the places that look like they could
do with some report events, I've ensured these exist now - even if they
probably haven't got any issues it seems like the correct thing to do
here.

To aid in this endeavour I've backported Ryan Seniors' two methods:

- run_agents_with_new_site_pp
- create_remote_site_pp

Since this setup was becoming quite common, this helped cleanup some of
our existing code as well.

Signed-off-by: Ken Barber