The ceilometer.event.models Module

The ceilometer.event.models Module

Model classes for use in the events storage API.

class ceilometer.event.models.Event(message_id, event_type, generated, traits, raw)[source]

Bases: ceilometer.event.models.Model

A raw event from the source system. Events have Traits.

Metrics will be derived from one or more Events.

DUPLICATE = 1
INCOMPATIBLE_TRAIT = 3
UNKNOWN_PROBLEM = 2
append_trait(trait_model)[source]
serialize()[source]
class ceilometer.event.models.Model(**kwds)[source]

Bases: object

Base class for storage API models.

as_dict()[source]
class ceilometer.event.models.Trait(name, dtype, value)[source]

Bases: ceilometer.event.models.Model

A Trait is a key/value pair of data on an Event.

The value is variant record of basic data types (int, date, float, etc).

DATETIME_TYPE = 4
FLOAT_TYPE = 3
INT_TYPE = 2
NONE_TYPE = 0
TEXT_TYPE = 1
classmethod convert_value(trait_type, value)[source]
classmethod get_name_by_type(type_id)[source]
classmethod get_type_by_name(type_name)[source]
get_type_name()[source]
classmethod get_type_names()[source]
serialize()[source]
type_names = {0: 'none', 1: 'string', 2: 'integer', 3: 'float', 4: 'datetime'}
ceilometer.event.models.serialize_dt(value)[source]

Serializes parameter if it is datetime.

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.