python: bindings for struct sr_operating_system

Needed for #86.

Signed-off-by: Martin Milata <mmilata@redhat.com>
Signed-off-by: Richard Marko <rmarko@redhat.com>
python: bindings for struct sr_rpm_package

Needed for #86.

Signed-off-by: Martin Milata <mmilata@redhat.com>
Signed-off-by: Richard Marko <rmarko@redhat.com>
Minor json parsing refactorization

Avoid some code repetition, fix a memory leak.

Related to #86.

Signed-off-by: Martin Milata <mmilata@redhat.com>
Signed-off-by: Richard Marko <rmarko@redhat.com>
report: function for parsing json text

Needed for #86.

Signed-off-by: Martin Milata <mmilata@redhat.com>
Signed-off-by: Richard Marko <rmarko@redhat.com>
Helpers for converting report type to/from string

Needed for #86.

Signed-off-by: Martin Milata <mmilata@redhat.com>
Signed-off-by: Richard Marko <rmarko@redhat.com>
report: use generic stacktrace type

Makes it possible to simplify some code and the structure won't have to
be extended when adding new stacktrace type.

Related to #86.

Signed-off-by: Martin Milata <mmilata@redhat.com>
Signed-off-by: Richard Marko <rmarko@redhat.com>
python: factor out stacktrace object creation

The code is repeated at least two times and we'll need it once again.
It is still essentially the same for all four stacktrace types and could
probably be rewritten in a generic way but I'd rather not do it now for
the sake of size of this patchset.

Related to #86.

Signed-off-by: Martin Milata <mmilata@redhat.com>
Signed-off-by: Richard Marko <rmarko@redhat.com>
python: bindings for struct sr_report

Closes #86 and closes #92.

Signed-off-by: Richard Marko <rmarko@redhat.com>

rmarko: fixed whitespace errors in tests/json_files/ureport-1