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.
-
class
openstack.telemetry.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
-
delete_alarm(alarm, ignore_missing=True)¶ Delete an alarm
Parameters: - alarm – The value can be either the ID of an alarm or a
Alarminstance. - ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the alarm does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent alarm.
Returns: None- alarm – The value can be either the ID of an alarm or a
-
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
FalseResourceNotFoundwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
Returns: One
Alarmor None
-
get_alarm(alarm)¶ Get a single alarm
Parameters: alarm – The value can be the ID of an alarm or a Alarminstance.Returns: One AlarmRaises: ResourceNotFoundwhen no resource can be found.
-
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
-
update_alarm(alarm, **attrs)¶ Update a alarm
Parameters: alarm – Either the id of a alarm or a Alarminstance.Attrs kwargs: The attributes to update on the alarm represented by value.Returns: The updated alarm Return type: Alarm
-
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
FalseResourceNotFoundwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
Returns: One
AlarmChangeor 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:
-
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
FalseResourceNotFoundwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
Returns: One
Capabilityor 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
-
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
FalseResourceNotFoundwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
Returns: One
Meteror 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
-
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
FalseResourceNotFoundwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
Returns: One
Resourceor None
-
get_resource(resource)¶ Get a single resource
Parameters: resource – The value can be the ID of a resource or a Resourceinstance.Returns: One ResourceRaises: ResourceNotFoundwhen no resource can be found.
-
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
-
create_sample(**attrs)¶ Create a new sample from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a Sample, comprised of the properties on the Sample class.Returns: The results of sample creation Return type: Sample
-
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
FalseResourceNotFoundwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
Returns: One
Sampleor 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:
-
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
FalseResourceNotFoundwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
Returns: One
Statisticsor 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:
-