The panko.api.controllers.v2.events Module¶
-
class
panko.api.controllers.v2.events.Event(**kw)¶ Bases:
panko.api.controllers.v2.base.BaseA System event.
-
event_type¶ The type of the event
-
generated¶ The time the event occurred
-
get_traits()¶
-
message_id¶ The message ID for the notification
-
raw¶ The raw copy of notification
-
classmethod
sample()¶
-
set_traits(traits)¶
-
property
traits¶ Event specific properties
-
-
class
panko.api.controllers.v2.events.EventQuery(**kw)¶ Bases:
panko.api.controllers.v2.base.QueryQuery arguments for Event Queries.
-
field¶ Name of the field to filter on. Can be either a trait name or field of an event. 1) Use start_timestamp/end_timestamp to filter on generated field. 2) Specify the ‘all_tenants=True’ query parameter to get all events for all projects, this is only allowed by admin users.
-
property
op¶
-
classmethod
sample()¶
-
type¶ the type of the trait filter, defaults to string
-
value¶ Complex type attribute definition.
Example:
class MyComplexType(wsme.types.Base): optionalvalue = int mandatoryvalue = wsattr(int, mandatory=True) named_value = wsattr(int, name='named.value')
After inspection, the non-wsattr attributes will be replaced, and the above class will be equivalent to:
class MyComplexType(wsme.types.Base): optionalvalue = wsattr(int) mandatoryvalue = wsattr(int, mandatory=True)
-
-
class
panko.api.controllers.v2.events.EventTypesController¶ Bases:
pecan.rest.RestControllerWorks on Event Types in the system.
-
get_all()¶ Get all event types.
-
get_one(event_type)¶ Unused API, will always return 404.
- Parameters
event_type – A event type
-
traits= <panko.api.controllers.v2.events.TraitsController object>¶
-
-
class
panko.api.controllers.v2.events.EventsController¶ Bases:
pecan.rest.RestControllerWorks on Events.
-
get_all(q=None, limit=None, sort=None, marker=None)¶ Return all events matching the query filters.
- Parameters
q – Filter arguments for which Events to return
limit – Maximum number of samples to be returned.
sort – A pair of sort key and sort direction combined with “:”
marker – The pagination query marker, message id of the last item viewed
-
get_one(message_id)¶ Return a single event with the given message id.
- Parameters
message_id – Message ID of the Event to be returned
-
-
class
panko.api.controllers.v2.events.Trait(**kw)¶ Bases:
panko.api.controllers.v2.base.BaseA Trait associated with an event.
-
name¶ The name of the trait
-
classmethod
sample()¶
-
type¶ the type of the trait (string, integer, float or datetime)
-
value¶ the value of the trait
-
-
class
panko.api.controllers.v2.events.TraitDescription(**kw)¶ Bases:
panko.api.controllers.v2.base.BaseA description of a trait, with no associated value.
-
name¶ the name of the trait
-
classmethod
sample()¶
-
type¶ the data type, defaults to string
-
-
class
panko.api.controllers.v2.events.TraitsController¶ Bases:
pecan.rest.RestControllerWorks on Event Traits.
-
get_all(event_type)¶ Return all trait names for an event type.
- Parameters
event_type – Event type to filter traits by
-
get_one(event_type, trait_name)¶ Return all instances of a trait for an event type.
- Parameters
event_type – Event type to filter traits by
trait_name – Trait to return values for
-