The aodh.api.controllers.v2.query Module

class aodh.api.controllers.v2.query.ComplexQuery(**kw)[source]

Bases: aodh.api.controllers.v2.base.Base

Holds a sample query encoded in json.

classmethod sample()[source]
class aodh.api.controllers.v2.query.QueryAlarmHistoryController[source]

Bases: pecan.rest.RestController

Provides complex query possibilities for alarm history.

post(*args, **kwargs)[source]

Define query for retrieving AlarmChange data.

Parameters:body – Query rules for the alarm history to be returned.
class aodh.api.controllers.v2.query.QueryAlarmsController[source]

Bases: pecan.rest.RestController

Provides complex query possibilities for alarms.

post(*args, **kwargs)[source]

Define query for retrieving Alarm data.

Parameters:body – Query rules for the alarms to be returned.
class aodh.api.controllers.v2.query.QueryController[source]

Bases: pecan.rest.RestController

class aodh.api.controllers.v2.query.ValidatedComplexQuery(query, db_model, additional_name_mapping=None, metadata_allowed=False)[source]

Bases: object

static lowercase_keys(mapping)[source]

Converts the values of the keys in mapping to lowercase.

static lowercase_values(mapping)[source]

Converts the values in the mapping dict to lowercase.

validate(visibility_field)[source]

Validates the query content and does the necessary conversions.