class documentation

class msiempy.device.DataSource(NitroDict): (source)

View In Hierarchy

Dict-Like object.

DataSources are best instantiated from DevTree:

>>> dt = DevTree()
>>> ds = dt[25]
# OR use search()
>>> ds = dt.search('10.10.1.1')
Dict keys:
  • name (str): name of the datasource
  • ds_ip (str): IP of the datasource
  • hostname (str): hostname for the datasource
  • ds_id (str): internal datasource ID (e.g 144234544545444)
  • type_id (str): numeric internal datasource type id
  • desc_id (str): always '3' a datasource or '254' for a client
  • parent_id (str): internal ds_id for the parent device
  • parent_name (str): name of the parent device
  • enabled (str): 'T' or 'F'
  • client (bool): Client datasource or not
  • zone_id (str): numeric zone_id
  • zone_name (str): name of the zone
  • tz_id (str): internal numeric timezone ID
  • vendor (str): vendor of datasource (e.g. Microsoft)
  • model (str): model of datasource (e.g. Windows)
  • require_tls (str): Use syslog over TLS
  • url (str): URL of the datasource
Method __init__ Create a new DataSource, best instantiated from DevTree.
Method data_from_id Gets full of the DataSource parameters
Method load_details DataSource object is lazy. This gets the rest of the parameters.
Method refresh Gets the detailed parameters. Same as load_details
Method delete Delete the datasource, be careful.
Method delete_client Delete the datasource's clients, be careful.
Method get_id Returns the Datasource ID.
Method _map_parameters Map the internal ESM field names to msiempy style

Inherited from NitroDict:

Instance Variable data Underlying dict object
Method __str__ str(obj) -> return text string.
Method __repr__ repr(obj) -> return json string.
Method json JSON representation of a item
Method text Text list of item's values

Inherited from NitroObject (via NitroDict):

Class NitroJSONEncoder Custom JSON encoder that will use the approprtiate propertie depending of the type of NitroObject. TODO support json json dumping of QueryFilers, may be by making them inherits from NitroDict.
Instance Variable nitro msiempy.core.session.NitroSession object. Interface to the SIEM.
def __init__(self, *args, **kwargs): (source)

Create a new DataSource, best instantiated from DevTree.

Arguments:
def data_from_id(self, id): (source)
Gets full of the DataSource parameters
def load_details(self): (source)
DataSource object is lazy. This gets the rest of the parameters.
def refresh(self): (source)
Gets the detailed parameters. Same as load_details
def delete(self): (source)

Delete the datasource, be careful.

Warning:
Deletes the datasource and all the data
def delete_client(self): (source)

Delete the datasource's clients, be careful.

Warning:
Deletes the datasource's clients and all the data
def _map_parameters(self, p): (source)

Map the internal ESM field names to msiempy style

Arguments:
  • p (dict): datasource parameters
def get_id(self): (source)
Returns the Datasource ID.
API Documentation for msiempy, generated by pydoctor 20.7.1 at 2020-11-17 04:28:54.