Common functions for MongoDB and DB2 backends
Bases: ceilometer.storage.base.Connection
Base Connection class for MongoDB and DB2 drivers.
Return all event types as an iter of strings.
Return an iter of models.Event objects.
| Parameters: | event_filter – storage.EventFilter object, consists of filters for events that are stored in database. |
|---|
Return an iterable of models.Meter instances
| Parameters: |
|
|---|
Return an iterable of model.Sample instances.
| Parameters: |
|
|---|
Return a dictionary containing the name and data type of the trait.
Only trait types for the provided event_type are returned.
| Parameters: | event_type – the type of the Event. |
|---|
Return all trait instances associated with an event_type.
If trait_type is specified, only return instances of that trait type.
| Parameters: |
|
|---|
Write the events to database.
Return a list of events of type models.Event.DUPLICATE in case of trying to write an already existing event to the database, or models.Event.UNKONW_PROBLEM in case of any failures with recording the event in the database.
| Parameters: | event_models – a list of models.Event objects. |
|---|