nedap/pypuppetdb — pull request #27 by daniellawrence (2014-03-05 11:19:40+00:00)
Title: Allow easy access to events from report object

Calling Report.events() will return a generator of all the events
belonging to the report.

Example of printing all the events for the last report of node 'node.example.com'
```python
db = pypuppetdb.connect(host='puppetdb')
node = db.node('node.example.com')
for report in node.reports():
for event in report.events():
print event
break
```
---
Practical example from puppetboard
```python
...
reports = puppetdb.reports('["=", "certname", "{0}"]'.format(node))

for report in reports:
if report.hash_ == report_id:
events = report.events()
return render_template(
'report.html',
report=report,
events=yield_or_stop(events))
```

Let me know if I am on the right track :train2: