The ceilometer.alarm.storage.base ModuleΒΆ

Base classes for storage engines

class ceilometer.alarm.storage.base.Connection(url)[source]

Bases: object

Base class for alarm storage system connections.

static Connection.clear()[source]

Clear database.

static Connection.create_alarm(alarm)[source]

Create an alarm. Returns the alarm as created.

Parameters:alarm – The alarm to create.
static Connection.delete_alarm(alarm_id)[source]

Delete an alarm.

static Connection.get_alarm_changes(alarm_id, on_behalf_of, user=None, project=None, type=None, start_timestamp=None, start_timestamp_op=None, end_timestamp=None, end_timestamp_op=None)[source]

Yields list of AlarmChanges describing alarm history

Changes are always sorted in reverse order of occurrence, given the importance of currency.

Segregation for non-administrative users is done on the basis of the on_behalf_of parameter. This allows such users to have visibility on both the changes initiated by themselves directly (generally creation, rule changes, or deletion) and also on those changes initiated on their behalf by the alarming service (state transitions after alarm thresholds are crossed).

Parameters:
  • alarm_id – ID of alarm to return changes for
  • on_behalf_of – ID of tenant to scope changes query (None for administrative user, indicating all projects)
  • user – Optional ID of user to return changes for
  • project – Optional ID of project to return changes for
  • start_timestamp – Optional modified timestamp start range
  • start_timestamp_op – Optional timestamp start range operation
  • end_timestamp – Optional modified timestamp end range
  • end_timestamp_op – Optional timestamp end range operation
Project type:

Optional change type

static Connection.get_alarms(name=None, user=None, state=None, meter=None, project=None, enabled=None, alarm_id=None, pagination=None)[source]

Yields a lists of alarms that match filters.

classmethod Connection.get_capabilities()[source]

Return an dictionary with the capabilities of each driver.

classmethod Connection.get_storage_capabilities()[source]

Return a dictionary representing the performance capabilities.

This is needed to evaluate the performance of each driver.

static Connection.query_alarm_history(filter_expr=None, orderby=None, limit=None)[source]

Return an iterable of model.AlarmChange objects.

Parameters:
  • filter_expr – Filter expression for query.
  • orderby – List of field name and direction pairs for order by.
  • limit – Maximum number of results to return.
static Connection.query_alarms(filter_expr=None, orderby=None, limit=None)[source]

Return an iterable of model.Alarm objects.

Parameters:
  • filter_expr – Filter expression for query.
  • orderby – List of field name and direction pairs for order by.
  • limit – Maximum number of results to return.
static Connection.record_alarm_change(alarm_change)[source]

Record alarm change event.

static Connection.update_alarm(alarm)[source]

Update alarm.

static Connection.upgrade()[source]

Migrate the database to version or the most recent version.

Previous topic

The ceilometer.alarm.storage Module

Next topic

The ceilometer.alarm.storage.impl_log Module

This Page