modules.reporting.mongodb.MongoDB

Package modules :: Package reporting :: Module mongodb :: Class MongoDB |
[hide private]
[frames] | no frames]

# Class MongoDB

source code

                            object --+
                                     |
    lib.cuckoo.common.abstracts.Report --+
                                         |
                                        MongoDB

Stores report in MongoDB.

Instance Methods | [hide private]
connect(self) Connects to Mongo database, loads options and set connectors. | source code
store_file(self, file_obj, filename="") Store a file in GridFS. | source code
run(self, results) Writes report. | source code
Inherited from `lib.cuckoo.common.abstracts.Report`: `__init__`, `set_options`, `set_path`, `set_task` Inherited from `lib.cuckoo.common.abstracts.Report` (private): `_get_analysis_path` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables | [hide private]
| SCHEMA_VERSION = `"1"`
Inherited from `lib.cuckoo.common.abstracts.Report`: `order`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### connect(self) | source code
Connects to Mongo database, loads options and set connectors. Raises: `CuckooReportError` - if unable to connect.

### store_file(self, file_obj, filename="") | source code
Store a file in GridFS. Parameters: `file_obj` - object to the file to store `filename` - name of the file to store Returns: object id of the stored file

### run(self, results) | source code
Writes report. Parameters: `results` - analysis results dictionary. Raises: `CuckooReportError` - if fails to connect or write to MongoDB. Overrides: lib.cuckoo.common.abstracts.Report.run