cinderlib.persistence package¶
Submodules¶
- cinderlib.persistence.base module
DB
PersistenceDriverBase
PersistenceDriverBase.db
PersistenceDriverBase.delete_connection()
PersistenceDriverBase.delete_key_value()
PersistenceDriverBase.delete_snapshot()
PersistenceDriverBase.delete_volume()
PersistenceDriverBase.get_changed_fields()
PersistenceDriverBase.get_connections()
PersistenceDriverBase.get_fields()
PersistenceDriverBase.get_key_values()
PersistenceDriverBase.get_snapshots()
PersistenceDriverBase.get_volumes()
PersistenceDriverBase.reset_change_tracker()
PersistenceDriverBase.set_connection()
PersistenceDriverBase.set_key_value()
PersistenceDriverBase.set_snapshot()
PersistenceDriverBase.set_volume()
vol_type_to_dict()
Module contents¶
- setup(config)[source]¶
Setup persistence to be used in cinderlib.
By default memory persistance will be used, but there are other mechanisms available and other ways to use custom mechanisms:
Persistence plugins: Plugin mechanism uses Python entrypoints under namespace cinderlib.persistence.storage, and cinderlib comes with 3 different mechanisms, “memory”, “dbms”, and “memory_dbms”. To use any of these one must pass the string name in the storage parameter and any other configuration as keyword arguments.
Passing a class that inherits from PersistenceDriverBase as storage parameter and initialization parameters as keyword arguments.
Passing an instance that inherits from PersistenceDriverBase as storage parameter.