tardis.plugins.auditor module
- class tardis.plugins.auditor.Auditor[source]
Bases:
Plugin
The
Auditor
plugin is a collector for the accounting tool Auditor. It sends accounting information of individual drones to an Auditor instance. The records contain information about the provided resources of the drones as well as start and stop times. When a drone enters AvailableState, a record with the start time set to the time it went into this state is stored in the Auditor database. The stop time remains empty until the drone goes into DownState. The Auditor plugin does not keep any state.- construct_record(resource_attributes: AttributeDict)[source]
Constructs a record from
resource_attributes
.- Parameters
resource_attributes (AttributeDict) – Contains all meta-data of the Drone (created and updated timestamps, dns name, unique id, site_name, machine_type, etc.)
- Returns
Record
- async notify(state: State, resource_attributes: AttributeDict) None [source]
Pushes a record to an Auditor instance when the drone is in state AvailableState or DownState.
- Parameters
state (State) – New state of the Drone
resource_attributes (AttributeDict) – Contains all meta-data of the Drone (created and updated timestamps, dns name, unique id, site_name, machine_type, etc.)
- Returns
None