The ceilometer.storage.impl_test Module

In-memory storage driver for use with tests.

This driver is based on MIM, an in-memory version of MongoDB.

class ceilometer.storage.impl_test.TestConnection(conf)[source]

Bases: ceilometer.storage.impl_mongodb.Connection

clear()[source]
class ceilometer.storage.impl_test.TestDBStorage[source]

Bases: ceilometer.storage.base.StorageEngine

Put the data into an in-memory database for testing

This driver is based on MIM, an in-memory version of MongoDB.

Collections:

- user
  - { _id: user id
      source: [ array of source ids reporting for the user ]
      }
- project
  - { _id: project id
      source: [ array of source ids reporting for the project ]
      }
- meter
  - the raw incoming data
- resource
  - the metadata for resources
  - { _id: uuid of resource,
      metadata: metadata dictionaries
      timestamp: datetime of last update
      user_id: uuid
      project_id: uuid
      meter: [ array of {counter_name: string, counter_type: string,
                         counter_unit: string} ]
    }
get_connection(conf)[source]

Return a Connection instance based on the configuration settings.

register_opts(conf)[source]

Register any configuration options used by this engine.

Previous topic

The ceilometer.storage.impl_sqlalchemy Module

Next topic

The ceilometer.storage.sqlalchemy.migrate_repo.manage Module

This Page