hpeOneView.resources.data_services package

Submodules

hpeOneView.resources.data_services.metric_streaming module

class hpeOneView.resources.data_services.metric_streaming.MetricStreaming(con)[source]

Bases: object

Metrics API client.

Metrics can be relayed from OneView for managed resources at a specified interval. The following steps can be followed to enable the metric relay in OneView:

  • Get the list of resource types and metrics which can be configured for live streaming

  • Configure the live metric stream in OneView

  • Receive the stream of metric on MSMB

The list below describes the structure of message relayed to MSMB:
startTime (str):

The starting time of the metric collection.

sampleIntervalInSeconds (int):

Interval between samples.

numberOfSamples (int):

Number of samples in the list for each metric type.

resourceType (str):

Identifies the resource type.

resourceDataList (list):

Metric sample list.

uri (str):

Canonical URI of the resource.

category (str):

Identifies the category of resource. The supported devices are server-hardware, enclosures, and power-devices.

created (timestamp):

Date and time when the resource was created.

modified (timestamp):

Date and time when the resource was last modified.

eTag (str):

Entity tag/version ID of the resource, the same value that is returned in the ETag header on a GET of the resource.

type (str):

Uniquely identifies the type of the JSON object.

URI = '/rest/metrics'
get_capability()[source]

Fetches the list of resource types and supported metrics that OneView is capable of relaying.

Returns

List of resource types and supported metrics.

Return type

list

get_configuration()[source]

Fetches the current configuration for which metrics are being relayed.

Returns

List of objects which contain frequency, sample interval, and source type for each resource-type.

Return type

list

update_configuration(configuration)[source]

Updates the metrics configuration with the new values. Overwrites the existing configuration.

Parameters

configuration (dict) – Dictionary with a list of objects which contain frequency, sample interval, and source type for each resource-type.

Returns

The current configuration for which metrics are being relayed.

Return type

dict

Module contents