Telemetry API

Telemetry API

Caution

BETA: This API is a work in progress and is subject to change.

For details on how to use telemetry, see Using OpenStack Telemetry

The Telemetry Class

The telemetry high-level interface is available through the telemetry member of a Connection object. The telemetry member will only be added if the service is detected.

Sample Operations

class openstack.telemetry.v2._proxy.Proxy(session)

Caution

This API is a work in progress and is subject to change.

find_sample(name_or_id, ignore_missing=True)

Find a single sample

Parameters:
  • name_or_id – The name or ID of a sample.
  • ignore_missing (bool) – When set to False ResourceNotFound will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
Returns:

One Sample or None

samples(meter, **query)

Return a generator of samples

Parameters:
  • value – Meter resource or name for a meter.
  • **query (kwargs) – Optional query parameters to be sent to limit the resources being returned.
Returns:

A generator of sample objects

Return type:

Sample

Statistic Operations

class openstack.telemetry.v2._proxy.Proxy(session)

Caution

This API is a work in progress and is subject to change.

find_statistics(name_or_id, ignore_missing=True)

Find a single statistics

Parameters:
  • name_or_id – The name or ID of a statistics.
  • ignore_missing (bool) – When set to False ResourceNotFound will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
Returns:

One Statistics or None

statistics(meter, **query)

Return a generator of statistics

Parameters:
  • meter – Meter resource or name for a meter.
  • **query (kwargs) – Optional query parameters to be sent to limit the resources being returned.
Returns:

A generator of statistics objects

Return type:

Statistics

Resource Operations

class openstack.telemetry.v2._proxy.Proxy(session)

Caution

This API is a work in progress and is subject to change.

get_resource(resource)

Get a single resource

Parameters:resource – The value can be the ID of a resource or a Resource instance.
Returns:One Resource
Raises:ResourceNotFound when no resource can be found.
find_resource(name_or_id, ignore_missing=True)

Find a single resource

Parameters:
  • name_or_id – The name or ID of a resource.
  • ignore_missing (bool) – When set to False ResourceNotFound will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
Returns:

One Resource or None

resources(**query)

Return a generator of resources

Parameters:**query (kwargs) – Optional query parameters to be sent to limit the resources being returned.
Returns:A generator of resource objects
Return type:Resource

Meter Operations

class openstack.telemetry.v2._proxy.Proxy(session)

Caution

This API is a work in progress and is subject to change.

find_meter(name_or_id, ignore_missing=True)

Find a single meter

Parameters:
  • name_or_id – The name or ID of a meter.
  • ignore_missing (bool) – When set to False ResourceNotFound will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
Returns:

One Meter or None

meters(**query)

Return a generator of meters

Parameters:**query (kwargs) – Optional query parameters to be sent to limit the resources being returned.
Returns:A generator of meter objects
Return type:Meter

Capability Operations

class openstack.telemetry.v2._proxy.Proxy(session)

Caution

This API is a work in progress and is subject to change.

find_capability(name_or_id, ignore_missing=True)

Find a single capability

Parameters:
  • name_or_id – The name or ID of a capability.
  • ignore_missing (bool) – When set to False ResourceNotFound will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
Returns:

One Capability or None

capabilities(**query)

Return a generator of capabilities

Parameters:**query (kwargs) – Optional query parameters to be sent to limit the resources being returned.
Returns:A generator of capability objects
Return type:Capability

The Alarm Class

The alarm high-level interface is available through the telemetry.alarm member of a Connection object. The telemetry.alarm member will only be added if the service is detected.

Alarm Operations

class openstack.telemetry.alarm.v2._proxy.Proxy(session)

Caution

This API is a work in progress and is subject to change.

create_alarm(**attrs)

Create a new alarm from attributes

Parameters:attrs (dict) – Keyword arguments which will be used to create a Alarm, comprised of the properties on the Alarm class.
Returns:The results of alarm creation
Return type:Alarm
update_alarm(alarm, **attrs)

Update a alarm

Parameters:alarm – Either the id of a alarm or a Alarm instance.
Attrs kwargs:The attributes to update on the alarm represented by value.
Returns:The updated alarm
Return type:Alarm
delete_alarm(alarm, ignore_missing=True)

Delete an alarm

Parameters:
  • alarm – The value can be either the ID of an alarm or a Alarm instance.
  • ignore_missing (bool) – When set to False ResourceNotFound will be raised when the alarm does not exist. When set to True, no exception will be set when attempting to delete a nonexistent alarm.
Returns:

None

get_alarm(alarm)

Get a single alarm

Parameters:alarm – The value can be the ID of an alarm or a Alarm instance.
Returns:One Alarm
Raises:ResourceNotFound when no resource can be found.
find_alarm(name_or_id, ignore_missing=True)

Find a single alarm

Parameters:
  • name_or_id – The name or ID of a alarm.
  • ignore_missing (bool) – When set to False ResourceNotFound will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
Returns:

One Alarm or None

alarms(**query)

Return a generator of alarms

Parameters:**query (kwargs) – Optional query parameters to be sent to limit the resources being returned.
Returns:A generator of alarm objects
Return type:Alarm

Alarm Change Operations

class openstack.telemetry.alarm.v2._proxy.Proxy(session)

Caution

This API is a work in progress and is subject to change.

find_alarm_change(name_or_id, ignore_missing=True)

Find a single alarm change

Parameters:
  • name_or_id – The name or ID of a alarm change.
  • ignore_missing (bool) – When set to False ResourceNotFound will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
Returns:

One AlarmChange or None

alarm_changes(alarm, **query)

Return a generator of alarm changes

Parameters:
  • alarm – Alarm resource or id for alarm.
  • **query (kwargs) – Optional query parameters to be sent to limit the resources being returned.
Returns:

A generator of alarm change objects

Return type:

AlarmChange

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.