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.impl_mongodb.Connection Class Reference
Inheritance diagram for panko.storage.impl_mongodb.Connection:
[legend]
Collaboration diagram for panko.storage.impl_mongodb.Connection:
[legend]

Public Member Functions

def __init__ (self, url, conf)
  More...
 
def upgrade (self)
  More...
 
def clear (self)
  More...
 
def clear_expired_data (self, ttl, max_count=None)
  More...
 
- Public Member Functions inherited from panko.storage.pymongo_base.Connection
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 Member Functions

def update_ttl (ttl, ttl_index_name, index_field, coll)
  More...
 

Public Attributes

 conn
  More...
 
 db
  More...
 

Static Public Attributes

 CONNECTION_POOL = pymongo_utils.ConnectionPool()
 
- Static Public Attributes inherited from panko.storage.pymongo_base.Connection
 CAPABILITIES
  More...
 
 STORAGE_CAPABILITIES
  More...
 
- Static Public Attributes inherited from panko.storage.base.Connection
dictionary CAPABILITIES
  More...
 
dictionary STORAGE_CAPABILITIES
  More...
 

Detailed Description

Put the event data into a MongoDB database.

Definition at line 25 of file impl_mongodb.py.

Constructor & Destructor Documentation

◆ __init__()

def panko.storage.impl_mongodb.Connection.__init__ (   self,
  url,
  conf 
)

Member Function Documentation

◆ clear()

◆ clear_expired_data()

def panko.storage.impl_mongodb.Connection.clear_expired_data (   self,
  ttl,
  max_count = None 
)
Clear expired data from the backend storage system.

Clearing occurs according to the time-to-live.

:param ttl: Number of seconds to keep records for.
:param max_count: Number of records to delete (not used for MongoDB).

Reimplemented from panko.storage.base.Connection.

Definition at line 99 of file impl_mongodb.py.

References panko.storage.impl_mongodb.Connection.clear_expired_data(), panko.storage.impl_mongodb.Connection.db, and panko.storage.impl_mongodb.Connection.update_ttl().

Referenced by panko.storage.impl_mongodb.Connection.clear_expired_data().

◆ update_ttl()

def panko.storage.impl_mongodb.Connection.update_ttl (   ttl,
  ttl_index_name,
  index_field,
  coll 
)
static
Update or create time_to_live indexes.

:param ttl: time to live in seconds.
:param ttl_index_name: name of the index we want to update or create.
:param index_field: field with the index that we need to update.
:param coll: collection which indexes need to be updated.

Definition at line 57 of file impl_mongodb.py.

References panko.storage.impl_mongodb.Connection.update_ttl().

Referenced by panko.storage.impl_mongodb.Connection.clear_expired_data(), and panko.storage.impl_mongodb.Connection.update_ttl().

◆ upgrade()

def panko.storage.impl_mongodb.Connection.upgrade (   self)
Migrate the database to `version` or the most recent version.

Reimplemented from panko.storage.base.Connection.

Definition at line 81 of file impl_mongodb.py.

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


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