panko  8.1.0
About: OpenStack Panko is an event storage service and REST API for Ceilometer.
The "Ussuri" series (maintained release).
  Fossies Dox: panko-8.1.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

panko.storage.pymongo_base.Connection Class Reference
Inheritance diagram for panko.storage.pymongo_base.Connection:
[legend]
Collaboration diagram for panko.storage.pymongo_base.Connection:
[legend]

Public Member Functions

def record_events (self, event_models)
  More...
 
def get_events (self, event_filter, pagination=None)
  More...
 
def get_event_types (self)
  More...
 
def get_trait_types (self, event_type)
  More...
 
def get_traits (self, event_type, trait_name=None)
  More...
 
- Public Member Functions inherited from panko.storage.base.Connection
def get_capabilities (cls)
  More...
 
def get_storage_capabilities (cls)
  More...
 

Static Public Attributes

 CAPABILITIES
  More...
 
 STORAGE_CAPABILITIES
  More...
 
- Static Public Attributes inherited from panko.storage.base.Connection
dictionary CAPABILITIES
  More...
 
dictionary STORAGE_CAPABILITIES
  More...
 

Additional Inherited Members

- Static Public Member Functions inherited from panko.storage.base.Connection
def __init__ (url, conf)
  More...
 
def upgrade ()
  More...
 
def clear ()
  More...
 
def clear_expired_data (ttl, max_count=None)
  More...
 

Detailed Description

Base event Connection class for MongoDB driver.

Definition at line 36 of file pymongo_base.py.

Member Function Documentation

◆ get_event_types()

def panko.storage.pymongo_base.Connection.get_event_types (   self)
Return all event types as an iter of strings.

Reimplemented from panko.storage.base.Connection.

Definition at line 103 of file pymongo_base.py.

References panko.storage.impl_mongodb.Connection.db, and panko.storage.base.Connection.get_event_types().

◆ get_events()

def panko.storage.pymongo_base.Connection.get_events (   self,
  event_filter,
  pagination = None 
)
Return an iter of models.Event objects.

:param event_filter: storage.EventFilter object, consists of filters
                     for events that are stored in database.
:param pagination: Pagination parameters.

Reimplemented from panko.storage.base.Connection.

Definition at line 73 of file pymongo_base.py.

References panko.storage.impl_mongodb.Connection.db, and panko.storage.pymongo_base.Connection.get_events().

Referenced by panko.storage.impl_sqlalchemy.Connection._get_pagination_query(), and panko.storage.pymongo_base.Connection.get_events().

◆ get_trait_types()

def panko.storage.pymongo_base.Connection.get_trait_types (   self,
  event_type 
)
Return a dictionary containing the name and data type of the trait.

Only trait types for the provided event_type are returned.

:param event_type: the type of the Event.

Reimplemented from panko.storage.base.Connection.

Definition at line 107 of file pymongo_base.py.

References panko.storage.impl_mongodb.Connection.db, and panko.storage.pymongo_base.Connection.get_trait_types().

Referenced by panko.storage.impl_elasticsearch.Connection.get_events(), panko.storage.pymongo_base.Connection.get_trait_types(), and panko.storage.impl_elasticsearch.Connection.get_traits().

◆ get_traits()

def panko.storage.pymongo_base.Connection.get_traits (   self,
  event_type,
  trait_name = None 
)
Return all trait instances associated with an event_type.

If trait_type is specified, only return instances of that trait type.

:param event_type: the type of the Event to filter by
:param trait_name: the name of the Trait to filter by

Reimplemented from panko.storage.base.Connection.

Definition at line 129 of file pymongo_base.py.

References panko.storage.impl_mongodb.Connection.db, and panko.storage.pymongo_base.Connection.get_traits().

Referenced by panko.storage.pymongo_base.Connection.get_traits().

◆ record_events()

def panko.storage.pymongo_base.Connection.record_events (   self,
  event_models 
)
Write the events to database.

:param event_models: a list of models.Event objects.

Reimplemented from panko.storage.base.Connection.

Definition at line 46 of file pymongo_base.py.

References panko.storage.impl_mongodb.Connection.db, and panko.storage.pymongo_base.Connection.record_events().

Referenced by panko.storage.pymongo_base.Connection.record_events().

Member Data Documentation

◆ CAPABILITIES

panko.storage.pymongo_base.Connection.CAPABILITIES
static
Initial value:
= utils.update_nested(base.Connection.CAPABILITIES,
COMMON_AVAILABLE_CAPABILITIES)

Definition at line 38 of file pymongo_base.py.

Referenced by panko.storage.base.Connection.get_capabilities().

◆ STORAGE_CAPABILITIES

panko.storage.pymongo_base.Connection.STORAGE_CAPABILITIES
static
Initial value:
= utils.update_nested(
base.Connection.STORAGE_CAPABILITIES,
AVAILABLE_STORAGE_CAPABILITIES,
)

Definition at line 41 of file pymongo_base.py.

Referenced by panko.storage.base.Connection.get_storage_capabilities().


The documentation for this class was generated from the following file: