Submit Report

TruStar.submit_report(report)

Submit a report.

  • If report.is_enclave is True, then the report will be submitted to the enclaves identified by report.enclaves; if that field is None, then the enclave IDs registered with this TruStar object will be used.
  • If report.time_began is None, then the current time will be used.
Parameters:report – The Report object that was submitted, with the id field updated based on values from the response.

Example:

>>> report = Report(title="Suspicious Activity",
>>>                 body="We have been receiving suspicious requests from 169.178.68.63.",
>>>                 enclave_ids=["602d4795-31cd-44f9-a85d-f33cb869145a"])
>>> report = ts.submit_report(report)
>>> print((report.id))
ac6a0d17-7350-4410-bc57-9699521db992
>>> print((report.title))
Suspicious Activity