The Module

The Module

SQLAlchemy storage backend.

service None


Put the event data into a SQLAlchemy database.


- EventType
  - event definition
  - { id: event type id
      desc: description of event
- Event
  - event data
  - { id: event id
      message_id: message id
      generated = timestamp of event
      event_type_id = event type ->
- TraitInt
  - int trait value
  - { event_id: event ->
      key: trait name
      value: integer value
- TraitDatetime
  - datetime trait value
  - { event_id: event ->
      key: trait name
      value: datetime value
- TraitText
  - text trait value
  - { event_id: event ->
      key: trait name
      value: text value
- TraitFloat
  - float trait value
  - { event_id: event ->
      key: trait name
      value: float value

Clear database.


Clear expired data from the backend storage system.

Clearing occurs according to the time-to-live.


ttl – Number of seconds to keep records for.

static Connection.dress_url(url)[source]

Return all event types as an iterable of strings.

Connection.get_events(event_filter, pagination=None)[source]

Return an iterable of model.Event objects.

  • event_filter – EventFilter instance

  • pagination – Pagination parameters.


Return a dictionary containing the name and data type of the trait.

Only trait types for the provided event_type are returned. :param event_type: the type of the Event

Connection.get_traits(event_type, trait_type=None)[source]

Return all trait instances associated with an event_type.

If trait_type is specified, only return instances of that trait type. :param event_type: the type of the Event to filter by :param trait_type: the name of the Trait to filter by


Write the events to SQL database via sqlalchemy.


event_models – a list of model.Event objects.


Migrate the database to version or the most recent version.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.