The panko.storage.mongo.utils Module

The panko.storage.mongo.utils Module

Common functions for MongoDB backend

service None

Bases: object

ConnectionPool.connect(url, max_retries, retry_interval)
service None

Bases: pymongo.cursor.Cursor

service None

Bases: object

MongoProxy.create_index(keys, name=None, *args, **kwargs)[source]
MongoProxy.find(*args, **kwargs)[source]
@panko.storage.mongo.utils.make_events_query_from_filter[source]

Return start and stop row for filtering and a query.

Query is based on the selected parameter.

Parameters

event_filter – storage.EventFilter object.

@panko.storage.mongo.utils.make_timestamp_range(start, end, start_timestamp_op=None, end_timestamp_op=None)[source]

Create the query document to find timestamps within that range.

This is done by given two possible datetimes and their operations. By default, using $gte for the lower bound and $lt for the upper bound.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.