class documentation

class NmapMongodbPlugin(NmapBackendPlugin): (source)

View In Hierarchy

This class handle the persistence of NmapRepport object in mongodb Implementation is made using pymongo Object of this class must be create via the BackendPluginFactory.create(**url) where url is a named dict like {'plugin_name': "mongodb"} this dict may receive all the param MongoClient() support

Method __init__ Undocumented
Method delete delete an obj from the backend :param str: id :return: dict document with result or None
Method get select a NmapReport by Id :param str: id :return: NmapReport object
Method getall return a list of tuple (id,NmapReport) saved in the backend TODO : add a filter capability
Method insert create a json object from an NmapReport instance :param NmapReport: obj to insert :return: str id
Instance Variable collection Undocumented
Instance Variable dbclient Undocumented
Instance Variable dbname Undocumented
Instance Variable store Undocumented
def __init__(self, dbname=None, store=None, **kwargs): (source)
def delete(self, report_id=None): (source)

delete an obj from the backend :param str: id :return: dict document with result or None

def get(self, str_report_id=None): (source)

select a NmapReport by Id :param str: id :return: NmapReport object

def getall(self, dict_filter=None): (source)

return a list of tuple (id,NmapReport) saved in the backend TODO : add a filter capability

def insert(self, report): (source)

create a json object from an NmapReport instance :param NmapReport: obj to insert :return: str id

collection = (source)

Undocumented

dbclient = (source)

Undocumented